提交 77711683 编写于 作者: M Mohd Faizal Abdul Rahim 提交者: Jakub Kicinski

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: ac746c85 ("net: stmmac: enhance XDP ZC driver level switching performance")
Signed-off-by: NSong Yoong Siang <yoong.siang.song@intel.com>
Signed-off-by: NMohd Faizal Abdul Rahim <faizal.abdul.rahim@intel.com>
Signed-off-by: NNoor Azura Ahmad Tarmizi <noor.azura.ahmad.tarmizi@intel.com>
Link: https://lore.kernel.org/r/20221110064552.22504-1-noor.azura.ahmad.tarmizi@linux.intel.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 e2a54350
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册