提交 6d8a833a 编写于 作者: Z Zhengchao Shao 提交者: Greg Kroah-Hartman

drivers: net: xgene: disable napi when register irq failed in xgene_enet_open()

[ Upstream commit ce9e57fe ]

When failed to register irq in xgene_enet_open() for opening device,
napi isn't disabled. When open xgene device next time, it will reports
a invalid opcode issue. Fix it. Only be compiled, not be tested.

Fixes: aeb20b6b ("drivers: net: xgene: fix: ifconfig up/down crash")
Signed-off-by: NZhengchao Shao <shaozhengchao@huawei.com>
Link: https://lore.kernel.org/r/20221107043032.357673-1-shaozhengchao@huawei.comSigned-off-by: NPaolo Abeni <pabeni@redhat.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 20479886
......@@ -1015,8 +1015,10 @@ static int xgene_enet_open(struct net_device *ndev)
xgene_enet_napi_enable(pdata);
ret = xgene_enet_register_irq(ndev);
if (ret)
if (ret) {
xgene_enet_napi_disable(pdata);
return ret;
}
if (ndev->phydev) {
phy_start(ndev->phydev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册