Patch "net: stmmac: ensure tx function is not running in stmmac_xdp_release()" has been added to the 6.0-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

    net: stmmac: ensure tx function is not running in stmmac_xdp_release()

to the 6.0-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:
     net-stmmac-ensure-tx-function-is-not-running-in-stmm.patch
and it can be found in the queue-6.0 subdirectory.

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



commit 653df8452802e92ed3509ea1b16128979ccaf2a6
Author: Mohd Faizal Abdul Rahim <faizal.abdul.rahim@xxxxxxxxx>
Date:   Thu Nov 10 14:45:52 2022 +0800

    net: stmmac: ensure tx function is not running in stmmac_xdp_release()
    
    [ Upstream commit 77711683a50477de39757d67ab1a3638220d6860 ]
    
    When stmmac_xdp_release() is called, there is a possibility that tx
    function is still running on other queues which will lead to tx queue
    timed out and reset adapter.
    
    This commit ensure that tx function is not running xdp before release
    flow continue to run.
    
    Fixes: ac746c8520d9 ("net: stmmac: enhance XDP ZC driver level switching performance")
    Signed-off-by: Song Yoong Siang <yoong.siang.song@xxxxxxxxx>
    Signed-off-by: Mohd Faizal Abdul Rahim <faizal.abdul.rahim@xxxxxxxxx>
    Signed-off-by: Noor Azura Ahmad Tarmizi <noor.azura.ahmad.tarmizi@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20221110064552.22504-1-noor.azura.ahmad.tarmizi@xxxxxxxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index bc060ef558d3..02827829463f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -6564,6 +6564,9 @@ void stmmac_xdp_release(struct net_device *dev)
 	struct stmmac_priv *priv = netdev_priv(dev);
 	u32 chan;
 
+	/* Ensure tx function is not running */
+	netif_tx_disable(dev);
+
 	/* Disable NAPI process */
 	stmmac_disable_all_queues(priv);
 



[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