]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ethernet: s2io: disable napi when start nic failed in s2io_card_up()
authorZhengchao Shao <shaozhengchao@huawei.com>
Wed, 9 Nov 2022 02:37:41 +0000 (10:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Nov 2022 16:36:46 +0000 (17:36 +0100)
commit0554bb01aa46383471b52a8bb12bac4966b08e71
tree872288383daf86ace10a32080110a0e062b64133
parent96223525284bd6129601b5e8c91eabef45af3e48
ethernet: s2io: disable napi when start nic failed in s2io_card_up()

[ Upstream commit 0348c1ab980c1d43fb37b758d4b760990c066cb5 ]

When failed to start nic or add interrupt service routine in
s2io_card_up() for opening device, napi isn't disabled. When open
s2io device next time, it will trigger a BUG_ON()in napi_enable().
Compile tested only.

Fixes: 5f490c968056 ("S2io: Fixed synchronization between scheduling of napi with card reset and close")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Link: https://lore.kernel.org/r/20221109023741.131552-1-shaozhengchao@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/neterion/s2io.c