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.comAcked-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>
Showing
Please register or sign in to comment