]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: pm80xx: Avoid busywait in FW ready check
authorakshatzen <akshatzen@google.com>
Mon, 2 Nov 2020 16:55:27 +0000 (22:25 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 5 Nov 2020 03:55:38 +0000 (22:55 -0500)
commit9224d84f47d67d72a470547db272041db87963f4
tree45dc0bd68e8e0b5ea369949676719bfd6b1c5fec
parent470eb7b52b86ba0fc0c05a15fab16665296c60a3
scsi: pm80xx: Avoid busywait in FW ready check

In function check_fw_ready() we busy wait using udelay. The CPU is not
released and we see need_resched failures.

Busy waiting is not necessary since we are in process context and we can
sleep instead. Replace udelay with msleep of 20 ms intervals while waiting
for firmware to become ready.

It has been verified that check_fw_ready is not being used in interrupt
context anywhere, hence it is safe to make this change.

Link: https://lore.kernel.org/r/20201102165528.26510-4-Viswas.G@microchip.com.com
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: akshatzen <akshatzen@google.com>
Signed-off-by: Viswas G <Viswas.G@microchip.com>
Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com>
Signed-off-by: Radha Ramachandran <radha@google.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pm8001/pm80xx_hwi.c
drivers/scsi/pm8001/pm80xx_hwi.h