Skip to content

Commit ce9e57f

Browse files
zhengchaoshaoPaolo Abeni
authored and
Paolo Abeni
committed
drivers: net: xgene: disable napi when register irq failed in xgene_enet_open()
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: aeb20b6 ("drivers: net: xgene: fix: ifconfig up/down crash") Signed-off-by: Zhengchao Shao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent f0dfc4c commit ce9e57f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/apm/xgene/xgene_enet_main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,8 +1004,10 @@ static int xgene_enet_open(struct net_device *ndev)
10041004

10051005
xgene_enet_napi_enable(pdata);
10061006
ret = xgene_enet_register_irq(ndev);
1007-
if (ret)
1007+
if (ret) {
1008+
xgene_enet_napi_disable(pdata);
10081009
return ret;
1010+
}
10091011

10101012
if (ndev->phydev) {
10111013
phy_start(ndev->phydev);

0 commit comments

Comments
 (0)