]> git.ipfire.org Git - thirdparty/kernel/stable.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>
Wed, 16 Nov 2022 09:03:59 +0000 (10:03 +0100)
[ Upstream commit b06334919c7a068d54ba5b219c05e919d89943f7 ]

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: 492caffa8a1a ("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 4b3482ce90a1c14377fad2882c2d0bf7c62cf031..4fc279a1756294a6648d926a2b4da107b9c775ef 100644 (file)
@@ -900,6 +900,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);