Patch "octeontx2-pf: Disable packet I/O for graceful exit" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    octeontx2-pf: Disable packet I/O for graceful exit

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     octeontx2-pf-disable-packet-i-o-for-graceful-exit.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1dc1167ed4f9a188a7bda1e3308a9a3cf23e7e3e
Author: Subbaraya Sundeep <sbhatta@xxxxxxxxxxx>
Date:   Wed May 3 12:39:43 2023 +0530

    octeontx2-pf: Disable packet I/O for graceful exit
    
    [ Upstream commit c926252205c424c4842dbdbe02f8e3296f623204 ]
    
    At the stage of enabling packet I/O in otx2_open, If mailbox
    timeout occurs then interface ends up in down state where as
    hardware packet I/O is enabled. Hence disable packet I/O also
    before bailing out.
    
    Fixes: 1ea0166da050 ("octeontx2-pf: Fix the device state on error")
    Signed-off-by: Subbaraya Sundeep <sbhatta@xxxxxxxxxxx>
    Signed-off-by: Sunil Kovvuri Goutham <sgoutham@xxxxxxxxxxx>
    Signed-off-by: Sai Krishna <saikrishnag@xxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
index 161174be51c31..54aeb276b9a0a 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
@@ -1589,11 +1589,20 @@ int otx2_open(struct net_device *netdev)
 	otx2_config_pause_frm(pf);
 
 	err = otx2_rxtx_enable(pf, true);
-	if (err)
+	/* If a mbox communication error happens at this point then interface
+	 * will end up in a state such that it is in down state but hardware
+	 * mcam entries are enabled to receive the packets. Hence disable the
+	 * packet I/O.
+	 */
+	if (err == EIO)
+		goto err_disable_rxtx;
+	else if (err)
 		goto err_tx_stop_queues;
 
 	return 0;
 
+err_disable_rxtx:
+	otx2_rxtx_enable(pf, false);
 err_tx_stop_queues:
 	netif_tx_stop_all_queues(netdev);
 	netif_carrier_off(netdev);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux