]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: nixge: disable napi when enable interrupts failed in nixge_open()
authorZhengchao Shao <shaozhengchao@huawei.com>
Mon, 7 Nov 2022 10:14:43 +0000 (18:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Nov 2022 16:42:06 +0000 (17:42 +0100)
[ Upstream commit d9be8cb3235202d43ebd614bd9bc5d98523daf58 ]

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

Fixes: 2da75fbce8af ("net: ethernet: nixge: Add support for National Instruments XGE netdev")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Link: https://lore.kernel.org/r/20221107101443.120205-1-shaozhengchao@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/ni/nixge.c

index 56f285985b432d25acec3e5e89753f94edff1840..ffd44edfffbf3d385c9efbca3d9d188f4eacdcd8 100644 (file)
@@ -899,6 +899,7 @@ static int nixge_open(struct net_device *ndev)
 err_rx_irq:
        free_irq(priv->tx_irq, ndev);
 err_tx_irq:
+       napi_disable(&priv->napi);
        phy_stop(phy);
        phy_disconnect(phy);
        tasklet_kill(&priv->dma_err_tasklet);