Skip to content

Commit c873512

Browse files
author
Paolo Abeni
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Merge in late fixes to prepare for the 6.6 net-next PR. No conflicts. Signed-off-by: Paolo Abeni <[email protected]>
2 parents 6c9cfb8 + 90ca51e commit c873512

File tree

23 files changed

+161
-70
lines changed

23 files changed

+161
-70
lines changed

Documentation/devicetree/bindings/net/dsa/marvell.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ which is at a different MDIO base address in different switch families.
2020
6171, 6172, 6175, 6176, 6185, 6240, 6320, 6321,
2121
6341, 6350, 6351, 6352
2222
- "marvell,mv88e6190" : Switch has base address 0x00. Use with models:
23-
6163, 6190, 6190X, 6191, 6290, 6390, 6390X
23+
6190, 6190X, 6191, 6290, 6361, 6390, 6390X
2424
- "marvell,mv88e6250" : Switch has base address 0x08 or 0x18. Use with model:
2525
6220, 6250
2626

drivers/net/arcnet/arcnet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ static void arcnet_reply_tasklet(struct tasklet_struct *t)
464464

465465
ret = sock_queue_err_skb(sk, ackskb);
466466
if (ret)
467-
kfree_skb(ackskb);
467+
dev_kfree_skb_irq(ackskb);
468468

469469
local_irq_enable();
470470
};

drivers/net/ethernet/amd/pds_core/core.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,8 @@ void pdsc_teardown(struct pdsc *pdsc, bool removing)
464464
{
465465
int i;
466466

467-
pdsc_devcmd_reset(pdsc);
467+
if (!pdsc->pdev->is_virtfn)
468+
pdsc_devcmd_reset(pdsc);
468469
pdsc_qcq_free(pdsc, &pdsc->notifyqcq);
469470
pdsc_qcq_free(pdsc, &pdsc->adminqcq);
470471

@@ -524,7 +525,8 @@ static void pdsc_fw_down(struct pdsc *pdsc)
524525
}
525526

526527
/* Notify clients of fw_down */
527-
devlink_health_report(pdsc->fw_reporter, "FW down reported", pdsc);
528+
if (pdsc->fw_reporter)
529+
devlink_health_report(pdsc->fw_reporter, "FW down reported", pdsc);
528530
pdsc_notify(PDS_EVENT_RESET, &reset_event);
529531

530532
pdsc_stop(pdsc);
@@ -554,8 +556,9 @@ static void pdsc_fw_up(struct pdsc *pdsc)
554556

555557
/* Notify clients of fw_up */
556558
pdsc->fw_recoveries++;
557-
devlink_health_reporter_state_update(pdsc->fw_reporter,
558-
DEVLINK_HEALTH_REPORTER_STATE_HEALTHY);
559+
if (pdsc->fw_reporter)
560+
devlink_health_reporter_state_update(pdsc->fw_reporter,
561+
DEVLINK_HEALTH_REPORTER_STATE_HEALTHY);
559562
pdsc_notify(PDS_EVENT_RESET, &reset_event);
560563

561564
return;

drivers/net/ethernet/amd/pds_core/dev.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static const char *pdsc_devcmd_str(int opcode)
121121
}
122122
}
123123

124-
static int pdsc_devcmd_wait(struct pdsc *pdsc, int max_seconds)
124+
static int pdsc_devcmd_wait(struct pdsc *pdsc, u8 opcode, int max_seconds)
125125
{
126126
struct device *dev = pdsc->dev;
127127
unsigned long start_time;
@@ -131,9 +131,6 @@ static int pdsc_devcmd_wait(struct pdsc *pdsc, int max_seconds)
131131
int done = 0;
132132
int err = 0;
133133
int status;
134-
int opcode;
135-
136-
opcode = ioread8(&pdsc->cmd_regs->cmd.opcode);
137134

138135
start_time = jiffies;
139136
max_wait = start_time + (max_seconds * HZ);
@@ -180,10 +177,10 @@ int pdsc_devcmd_locked(struct pdsc *pdsc, union pds_core_dev_cmd *cmd,
180177

181178
memcpy_toio(&pdsc->cmd_regs->cmd, cmd, sizeof(*cmd));
182179
pdsc_devcmd_dbell(pdsc);
183-
err = pdsc_devcmd_wait(pdsc, max_seconds);
180+
err = pdsc_devcmd_wait(pdsc, cmd->opcode, max_seconds);
184181
memcpy_fromio(comp, &pdsc->cmd_regs->comp, sizeof(*comp));
185182

186-
if (err == -ENXIO || err == -ETIMEDOUT)
183+
if ((err == -ENXIO || err == -ETIMEDOUT) && pdsc->wq)
187184
queue_work(pdsc->wq, &pdsc->health_work);
188185

189186
return err;

drivers/net/ethernet/amd/pds_core/devlink.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ pdsc_viftype *pdsc_dl_find_viftype_by_id(struct pdsc *pdsc,
1010
{
1111
int vt;
1212

13+
if (!pdsc->viftype_status)
14+
return NULL;
15+
1316
for (vt = 0; vt < PDS_DEV_TYPE_MAX; vt++) {
1417
if (pdsc->viftype_status[vt].dl_id == dl_id)
1518
return &pdsc->viftype_status[vt];

drivers/net/ethernet/broadcom/tg3.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17794,10 +17794,7 @@ static int tg3_init_one(struct pci_dev *pdev,
1779417794
tnapi->tx_pending = TG3_DEF_TX_RING_PENDING;
1779517795

1779617796
tnapi->int_mbox = intmbx;
17797-
if (i <= 4)
17798-
intmbx += 0x8;
17799-
else
17800-
intmbx += 0x4;
17797+
intmbx += 0x8;
1780117798

1780217799
tnapi->consmbox = rcvmbx;
1780317800
tnapi->prodmbox = sndmbx;

drivers/net/ethernet/intel/ice/ice_ptp_hw.c

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ static void ice_ptp_src_cmd(struct ice_hw *hw, enum ice_ptp_tmr_cmd cmd)
131131
case READ_TIME:
132132
cmd_val |= GLTSYN_CMD_READ_TIME;
133133
break;
134+
case ICE_PTP_NOP:
135+
break;
134136
}
135137

136138
wr32(hw, GLTSYN_CMD, cmd_val);
@@ -1226,18 +1228,18 @@ ice_ptp_read_port_capture(struct ice_hw *hw, u8 port, u64 *tx_ts, u64 *rx_ts)
12261228
}
12271229

12281230
/**
1229-
* ice_ptp_one_port_cmd - Prepare a single PHY port for a timer command
1231+
* ice_ptp_write_port_cmd_e822 - Prepare a single PHY port for a timer command
12301232
* @hw: pointer to HW struct
12311233
* @port: Port to which cmd has to be sent
12321234
* @cmd: Command to be sent to the port
12331235
*
12341236
* Prepare the requested port for an upcoming timer sync command.
12351237
*
1236-
* Note there is no equivalent of this operation on E810, as that device
1237-
* always handles all external PHYs internally.
1238+
* Do not use this function directly. If you want to configure exactly one
1239+
* port, use ice_ptp_one_port_cmd() instead.
12381240
*/
12391241
static int
1240-
ice_ptp_one_port_cmd(struct ice_hw *hw, u8 port, enum ice_ptp_tmr_cmd cmd)
1242+
ice_ptp_write_port_cmd_e822(struct ice_hw *hw, u8 port, enum ice_ptp_tmr_cmd cmd)
12411243
{
12421244
u32 cmd_val, val;
12431245
u8 tmr_idx;
@@ -1261,6 +1263,8 @@ ice_ptp_one_port_cmd(struct ice_hw *hw, u8 port, enum ice_ptp_tmr_cmd cmd)
12611263
case ADJ_TIME_AT_TIME:
12621264
cmd_val |= PHY_CMD_ADJ_TIME_AT_TIME;
12631265
break;
1266+
case ICE_PTP_NOP:
1267+
break;
12641268
}
12651269

12661270
/* Tx case */
@@ -1306,6 +1310,39 @@ ice_ptp_one_port_cmd(struct ice_hw *hw, u8 port, enum ice_ptp_tmr_cmd cmd)
13061310
return 0;
13071311
}
13081312

1313+
/**
1314+
* ice_ptp_one_port_cmd - Prepare one port for a timer command
1315+
* @hw: pointer to the HW struct
1316+
* @configured_port: the port to configure with configured_cmd
1317+
* @configured_cmd: timer command to prepare on the configured_port
1318+
*
1319+
* Prepare the configured_port for the configured_cmd, and prepare all other
1320+
* ports for ICE_PTP_NOP. This causes the configured_port to execute the
1321+
* desired command while all other ports perform no operation.
1322+
*/
1323+
static int
1324+
ice_ptp_one_port_cmd(struct ice_hw *hw, u8 configured_port,
1325+
enum ice_ptp_tmr_cmd configured_cmd)
1326+
{
1327+
u8 port;
1328+
1329+
for (port = 0; port < ICE_NUM_EXTERNAL_PORTS; port++) {
1330+
enum ice_ptp_tmr_cmd cmd;
1331+
int err;
1332+
1333+
if (port == configured_port)
1334+
cmd = configured_cmd;
1335+
else
1336+
cmd = ICE_PTP_NOP;
1337+
1338+
err = ice_ptp_write_port_cmd_e822(hw, port, cmd);
1339+
if (err)
1340+
return err;
1341+
}
1342+
1343+
return 0;
1344+
}
1345+
13091346
/**
13101347
* ice_ptp_port_cmd_e822 - Prepare all ports for a timer command
13111348
* @hw: pointer to the HW struct
@@ -1322,7 +1359,7 @@ ice_ptp_port_cmd_e822(struct ice_hw *hw, enum ice_ptp_tmr_cmd cmd)
13221359
for (port = 0; port < ICE_NUM_EXTERNAL_PORTS; port++) {
13231360
int err;
13241361

1325-
err = ice_ptp_one_port_cmd(hw, port, cmd);
1362+
err = ice_ptp_write_port_cmd_e822(hw, port, cmd);
13261363
if (err)
13271364
return err;
13281365
}
@@ -2252,6 +2289,9 @@ static int ice_sync_phy_timer_e822(struct ice_hw *hw, u8 port)
22522289
if (err)
22532290
goto err_unlock;
22542291

2292+
/* Do not perform any action on the main timer */
2293+
ice_ptp_src_cmd(hw, ICE_PTP_NOP);
2294+
22552295
/* Issue the sync to activate the time adjustment */
22562296
ice_ptp_exec_tmr_cmd(hw);
22572297

@@ -2372,6 +2412,9 @@ int ice_start_phy_timer_e822(struct ice_hw *hw, u8 port)
23722412
if (err)
23732413
return err;
23742414

2415+
/* Do not perform any action on the main timer */
2416+
ice_ptp_src_cmd(hw, ICE_PTP_NOP);
2417+
23752418
ice_ptp_exec_tmr_cmd(hw);
23762419

23772420
err = ice_read_phy_reg_e822(hw, port, P_REG_PS, &val);
@@ -2847,6 +2890,8 @@ static int ice_ptp_port_cmd_e810(struct ice_hw *hw, enum ice_ptp_tmr_cmd cmd)
28472890
case ADJ_TIME_AT_TIME:
28482891
cmd_val = GLTSYN_CMD_ADJ_INIT_TIME;
28492892
break;
2893+
case ICE_PTP_NOP:
2894+
return 0;
28502895
}
28512896

28522897
/* Read, modify, write */

drivers/net/ethernet/intel/ice/ice_ptp_hw.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ enum ice_ptp_tmr_cmd {
99
INIT_INCVAL,
1010
ADJ_TIME,
1111
ADJ_TIME_AT_TIME,
12-
READ_TIME
12+
READ_TIME,
13+
ICE_PTP_NOP,
1314
};
1415

1516
enum ice_ptp_serdes {

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4814,6 +4814,10 @@ void igb_configure_rx_ring(struct igb_adapter *adapter,
48144814
static void igb_set_rx_buffer_len(struct igb_adapter *adapter,
48154815
struct igb_ring *rx_ring)
48164816
{
4817+
#if (PAGE_SIZE < 8192)
4818+
struct e1000_hw *hw = &adapter->hw;
4819+
#endif
4820+
48174821
/* set build_skb and buffer size flags */
48184822
clear_ring_build_skb_enabled(rx_ring);
48194823
clear_ring_uses_large_buffer(rx_ring);
@@ -4824,10 +4828,9 @@ static void igb_set_rx_buffer_len(struct igb_adapter *adapter,
48244828
set_ring_build_skb_enabled(rx_ring);
48254829

48264830
#if (PAGE_SIZE < 8192)
4827-
if (adapter->max_frame_size <= IGB_MAX_FRAME_BUILD_SKB)
4828-
return;
4829-
4830-
set_ring_uses_large_buffer(rx_ring);
4831+
if (adapter->max_frame_size > IGB_MAX_FRAME_BUILD_SKB ||
4832+
rd32(E1000_RCTL) & E1000_RCTL_SBP)
4833+
set_ring_uses_large_buffer(rx_ring);
48314834
#endif
48324835
}
48334836

drivers/net/ethernet/marvell/octeontx2/af/rpm.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ int rpm_lmac_enadis_pause_frm(void *rpmd, int lmac_id, u8 tx_pause,
355355

356356
void rpm_lmac_pause_frm_config(void *rpmd, int lmac_id, bool enable)
357357
{
358+
u64 cfg, pfc_class_mask_cfg;
358359
rpm_t *rpm = rpmd;
359-
u64 cfg;
360360

361361
/* ALL pause frames received are completely ignored */
362362
cfg = rpm_read(rpm, lmac_id, RPMX_MTI_MAC100X_COMMAND_CONFIG);
@@ -380,9 +380,11 @@ void rpm_lmac_pause_frm_config(void *rpmd, int lmac_id, bool enable)
380380
rpm_write(rpm, 0, RPMX_CMR_CHAN_MSK_OR, ~0ULL);
381381

382382
/* Disable all PFC classes */
383-
cfg = rpm_read(rpm, lmac_id, RPMX_CMRX_PRT_CBFC_CTL);
383+
pfc_class_mask_cfg = is_dev_rpm2(rpm) ? RPM2_CMRX_PRT_CBFC_CTL :
384+
RPMX_CMRX_PRT_CBFC_CTL;
385+
cfg = rpm_read(rpm, lmac_id, pfc_class_mask_cfg);
384386
cfg = FIELD_SET(RPM_PFC_CLASS_MASK, 0, cfg);
385-
rpm_write(rpm, lmac_id, RPMX_CMRX_PRT_CBFC_CTL, cfg);
387+
rpm_write(rpm, lmac_id, pfc_class_mask_cfg, cfg);
386388
}
387389

388390
int rpm_get_rx_stats(void *rpmd, int lmac_id, int idx, u64 *rx_stat)
@@ -605,8 +607,11 @@ int rpm_lmac_pfc_config(void *rpmd, int lmac_id, u8 tx_pause, u8 rx_pause, u16 p
605607
if (!is_lmac_valid(rpm, lmac_id))
606608
return -ENODEV;
607609

610+
pfc_class_mask_cfg = is_dev_rpm2(rpm) ? RPM2_CMRX_PRT_CBFC_CTL :
611+
RPMX_CMRX_PRT_CBFC_CTL;
612+
608613
cfg = rpm_read(rpm, lmac_id, RPMX_MTI_MAC100X_COMMAND_CONFIG);
609-
class_en = rpm_read(rpm, lmac_id, RPMX_CMRX_PRT_CBFC_CTL);
614+
class_en = rpm_read(rpm, lmac_id, pfc_class_mask_cfg);
610615
pfc_en |= FIELD_GET(RPM_PFC_CLASS_MASK, class_en);
611616

612617
if (rx_pause) {
@@ -635,10 +640,6 @@ int rpm_lmac_pfc_config(void *rpmd, int lmac_id, u8 tx_pause, u8 rx_pause, u16 p
635640
cfg |= RPMX_MTI_MAC100X_COMMAND_CONFIG_PFC_MODE;
636641

637642
rpm_write(rpm, lmac_id, RPMX_MTI_MAC100X_COMMAND_CONFIG, cfg);
638-
639-
pfc_class_mask_cfg = is_dev_rpm2(rpm) ? RPM2_CMRX_PRT_CBFC_CTL :
640-
RPMX_CMRX_PRT_CBFC_CTL;
641-
642643
rpm_write(rpm, lmac_id, pfc_class_mask_cfg, class_en);
643644

644645
return 0;

drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,7 @@ void otx2_txschq_free_one(struct otx2_nic *pfvf, u16 lvl, u16 schq)
806806

807807
mutex_unlock(&pfvf->mbox.lock);
808808
}
809+
EXPORT_SYMBOL(otx2_txschq_free_one);
809810

810811
void otx2_txschq_stop(struct otx2_nic *pfvf)
811812
{
@@ -1434,7 +1435,7 @@ int otx2_pool_init(struct otx2_nic *pfvf, u16 pool_id,
14341435
}
14351436

14361437
pp_params.flags = PP_FLAG_PAGE_FRAG | PP_FLAG_DMA_MAP;
1437-
pp_params.pool_size = numptrs;
1438+
pp_params.pool_size = min(OTX2_PAGE_POOL_SZ, numptrs);
14381439
pp_params.nid = NUMA_NO_NODE;
14391440
pp_params.dev = pfvf->dev;
14401441
pp_params.dma_dir = DMA_FROM_DEVICE;

drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static int otx2_pfc_txschq_alloc_one(struct otx2_nic *pfvf, u8 prio)
7070
* link config level. These rest of the scheduler can be
7171
* same as hw.txschq_list.
7272
*/
73-
for (lvl = 0; lvl < pfvf->hw.txschq_link_cfg_lvl; lvl++)
73+
for (lvl = 0; lvl <= pfvf->hw.txschq_link_cfg_lvl; lvl++)
7474
req->schq[lvl] = 1;
7575

7676
rc = otx2_sync_mbox_msg(&pfvf->mbox);
@@ -83,7 +83,7 @@ static int otx2_pfc_txschq_alloc_one(struct otx2_nic *pfvf, u8 prio)
8383
return PTR_ERR(rsp);
8484

8585
/* Setup transmit scheduler list */
86-
for (lvl = 0; lvl < pfvf->hw.txschq_link_cfg_lvl; lvl++) {
86+
for (lvl = 0; lvl <= pfvf->hw.txschq_link_cfg_lvl; lvl++) {
8787
if (!rsp->schq[lvl])
8888
return -ENOSPC;
8989

@@ -125,19 +125,12 @@ int otx2_pfc_txschq_alloc(struct otx2_nic *pfvf)
125125

126126
static int otx2_pfc_txschq_stop_one(struct otx2_nic *pfvf, u8 prio)
127127
{
128-
struct nix_txsch_free_req *free_req;
128+
int lvl;
129129

130-
mutex_lock(&pfvf->mbox.lock);
131130
/* free PFC TLx nodes */
132-
free_req = otx2_mbox_alloc_msg_nix_txsch_free(&pfvf->mbox);
133-
if (!free_req) {
134-
mutex_unlock(&pfvf->mbox.lock);
135-
return -ENOMEM;
136-
}
137-
138-
free_req->flags = TXSCHQ_FREE_ALL;
139-
otx2_sync_mbox_msg(&pfvf->mbox);
140-
mutex_unlock(&pfvf->mbox.lock);
131+
for (lvl = 0; lvl <= pfvf->hw.txschq_link_cfg_lvl; lvl++)
132+
otx2_txschq_free_one(pfvf, lvl,
133+
pfvf->pfc_schq_list[lvl][prio]);
141134

142135
pfvf->pfc_alloc_status[prio] = false;
143136
return 0;

drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#define OTX2_ETH_HLEN (VLAN_ETH_HLEN + VLAN_HLEN)
2424
#define OTX2_MIN_MTU 60
2525

26+
#define OTX2_PAGE_POOL_SZ 2048
27+
2628
#define OTX2_MAX_GSO_SEGS 255
2729
#define OTX2_MAX_FRAGS_IN_SQE 9
2830

0 commit comments

Comments
 (0)