diff options
author | Mike McGowen <[email protected]> | 2021-09-28 18:54:39 -0500 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2021-10-05 00:13:15 -0400 |
commit | 987d35605b7e82745bf69104611725d6505ed5a3 (patch) | |
tree | 2956d4fbb2d38ededcfa9ab6d332fd5adc494040 | |
parent | 28ca6d876c5a375094847606046e0bf5d044d9b4 (diff) |
scsi: smartpqi: Fix boot failure during LUN rebuild
Move the delay in the register polling loop to the beginning of the loop to
ensure there is always a delay between writing the register and reading it.
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Scott Benesh <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Acked-by: John Donnelly <[email protected]>
Signed-off-by: Mike McGowen <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r-- | drivers/scsi/smartpqi/smartpqi_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 1e27e6ba0159..c28eb7ea4a24 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -4278,12 +4278,12 @@ static int pqi_create_admin_queues(struct pqi_ctrl_info *ctrl_info) timeout = PQI_ADMIN_QUEUE_CREATE_TIMEOUT_JIFFIES + jiffies; while (1) { + msleep(PQI_ADMIN_QUEUE_CREATE_POLL_INTERVAL_MSECS); status = readb(&pqi_registers->function_and_status_code); if (status == PQI_STATUS_IDLE) break; if (time_after(jiffies, timeout)) return -ETIMEDOUT; - msleep(PQI_ADMIN_QUEUE_CREATE_POLL_INTERVAL_MSECS); } /* |