Skip to content

Commit f30dc9d

Browse files
author
NipaLocal
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Signed-off-by: NipaLocal <nipa@local>
2 parents c53a46b + 2dc8b1e commit f30dc9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1089
-351
lines changed

Documentation/devicetree/bindings/net/pse-pd/microchip,pd692x0.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ properties:
2424

2525
managers:
2626
type: object
27+
additionalProperties: false
2728
description:
2829
List of the PD69208T4/PD69204T4/PD69208M PSE managers. Each manager
2930
have 4 or 8 physical ports according to the chip version. No need to
@@ -47,8 +48,9 @@ properties:
4748
- "#size-cells"
4849

4950
patternProperties:
50-
"^manager@0[0-9a-b]$":
51+
"^manager@[0-9a-b]$":
5152
type: object
53+
additionalProperties: false
5254
description:
5355
PD69208T4/PD69204T4/PD69208M PSE manager exposing 4 or 8 physical
5456
ports.
@@ -69,9 +71,14 @@ properties:
6971
patternProperties:
7072
'^port@[0-7]$':
7173
type: object
74+
additionalProperties: false
75+
76+
properties:
77+
reg:
78+
maxItems: 1
79+
7280
required:
7381
- reg
74-
additionalProperties: false
7582

7683
required:
7784
- reg

Documentation/devicetree/bindings/net/pse-pd/ti,tps23881.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,31 @@ properties:
2929
of the ports conversion matrix that establishes relationship between
3030
the logical ports and the physical channels.
3131
type: object
32+
additionalProperties: false
33+
34+
properties:
35+
"#address-cells":
36+
const: 1
37+
38+
"#size-cells":
39+
const: 0
3240

3341
patternProperties:
3442
'^channel@[0-7]$':
3543
type: object
44+
additionalProperties: false
45+
46+
properties:
47+
reg:
48+
maxItems: 1
49+
3650
required:
3751
- reg
3852

53+
required:
54+
- "#address-cells"
55+
- "#size-cells"
56+
3957
unevaluatedProperties: false
4058

4159
required:

Documentation/process/maintainer-netdev.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ preferably including links to previous postings, for example::
227227
The amount of mooing will depend on packet rate so should match
228228
the diurnal cycle quite well.
229229

230-
Signed-of-by: Joe Defarmer <[email protected]>
230+
Signed-off-by: Joe Defarmer <[email protected]>
231231
---
232232
v3:
233233
- add a note about time-of-day mooing fluctuation to the commit message

MAINTAINERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3855,6 +3855,7 @@ BPF JIT for ARM64
38553855
M: Daniel Borkmann <[email protected]>
38563856
M: Alexei Starovoitov <[email protected]>
38573857
M: Puranjay Mohan <[email protected]>
3858+
R: Xu Kuohai <[email protected]>
38583859
38593860
S: Supported
38603861
F: arch/arm64/net/
@@ -21317,7 +21318,7 @@ F: arch/riscv/boot/dts/starfive/
2131721318

2131821319
STARFIVE DWMAC GLUE LAYER
2131921320
M: Emil Renner Berthing <[email protected]>
21320-
M: Samin Guo <samin.guo@starfivetech.com>
21321+
M: Minda Chen <minda.chen@starfivetech.com>
2132121322
S: Maintained
2132221323
F: Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
2132321324
F: drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c

arch/arc/net/bpf_jit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
/************** Functions that the back-end must provide **************/
4141
/* Extension for 32-bit operations. */
42-
inline u8 zext(u8 *buf, u8 rd);
42+
u8 zext(u8 *buf, u8 rd);
4343
/***** Moves *****/
4444
u8 mov_r32(u8 *buf, u8 rd, u8 rs, u8 sign_ext);
4545
u8 mov_r32_i32(u8 *buf, u8 reg, s32 imm);

arch/arc/net/bpf_jit_arcv2.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ enum {
6262
* If/when we decide to add ARCv2 instructions that do use register pairs,
6363
* the mapping, hopefully, doesn't need to be revisited.
6464
*/
65-
const u8 bpf2arc[][2] = {
65+
static const u8 bpf2arc[][2] = {
6666
/* Return value from in-kernel function, and exit value from eBPF */
6767
[BPF_REG_0] = {ARC_R_8, ARC_R_9},
6868
/* Arguments from eBPF program to in-kernel function */
@@ -1302,7 +1302,7 @@ static u8 arc_b(u8 *buf, s32 offset)
13021302

13031303
/************* Packers (Deal with BPF_REGs) **************/
13041304

1305-
inline u8 zext(u8 *buf, u8 rd)
1305+
u8 zext(u8 *buf, u8 rd)
13061306
{
13071307
if (rd != BPF_REG_FP)
13081308
return arc_movi_r(buf, REG_HI(rd), 0);
@@ -2235,6 +2235,7 @@ u8 gen_swap(u8 *buf, u8 rd, u8 size, u8 endian, bool force, bool do_zext)
22352235
break;
22362236
default:
22372237
/* The caller must have handled this. */
2238+
break;
22382239
}
22392240
} else {
22402241
/*
@@ -2253,6 +2254,7 @@ u8 gen_swap(u8 *buf, u8 rd, u8 size, u8 endian, bool force, bool do_zext)
22532254
break;
22542255
default:
22552256
/* The caller must have handled this. */
2257+
break;
22562258
}
22572259
}
22582260

@@ -2517,7 +2519,7 @@ u8 arc_epilogue(u8 *buf, u32 usage, u16 frame_size)
25172519
#define JCC64_NR_OF_JMPS 3 /* Number of jumps in jcc64 template. */
25182520
#define JCC64_INSNS_TO_END 3 /* Number of insn. inclusive the 2nd jmp to end. */
25192521
#define JCC64_SKIP_JMP 1 /* Index of the "skip" jump to "end". */
2520-
const struct {
2522+
static const struct {
25212523
/*
25222524
* "jit_off" is common between all "jmp[]" and is coupled with
25232525
* "cond" of each "jmp[]" instance. e.g.:
@@ -2883,7 +2885,7 @@ u8 gen_jmp_64(u8 *buf, u8 rd, u8 rs, u8 cond, u32 curr_off, u32 targ_off)
28832885
* The "ARC_CC_SET" becomes "CC_unequal" because of the "tst"
28842886
* instruction that precedes the conditional branch.
28852887
*/
2886-
const u8 arcv2_32_jmps[ARC_CC_LAST] = {
2888+
static const u8 arcv2_32_jmps[ARC_CC_LAST] = {
28872889
[ARC_CC_UGT] = CC_great_u,
28882890
[ARC_CC_UGE] = CC_great_eq_u,
28892891
[ARC_CC_ULT] = CC_less_u,

arch/arc/net/bpf_jit_core.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,15 @@ static void jit_dump(const struct jit_context *ctx)
159159
/* Initialise the context so there's no garbage. */
160160
static int jit_ctx_init(struct jit_context *ctx, struct bpf_prog *prog)
161161
{
162-
memset(ctx, 0, sizeof(ctx));
162+
memset(ctx, 0, sizeof(*ctx));
163163

164164
ctx->orig_prog = prog;
165165

166166
/* If constant blinding was requested but failed, scram. */
167167
ctx->prog = bpf_jit_blind_constants(prog);
168168
if (IS_ERR(ctx->prog))
169169
return PTR_ERR(ctx->prog);
170-
ctx->blinded = (ctx->prog == ctx->orig_prog ? false : true);
170+
ctx->blinded = (ctx->prog != ctx->orig_prog);
171171

172172
/* If the verifier doesn't zero-extend, then we have to do it. */
173173
ctx->do_zext = !ctx->prog->aux->verifier_zext;
@@ -1182,12 +1182,12 @@ static int jit_prepare(struct jit_context *ctx)
11821182
}
11831183

11841184
/*
1185-
* All the "handle_*()" functions have been called before by the
1186-
* "jit_prepare()". If there was an error, we would know by now.
1187-
* Therefore, no extra error checking at this point, other than
1188-
* a sanity check at the end that expects the calculated length
1189-
* (jit.len) to be equal to the length of generated instructions
1190-
* (jit.index).
1185+
* jit_compile() is the real compilation phase. jit_prepare() is
1186+
* invoked before jit_compile() as a dry-run to make sure everything
1187+
* will go OK and allocate the necessary memory.
1188+
*
1189+
* In the end, jit_compile() checks if it has produced the same number
1190+
* of instructions as jit_prepare() would.
11911191
*/
11921192
static int jit_compile(struct jit_context *ctx)
11931193
{
@@ -1407,9 +1407,9 @@ static struct bpf_prog *do_extra_pass(struct bpf_prog *prog)
14071407

14081408
/*
14091409
* This function may be invoked twice for the same stream of BPF
1410-
* instructions. The "extra pass" happens, when there are "call"s
1411-
* involved that their addresses are not known during the first
1412-
* invocation.
1410+
* instructions. The "extra pass" happens, when there are
1411+
* (re)locations involved that their addresses are not known
1412+
* during the first run.
14131413
*/
14141414
struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
14151415
{

drivers/net/dsa/microchip/ksz_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3142,7 +3142,7 @@ phy_interface_t ksz_get_xmii(struct ksz_device *dev, int port, bool gbit)
31423142
else
31433143
interface = PHY_INTERFACE_MODE_MII;
31443144
} else if (val == bitval[P_RMII_SEL]) {
3145-
interface = PHY_INTERFACE_MODE_RGMII;
3145+
interface = PHY_INTERFACE_MODE_RMII;
31463146
} else {
31473147
interface = PHY_INTERFACE_MODE_RGMII;
31483148
if (data8 & P_RGMII_ID_EG_ENABLE)

drivers/net/ethernet/amazon/ena/ena_com.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ static int ena_com_init_io_sq(struct ena_com_dev *ena_dev,
312312
struct ena_com_io_sq *io_sq)
313313
{
314314
size_t size;
315-
int dev_node = 0;
316315

317316
memset(&io_sq->desc_addr, 0x0, sizeof(io_sq->desc_addr));
318317

@@ -325,12 +324,9 @@ static int ena_com_init_io_sq(struct ena_com_dev *ena_dev,
325324
size = io_sq->desc_entry_size * io_sq->q_depth;
326325

327326
if (io_sq->mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_HOST) {
328-
dev_node = dev_to_node(ena_dev->dmadev);
329-
set_dev_node(ena_dev->dmadev, ctx->numa_node);
330327
io_sq->desc_addr.virt_addr =
331328
dma_alloc_coherent(ena_dev->dmadev, size, &io_sq->desc_addr.phys_addr,
332329
GFP_KERNEL);
333-
set_dev_node(ena_dev->dmadev, dev_node);
334330
if (!io_sq->desc_addr.virt_addr) {
335331
io_sq->desc_addr.virt_addr =
336332
dma_alloc_coherent(ena_dev->dmadev, size,
@@ -354,10 +350,7 @@ static int ena_com_init_io_sq(struct ena_com_dev *ena_dev,
354350
size = (size_t)io_sq->bounce_buf_ctrl.buffer_size *
355351
io_sq->bounce_buf_ctrl.buffers_num;
356352

357-
dev_node = dev_to_node(ena_dev->dmadev);
358-
set_dev_node(ena_dev->dmadev, ctx->numa_node);
359353
io_sq->bounce_buf_ctrl.base_buffer = devm_kzalloc(ena_dev->dmadev, size, GFP_KERNEL);
360-
set_dev_node(ena_dev->dmadev, dev_node);
361354
if (!io_sq->bounce_buf_ctrl.base_buffer)
362355
io_sq->bounce_buf_ctrl.base_buffer =
363356
devm_kzalloc(ena_dev->dmadev, size, GFP_KERNEL);
@@ -397,7 +390,6 @@ static int ena_com_init_io_cq(struct ena_com_dev *ena_dev,
397390
struct ena_com_io_cq *io_cq)
398391
{
399392
size_t size;
400-
int prev_node = 0;
401393

402394
memset(&io_cq->cdesc_addr, 0x0, sizeof(io_cq->cdesc_addr));
403395

@@ -409,11 +401,8 @@ static int ena_com_init_io_cq(struct ena_com_dev *ena_dev,
409401

410402
size = io_cq->cdesc_entry_size_in_bytes * io_cq->q_depth;
411403

412-
prev_node = dev_to_node(ena_dev->dmadev);
413-
set_dev_node(ena_dev->dmadev, ctx->numa_node);
414404
io_cq->cdesc_addr.virt_addr =
415405
dma_alloc_coherent(ena_dev->dmadev, size, &io_cq->cdesc_addr.phys_addr, GFP_KERNEL);
416-
set_dev_node(ena_dev->dmadev, prev_node);
417406
if (!io_cq->cdesc_addr.virt_addr) {
418407
io_cq->cdesc_addr.virt_addr =
419408
dma_alloc_coherent(ena_dev->dmadev, size, &io_cq->cdesc_addr.phys_addr,

drivers/net/ethernet/cisco/enic/enic_main.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,18 +1117,30 @@ static int enic_set_vf_port(struct net_device *netdev, int vf,
11171117
pp->request = nla_get_u8(port[IFLA_PORT_REQUEST]);
11181118

11191119
if (port[IFLA_PORT_PROFILE]) {
1120+
if (nla_len(port[IFLA_PORT_PROFILE]) != PORT_PROFILE_MAX) {
1121+
memcpy(pp, &prev_pp, sizeof(*pp));
1122+
return -EINVAL;
1123+
}
11201124
pp->set |= ENIC_SET_NAME;
11211125
memcpy(pp->name, nla_data(port[IFLA_PORT_PROFILE]),
11221126
PORT_PROFILE_MAX);
11231127
}
11241128

11251129
if (port[IFLA_PORT_INSTANCE_UUID]) {
1130+
if (nla_len(port[IFLA_PORT_INSTANCE_UUID]) != PORT_UUID_MAX) {
1131+
memcpy(pp, &prev_pp, sizeof(*pp));
1132+
return -EINVAL;
1133+
}
11261134
pp->set |= ENIC_SET_INSTANCE;
11271135
memcpy(pp->instance_uuid,
11281136
nla_data(port[IFLA_PORT_INSTANCE_UUID]), PORT_UUID_MAX);
11291137
}
11301138

11311139
if (port[IFLA_PORT_HOST_UUID]) {
1140+
if (nla_len(port[IFLA_PORT_HOST_UUID]) != PORT_UUID_MAX) {
1141+
memcpy(pp, &prev_pp, sizeof(*pp));
1142+
return -EINVAL;
1143+
}
11321144
pp->set |= ENIC_SET_HOST;
11331145
memcpy(pp->host_uuid,
11341146
nla_data(port[IFLA_PORT_HOST_UUID]), PORT_UUID_MAX);

drivers/net/ethernet/freescale/fec_main.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4130,6 +4130,14 @@ static int fec_enet_init(struct net_device *ndev)
41304130
return ret;
41314131
}
41324132

4133+
static void fec_enet_deinit(struct net_device *ndev)
4134+
{
4135+
struct fec_enet_private *fep = netdev_priv(ndev);
4136+
4137+
netif_napi_del(&fep->napi);
4138+
fec_enet_free_queue(ndev);
4139+
}
4140+
41334141
#ifdef CONFIG_OF
41344142
static int fec_reset_phy(struct platform_device *pdev)
41354143
{
@@ -4524,6 +4532,7 @@ fec_probe(struct platform_device *pdev)
45244532
fec_enet_mii_remove(fep);
45254533
failed_mii_init:
45264534
failed_irq:
4535+
fec_enet_deinit(ndev);
45274536
failed_init:
45284537
fec_ptp_stop(pdev);
45294538
failed_reset:
@@ -4587,6 +4596,7 @@ fec_drv_remove(struct platform_device *pdev)
45874596
pm_runtime_put_noidle(&pdev->dev);
45884597
pm_runtime_disable(&pdev->dev);
45894598

4599+
fec_enet_deinit(ndev);
45904600
free_netdev(ndev);
45914601
}
45924602

drivers/net/ethernet/intel/e1000e/ich8lan.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,6 +1225,28 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx)
12251225
}
12261226

12271227
release:
1228+
/* Switching PHY interface always returns MDI error
1229+
* so disable retry mechanism to avoid wasting time
1230+
*/
1231+
e1000e_disable_phy_retry(hw);
1232+
1233+
/* Force SMBus mode in PHY */
1234+
ret_val = e1000_read_phy_reg_hv_locked(hw, CV_SMB_CTRL, &phy_reg);
1235+
if (ret_val) {
1236+
e1000e_enable_phy_retry(hw);
1237+
hw->phy.ops.release(hw);
1238+
goto out;
1239+
}
1240+
phy_reg |= CV_SMB_CTRL_FORCE_SMBUS;
1241+
e1000_write_phy_reg_hv_locked(hw, CV_SMB_CTRL, phy_reg);
1242+
1243+
e1000e_enable_phy_retry(hw);
1244+
1245+
/* Force SMBus mode in MAC */
1246+
mac_reg = er32(CTRL_EXT);
1247+
mac_reg |= E1000_CTRL_EXT_FORCE_SMBUS;
1248+
ew32(CTRL_EXT, mac_reg);
1249+
12281250
hw->phy.ops.release(hw);
12291251
out:
12301252
if (ret_val)

drivers/net/ethernet/intel/e1000e/netdev.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6623,7 +6623,6 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool runtime)
66236623
struct e1000_hw *hw = &adapter->hw;
66246624
u32 ctrl, ctrl_ext, rctl, status, wufc;
66256625
int retval = 0;
6626-
u16 smb_ctrl;
66276626

66286627
/* Runtime suspend should only enable wakeup for link changes */
66296628
if (runtime)
@@ -6697,23 +6696,6 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool runtime)
66976696
if (retval)
66986697
return retval;
66996698
}
6700-
6701-
/* Force SMBUS to allow WOL */
6702-
/* Switching PHY interface always returns MDI error
6703-
* so disable retry mechanism to avoid wasting time
6704-
*/
6705-
e1000e_disable_phy_retry(hw);
6706-
6707-
e1e_rphy(hw, CV_SMB_CTRL, &smb_ctrl);
6708-
smb_ctrl |= CV_SMB_CTRL_FORCE_SMBUS;
6709-
e1e_wphy(hw, CV_SMB_CTRL, smb_ctrl);
6710-
6711-
e1000e_enable_phy_retry(hw);
6712-
6713-
/* Force SMBus mode in MAC */
6714-
ctrl_ext = er32(CTRL_EXT);
6715-
ctrl_ext |= E1000_CTRL_EXT_FORCE_SMBUS;
6716-
ew32(CTRL_EXT, ctrl_ext);
67176699
}
67186700

67196701
/* Ensure that the appropriate bits are set in LPI_CTRL

0 commit comments

Comments
 (0)