]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: cxgb3_main: disable napi when bind qsets failed in cxgb_up()
authorZhengchao Shao <shaozhengchao@huawei.com>
Wed, 9 Nov 2022 02:14:51 +0000 (10:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Nov 2022 16:42:07 +0000 (17:42 +0100)
[ Upstream commit 58e90f51a1a09673cddd1f9e30525104e052662f ]

When failed to bind qsets in cxgb_up() for opening device, napi isn't
disabled. When open cxgb3 device next time, it will trigger a BUG_ON()
in napi_enable(). Compile tested only.

Fixes: a87452701db0 ("cxgb3 - fix port up/down error path")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Link: https://lore.kernel.org/r/20221109021451.121490-1-shaozhengchao@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c

index 97ff8608f0ab2b251050462d4f7cd67bd70e719d..b0fd22cbeef4e045236bc9c2729847a9bcfdf430 100644 (file)
@@ -1303,6 +1303,7 @@ static int cxgb_up(struct adapter *adap)
                if (ret < 0) {
                        CH_ERR(adap, "failed to bind qsets, err %d\n", ret);
                        t3_intr_disable(adap);
+                       quiesce_rx(adap);
                        free_irq_resources(adap);
                        err = ret;
                        goto out;