mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
net: stmmac: ensure tx function is not running in stmmac_xdp_release()
[ Upstream commit77711683a5] 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:ac746c8520("net: stmmac: enhance XDP ZC driver level switching performance") Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com> Signed-off-by: Mohd Faizal Abdul Rahim <faizal.abdul.rahim@intel.com> Signed-off-by: Noor Azura Ahmad Tarmizi <noor.azura.ahmad.tarmizi@intel.com> Link: https://lore.kernel.org/r/20221110064552.22504-1-noor.azura.ahmad.tarmizi@linux.intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6219f46c2b
commit
8c54d706d8
@@ -6494,6 +6494,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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user