hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
....@@ -1311,8 +1311,9 @@
13111311 if (err)
13121312 goto err_free_npa_lf;
13131313
1314
- /* Enable backpressure */
1315
- otx2_nix_config_bp(pf, true);
1314
+ /* Enable backpressure for CGX mapped PF/VFs */
1315
+ if (!is_otx2_lbkvf(pf->pdev))
1316
+ otx2_nix_config_bp(pf, true);
13161317
13171318 /* Init Auras and pools used by NIX RQ, for free buffer ptrs */
13181319 err = otx2_rq_aura_pool_init(pf);
....@@ -1589,11 +1590,20 @@
15891590 otx2_config_pause_frm(pf);
15901591
15911592 err = otx2_rxtx_enable(pf, true);
1592
- if (err)
1593
+ /* If a mbox communication error happens at this point then interface
1594
+ * will end up in a state such that it is in down state but hardware
1595
+ * mcam entries are enabled to receive the packets. Hence disable the
1596
+ * packet I/O.
1597
+ */
1598
+ if (err == EIO)
1599
+ goto err_disable_rxtx;
1600
+ else if (err)
15931601 goto err_tx_stop_queues;
15941602
15951603 return 0;
15961604
1605
+err_disable_rxtx:
1606
+ otx2_rxtx_enable(pf, false);
15971607 err_tx_stop_queues:
15981608 netif_tx_stop_all_queues(netdev);
15991609 netif_carrier_off(netdev);