Skip to content

Commit b0c09c7

Browse files
zhengchaoshaoPaolo Abeni
authored andcommitted
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: 8c7bd5a ("net: ethernet: mtk-star-emac: new driver") Signed-off-by: Zhengchao Shao <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 3faf7e1 commit b0c09c7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/mediatek/mtk_star_emac.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,8 @@ static int mtk_star_enable(struct net_device *ndev)
10261026
return 0;
10271027

10281028
err_free_irq:
1029+
napi_disable(&priv->rx_napi);
1030+
napi_disable(&priv->tx_napi);
10291031
free_irq(ndev->irq, ndev);
10301032
err_free_skbs:
10311033
mtk_star_free_rx_skbs(priv);

0 commit comments

Comments
 (0)