Skip to content

Commit f6bd8fa

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.16 net-next PR. No conflicts nor adjacent changes. Signed-off-by: Paolo Abeni <[email protected]>
2 parents acea6b1 + 57a92d1 commit f6bd8fa

File tree

24 files changed

+210
-61
lines changed

24 files changed

+210
-61
lines changed

drivers/net/ethernet/airoha/airoha_eth.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2883,7 +2883,15 @@ static int airoha_alloc_gdm_port(struct airoha_eth *eth,
28832883
if (err)
28842884
return err;
28852885

2886-
return register_netdev(dev);
2886+
err = register_netdev(dev);
2887+
if (err)
2888+
goto free_metadata_dst;
2889+
2890+
return 0;
2891+
2892+
free_metadata_dst:
2893+
airoha_metadata_dst_free(port);
2894+
return err;
28872895
}
28882896

28892897
static int airoha_probe(struct platform_device *pdev)

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5283,7 +5283,11 @@ static int macb_probe(struct platform_device *pdev)
52835283

52845284
#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
52855285
if (GEM_BFEXT(DAW64, gem_readl(bp, DCFG6))) {
5286-
dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(44));
5286+
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(44));
5287+
if (err) {
5288+
dev_err(&pdev->dev, "failed to set DMA mask\n");
5289+
goto err_out_free_netdev;
5290+
}
52875291
bp->hw_dma_cap |= HW_DMA_CAP_64B;
52885292
}
52895293
#endif

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ static int mcs_notify_pfvf(struct mcs_intr_event *event, struct rvu *rvu)
143143

144144
otx2_mbox_msg_send_up(&rvu->afpf_wq_info.mbox_up, pf);
145145

146+
otx2_mbox_wait_for_rsp(&rvu->afpf_wq_info.mbox_up, pf);
147+
146148
mutex_unlock(&rvu->mbox_lock);
147149

148150
return 0;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ static void cgx_notify_pfs(struct cgx_link_event *event, struct rvu *rvu)
272272

273273
otx2_mbox_msg_send_up(&rvu->afpf_wq_info.mbox_up, pfid);
274274

275+
otx2_mbox_wait_for_rsp(&rvu->afpf_wq_info.mbox_up, pfid);
276+
275277
mutex_unlock(&rvu->mbox_lock);
276278
} while (pfmap);
277279
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ static int rvu_rep_up_notify(struct rvu *rvu, struct rep_event *event)
6060

6161
otx2_mbox_msg_send_up(&rvu->afpf_wq_info.mbox_up, pf);
6262

63+
otx2_mbox_wait_for_rsp(&rvu->afpf_wq_info.mbox_up, pf);
64+
6365
mutex_unlock(&rvu->mbox_lock);
6466
return 0;
6567
}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,6 +1638,7 @@ static int otx2_qos_leaf_del_last(struct otx2_nic *pfvf, u16 classid, bool force
16381638
if (!node->is_static)
16391639
dwrr_del_node = true;
16401640

1641+
WRITE_ONCE(node->qid, OTX2_QOS_QID_INNER);
16411642
/* destroy the leaf node */
16421643
otx2_qos_disable_sq(pfvf, qid);
16431644
otx2_qos_destroy_node(pfvf, node);
@@ -1682,9 +1683,6 @@ static int otx2_qos_leaf_del_last(struct otx2_nic *pfvf, u16 classid, bool force
16821683
}
16831684
kfree(new_cfg);
16841685

1685-
/* update tx_real_queues */
1686-
otx2_qos_update_tx_netdev_queues(pfvf);
1687-
16881686
return 0;
16891687
}
16901688

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,26 @@ int otx2_qos_enable_sq(struct otx2_nic *pfvf, int qidx)
256256
return err;
257257
}
258258

259+
static int otx2_qos_nix_npa_ndc_sync(struct otx2_nic *pfvf)
260+
{
261+
struct ndc_sync_op *req;
262+
int rc;
263+
264+
mutex_lock(&pfvf->mbox.lock);
265+
266+
req = otx2_mbox_alloc_msg_ndc_sync_op(&pfvf->mbox);
267+
if (!req) {
268+
mutex_unlock(&pfvf->mbox.lock);
269+
return -ENOMEM;
270+
}
271+
272+
req->nix_lf_tx_sync = true;
273+
req->npa_lf_sync = true;
274+
rc = otx2_sync_mbox_msg(&pfvf->mbox);
275+
mutex_unlock(&pfvf->mbox.lock);
276+
return rc;
277+
}
278+
259279
void otx2_qos_disable_sq(struct otx2_nic *pfvf, int qidx)
260280
{
261281
struct otx2_qset *qset = &pfvf->qset;
@@ -285,6 +305,8 @@ void otx2_qos_disable_sq(struct otx2_nic *pfvf, int qidx)
285305

286306
otx2_qos_sqb_flush(pfvf, sq_idx);
287307
otx2_smq_flush(pfvf, otx2_get_smq_idx(pfvf, sq_idx));
308+
/* NIX/NPA NDC sync */
309+
otx2_qos_nix_npa_ndc_sync(pfvf);
288310
otx2_cleanup_tx_cqes(pfvf, cq);
289311

290312
mutex_lock(&pfvf->mbox.lock);

drivers/net/ethernet/mellanox/mlx5/core/vport.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -465,19 +465,22 @@ int mlx5_query_nic_vport_node_guid(struct mlx5_core_dev *mdev, u64 *node_guid)
465465
{
466466
u32 *out;
467467
int outlen = MLX5_ST_SZ_BYTES(query_nic_vport_context_out);
468+
int err;
468469

469470
out = kvzalloc(outlen, GFP_KERNEL);
470471
if (!out)
471472
return -ENOMEM;
472473

473-
mlx5_query_nic_vport_context(mdev, 0, out);
474+
err = mlx5_query_nic_vport_context(mdev, 0, out);
475+
if (err)
476+
goto out;
474477

475478
*node_guid = MLX5_GET64(query_nic_vport_context_out, out,
476479
nic_vport_context.node_guid);
477-
480+
out:
478481
kvfree(out);
479482

480-
return 0;
483+
return err;
481484
}
482485
EXPORT_SYMBOL_GPL(mlx5_query_nic_vport_node_guid);
483486

@@ -519,19 +522,22 @@ int mlx5_query_nic_vport_qkey_viol_cntr(struct mlx5_core_dev *mdev,
519522
{
520523
u32 *out;
521524
int outlen = MLX5_ST_SZ_BYTES(query_nic_vport_context_out);
525+
int err;
522526

523527
out = kvzalloc(outlen, GFP_KERNEL);
524528
if (!out)
525529
return -ENOMEM;
526530

527-
mlx5_query_nic_vport_context(mdev, 0, out);
531+
err = mlx5_query_nic_vport_context(mdev, 0, out);
532+
if (err)
533+
goto out;
528534

529535
*qkey_viol_cntr = MLX5_GET(query_nic_vport_context_out, out,
530536
nic_vport_context.qkey_violation_counter);
531-
537+
out:
532538
kvfree(out);
533539

534-
return 0;
540+
return err;
535541
}
536542
EXPORT_SYMBOL_GPL(mlx5_query_nic_vport_qkey_viol_cntr);
537543

drivers/net/ethernet/microchip/lan743x_main.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@ static int lan743x_mac_set_mtu(struct lan743x_adapter *adapter, int new_mtu)
13301330
}
13311331

13321332
/* PHY */
1333-
static int lan743x_phy_reset(struct lan743x_adapter *adapter)
1333+
static int lan743x_hw_reset_phy(struct lan743x_adapter *adapter)
13341334
{
13351335
u32 data;
13361336

@@ -1346,11 +1346,6 @@ static int lan743x_phy_reset(struct lan743x_adapter *adapter)
13461346
50000, 1000000);
13471347
}
13481348

1349-
static int lan743x_phy_init(struct lan743x_adapter *adapter)
1350-
{
1351-
return lan743x_phy_reset(adapter);
1352-
}
1353-
13541349
static void lan743x_phy_interface_select(struct lan743x_adapter *adapter)
13551350
{
13561351
u32 id_rev;
@@ -3534,10 +3529,6 @@ static int lan743x_hardware_init(struct lan743x_adapter *adapter,
35343529
if (ret)
35353530
return ret;
35363531

3537-
ret = lan743x_phy_init(adapter);
3538-
if (ret)
3539-
return ret;
3540-
35413532
ret = lan743x_ptp_init(adapter);
35423533
if (ret)
35433534
return ret;
@@ -3674,6 +3665,10 @@ static int lan743x_pcidev_probe(struct pci_dev *pdev,
36743665
if (ret)
36753666
goto cleanup_pci;
36763667

3668+
ret = lan743x_hw_reset_phy(adapter);
3669+
if (ret)
3670+
goto cleanup_pci;
3671+
36773672
ret = lan743x_hardware_init(adapter, pdev);
36783673
if (ret)
36793674
goto cleanup_pci;

drivers/net/ethernet/microchip/lan966x/lan966x_main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,11 @@ static void lan966x_ifh_set_rew_op(void *ifh, u64 rew_op)
353353
lan966x_ifh_set(ifh, rew_op, IFH_POS_REW_CMD, IFH_WID_REW_CMD);
354354
}
355355

356+
static void lan966x_ifh_set_oam_type(void *ifh, u64 oam_type)
357+
{
358+
lan966x_ifh_set(ifh, oam_type, IFH_POS_PDU_TYPE, IFH_WID_PDU_TYPE);
359+
}
360+
356361
static void lan966x_ifh_set_timestamp(void *ifh, u64 timestamp)
357362
{
358363
lan966x_ifh_set(ifh, timestamp, IFH_POS_TIMESTAMP, IFH_WID_TIMESTAMP);
@@ -380,6 +385,7 @@ static netdev_tx_t lan966x_port_xmit(struct sk_buff *skb,
380385
return err;
381386

382387
lan966x_ifh_set_rew_op(ifh, LAN966X_SKB_CB(skb)->rew_op);
388+
lan966x_ifh_set_oam_type(ifh, LAN966X_SKB_CB(skb)->pdu_type);
383389
lan966x_ifh_set_timestamp(ifh, LAN966X_SKB_CB(skb)->ts_id);
384390
}
385391

drivers/net/ethernet/microchip/lan966x/lan966x_main.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@
7575
#define IFH_REW_OP_ONE_STEP_PTP 0x3
7676
#define IFH_REW_OP_TWO_STEP_PTP 0x4
7777

78+
#define IFH_PDU_TYPE_NONE 0
79+
#define IFH_PDU_TYPE_IPV4 7
80+
#define IFH_PDU_TYPE_IPV6 8
81+
7882
#define FDMA_RX_DCB_MAX_DBS 1
7983
#define FDMA_TX_DCB_MAX_DBS 1
8084

@@ -254,6 +258,7 @@ struct lan966x_phc {
254258

255259
struct lan966x_skb_cb {
256260
u8 rew_op;
261+
u8 pdu_type;
257262
u16 ts_id;
258263
unsigned long jiffies;
259264
};

drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -322,34 +322,55 @@ void lan966x_ptp_hwtstamp_get(struct lan966x_port *port,
322322
*cfg = phc->hwtstamp_config;
323323
}
324324

325-
static int lan966x_ptp_classify(struct lan966x_port *port, struct sk_buff *skb)
325+
static void lan966x_ptp_classify(struct lan966x_port *port, struct sk_buff *skb,
326+
u8 *rew_op, u8 *pdu_type)
326327
{
327328
struct ptp_header *header;
328329
u8 msgtype;
329330
int type;
330331

331-
if (port->ptp_tx_cmd == IFH_REW_OP_NOOP)
332-
return IFH_REW_OP_NOOP;
332+
if (port->ptp_tx_cmd == IFH_REW_OP_NOOP) {
333+
*rew_op = IFH_REW_OP_NOOP;
334+
*pdu_type = IFH_PDU_TYPE_NONE;
335+
return;
336+
}
333337

334338
type = ptp_classify_raw(skb);
335-
if (type == PTP_CLASS_NONE)
336-
return IFH_REW_OP_NOOP;
339+
if (type == PTP_CLASS_NONE) {
340+
*rew_op = IFH_REW_OP_NOOP;
341+
*pdu_type = IFH_PDU_TYPE_NONE;
342+
return;
343+
}
337344

338345
header = ptp_parse_header(skb, type);
339-
if (!header)
340-
return IFH_REW_OP_NOOP;
346+
if (!header) {
347+
*rew_op = IFH_REW_OP_NOOP;
348+
*pdu_type = IFH_PDU_TYPE_NONE;
349+
return;
350+
}
341351

342-
if (port->ptp_tx_cmd == IFH_REW_OP_TWO_STEP_PTP)
343-
return IFH_REW_OP_TWO_STEP_PTP;
352+
if (type & PTP_CLASS_L2)
353+
*pdu_type = IFH_PDU_TYPE_NONE;
354+
if (type & PTP_CLASS_IPV4)
355+
*pdu_type = IFH_PDU_TYPE_IPV4;
356+
if (type & PTP_CLASS_IPV6)
357+
*pdu_type = IFH_PDU_TYPE_IPV6;
358+
359+
if (port->ptp_tx_cmd == IFH_REW_OP_TWO_STEP_PTP) {
360+
*rew_op = IFH_REW_OP_TWO_STEP_PTP;
361+
return;
362+
}
344363

345364
/* If it is sync and run 1 step then set the correct operation,
346365
* otherwise run as 2 step
347366
*/
348367
msgtype = ptp_get_msgtype(header, type);
349-
if ((msgtype & 0xf) == 0)
350-
return IFH_REW_OP_ONE_STEP_PTP;
368+
if ((msgtype & 0xf) == 0) {
369+
*rew_op = IFH_REW_OP_ONE_STEP_PTP;
370+
return;
371+
}
351372

352-
return IFH_REW_OP_TWO_STEP_PTP;
373+
*rew_op = IFH_REW_OP_TWO_STEP_PTP;
353374
}
354375

355376
static void lan966x_ptp_txtstamp_old_release(struct lan966x_port *port)
@@ -374,10 +395,12 @@ int lan966x_ptp_txtstamp_request(struct lan966x_port *port,
374395
{
375396
struct lan966x *lan966x = port->lan966x;
376397
unsigned long flags;
398+
u8 pdu_type;
377399
u8 rew_op;
378400

379-
rew_op = lan966x_ptp_classify(port, skb);
401+
lan966x_ptp_classify(port, skb, &rew_op, &pdu_type);
380402
LAN966X_SKB_CB(skb)->rew_op = rew_op;
403+
LAN966X_SKB_CB(skb)->pdu_type = pdu_type;
381404

382405
if (rew_op != IFH_REW_OP_TWO_STEP_PTP)
383406
return 0;

drivers/net/ethernet/xilinx/xilinx_axienet_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ static void axienet_dma_tx_cb(void *data, const struct dmaengine_result *result)
880880
dev_consume_skb_any(skbuf_dma->skb);
881881
netif_txq_completed_wake(txq, 1, len,
882882
CIRC_SPACE(lp->tx_ring_head, lp->tx_ring_tail, TX_BD_NUM_MAX),
883-
2 * MAX_SKB_FRAGS);
883+
2);
884884
}
885885

886886
/**
@@ -914,7 +914,7 @@ axienet_start_xmit_dmaengine(struct sk_buff *skb, struct net_device *ndev)
914914

915915
dma_dev = lp->tx_chan->device;
916916
sg_len = skb_shinfo(skb)->nr_frags + 1;
917-
if (CIRC_SPACE(lp->tx_ring_head, lp->tx_ring_tail, TX_BD_NUM_MAX) <= sg_len) {
917+
if (CIRC_SPACE(lp->tx_ring_head, lp->tx_ring_tail, TX_BD_NUM_MAX) <= 1) {
918918
netif_stop_queue(ndev);
919919
if (net_ratelimit())
920920
netdev_warn(ndev, "TX ring unexpectedly full\n");
@@ -964,7 +964,7 @@ axienet_start_xmit_dmaengine(struct sk_buff *skb, struct net_device *ndev)
964964
txq = skb_get_tx_queue(lp->ndev, skb);
965965
netdev_tx_sent_queue(txq, skb->len);
966966
netif_txq_maybe_stop(txq, CIRC_SPACE(lp->tx_ring_head, lp->tx_ring_tail, TX_BD_NUM_MAX),
967-
MAX_SKB_FRAGS + 1, 2 * MAX_SKB_FRAGS);
967+
1, 2);
968968

969969
dmaengine_submit(dma_tx_desc);
970970
dma_async_issue_pending(lp->tx_chan);

drivers/net/mctp/mctp-usb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ static int mctp_usb_open(struct net_device *dev)
257257

258258
WRITE_ONCE(mctp_usb->stopped, false);
259259

260+
netif_start_queue(dev);
261+
260262
return mctp_usb_rx_queue(mctp_usb, GFP_KERNEL);
261263
}
262264

0 commit comments

Comments
 (0)