提交 b0c09c7f 编写于 作者: Z Zhengchao Shao 提交者: Paolo Abeni

net: ethernet: mtk-star-emac: disable napi when connect and start PHY failed in mtk_star_enable()

When failed to connect to and start PHY in mtk_star_enable() for opening
device, napi isn't disabled. When open mtk star device next time, it will
reports a invalid opcode issue. Fix it. Only be compiled, not be tested.

Fixes: 8c7bd5a4 ("net: ethernet: mtk-star-emac: new driver")
Signed-off-by: NZhengchao Shao <shaozhengchao@huawei.com>
Reviewed-by: NLeon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/20221107012159.211387-1-shaozhengchao@huawei.comSigned-off-by: NPaolo Abeni <pabeni@redhat.com>
上级 3faf7e14
...@@ -1026,6 +1026,8 @@ static int mtk_star_enable(struct net_device *ndev) ...@@ -1026,6 +1026,8 @@ static int mtk_star_enable(struct net_device *ndev)
return 0; return 0;
err_free_irq: err_free_irq:
napi_disable(&priv->rx_napi);
napi_disable(&priv->tx_napi);
free_irq(ndev->irq, ndev); free_irq(ndev->irq, ndev);
err_free_skbs: err_free_skbs:
mtk_star_free_rx_skbs(priv); mtk_star_free_rx_skbs(priv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册