net/qla3xxx: fix schedule while atomic in ql_wait_for_drvr_lock and ql_adapter_reset
authorLetu Ren <fantasquex@gmail.com>
Sun, 25 Jul 2021 13:45:12 +0000 (21:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Aug 2021 11:22:20 +0000 (13:22 +0200)
commit8cfdd039ca186adc332170818940f287d29c921c
treec9d0ee9cc256b5adb918c6256f2ed7badc873c19
parentfbbb209268e5d4fff68c63812e62d7fe45cd0223
net/qla3xxx: fix schedule while atomic in ql_wait_for_drvr_lock and ql_adapter_reset

[ Upstream commit 92766c4628ea349c8ddab0cd7bd0488f36e5c4ce ]

When calling the 'ql_wait_for_drvr_lock' and 'ql_adapter_reset', the driver
has already acquired the spin lock, so the driver should not call 'ssleep'
in atomic context.

This bug can be fixed by using 'mdelay' instead of 'ssleep'.

Reported-by: Letu Ren <fantasquex@gmail.com>
Signed-off-by: Letu Ren <fantasquex@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qlogic/qla3xxx.c