Skip to content

Commit

Permalink
octeontx2-pf: Fix the device state on error
Browse files Browse the repository at this point in the history
Currently in otx2_open on failure of nix_lf_start
transmit queues are not stopped which are already
started in link_event. Since the tx queues are not
stopped network stack still try's to send the packets
leading to driver crash while access the device resources.

Fixes: 50fe6c0 ("octeontx2-pf: Register and handle link notifications")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hariprasad Kelam authored and David S. Miller committed Sep 30, 2020
1 parent 89eae5e commit 1ea0166
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1560,10 +1560,13 @@ int otx2_open(struct net_device *netdev)

err = otx2_rxtx_enable(pf, true);
if (err)
goto err_free_cints;
goto err_tx_stop_queues;

return 0;

err_tx_stop_queues:
netif_tx_stop_all_queues(netdev);
netif_carrier_off(netdev);
err_free_cints:
otx2_free_cints(pf, qidx);
vec = pci_irq_vector(pf->pdev,
Expand Down

0 comments on commit 1ea0166

Please sign in to comment.