diff options
author | Zhengchao Shao <shaozhengchao@huawei.com> | 2022-11-09 09:15:37 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-11-09 18:30:40 -0800 |
commit | 6d47b53fb3f363a74538a1dbd09954af3d8d4131 (patch) | |
tree | 85e3d9f7f0417117e92626d6b309f93be2d78efb /drivers | |
parent | 27c064ae14d1a80c790ce019759500c95a2a9551 (diff) | |
download | lwn-6d47b53fb3f363a74538a1dbd09954af3d8d4131.tar.gz lwn-6d47b53fb3f363a74538a1dbd09954af3d8d4131.zip |
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. Compiled tested only.
Fixes: d354eb85d618 ("drivers: net: cpsw: dual_emac: simplify napi usage")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Link: https://lore.kernel.org/r/20221109011537.96975-1-shaozhengchao@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); } |