net: cpsw: disable napi in cpsw_ndo_open()
[ Upstream commit6d47b53fb3
] 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:d354eb85d6
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Родитель
1360778fdb
Коммит
960f9d30de
|
@ -856,6 +856,8 @@ static int cpsw_ndo_open(struct net_device *ndev)
|
||||||
|
|
||||||
err_cleanup:
|
err_cleanup:
|
||||||
if (!cpsw->usage_count) {
|
if (!cpsw->usage_count) {
|
||||||
|
napi_disable(&cpsw->napi_rx);
|
||||||
|
napi_disable(&cpsw->napi_tx);
|
||||||
cpdma_ctlr_stop(cpsw->dma);
|
cpdma_ctlr_stop(cpsw->dma);
|
||||||
cpsw_destroy_xdp_rxqs(cpsw);
|
cpsw_destroy_xdp_rxqs(cpsw);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче