[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221109011537.96975-1-shaozhengchao@huawei.com>
Date: Wed, 9 Nov 2022 09:15:37 +0800
From: Zhengchao Shao <shaozhengchao@...wei.com>
To: <linux-omap@...r.kernel.org>, <netdev@...r.kernel.org>,
<bpf@...r.kernel.org>, <grygorii.strashko@...com>,
<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>
CC: <ast@...nel.org>, <daniel@...earbox.net>, <hawk@...nel.org>,
<john.fastabend@...il.com>, <chi.minghao@....com.cn>,
<mkl@...gutronix.de>, <wsa+renesas@...g-engineering.com>,
<ardb@...nel.org>, <yangyingliang@...wei.com>,
<mugunthanvnm@...com>, <weiyongjun1@...wei.com>,
<yuehaibing@...wei.com>, <shaozhengchao@...wei.com>
Subject: [PATCH net] net: cpsw: disable napi in cpsw_ndo_open()
When failed to create xdp rxqs or fill rx channels in cpsw_ndo_open() for
opening device, napi isn't disabled. When open cpsw device next time, it
will report a invalid opcode issue. Fix it. Only be compiled, not be
tested.
Fixes: d354eb85d618 ("drivers: net: cpsw: dual_emac: simplify napi usage")
Signed-off-by: Zhengchao Shao <shaozhengchao@...wei.com>
---
drivers/net/ethernet/ti/cpsw.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 709ca6dd6ecb..13c9c2d6b79b 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -854,6 +854,8 @@ static int cpsw_ndo_open(struct net_device *ndev)
err_cleanup:
if (!cpsw->usage_count) {
+ napi_disable(&cpsw->napi_rx);
+ napi_disable(&cpsw->napi_tx);
cpdma_ctlr_stop(cpsw->dma);
cpsw_destroy_xdp_rxqs(cpsw);
}
--
2.17.1
Powered by blists - more mailing lists