diff options
author | Mohd Faizal Abdul Rahim <[email protected]> | 2022-11-10 14:45:52 +0800 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2022-11-11 19:59:36 -0800 |
commit | 77711683a50477de39757d67ab1a3638220d6860 (patch) | |
tree | 8cd682d3ba7c3142bf273a45a4d55e4d753a7076 | |
parent | e2a54350dc9642e7dfc07335ca355581caa9dbfe (diff) |
net: stmmac: ensure tx function is not running in stmmac_xdp_release()
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 <[email protected]>
Signed-off-by: Mohd Faizal Abdul Rahim <[email protected]>
Signed-off-by: Noor Azura Ahmad Tarmizi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 8273e6a175c8..6b43da78cdf0 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -6548,6 +6548,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); |