Thread (6 messages) 6 messages, 2 authors, 2021-04-06
STALE1940d REVIEWED: 1 (0M)
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 1/2] scsi: pm80xx: Increase timeout for pm80xx mpi_uninit_check()

From: Igor Pylypiv <hidden>
Date: 2021-03-29 18:38:12
Subsystem: pmc sierra pm8001 driver, scsi subsystem, the rest · Maintainers: Jack Wang, "James E.J. Bottomley", "Martin K. Petersen", Linus Torvalds

The mpi_uninit_check() takes longer for inbound doorbell register to be
cleared. Increased the timeout substantially so that the driver does not
fail to load.

Previously, the inbound doorbell wait time was mistakenly increased in
the mpi_init_check() instead of the mpi_uninit_check(). It is okay to
leave the mpi_init_check() wait time as is as these are timeout values
and if there is a failure, waiting longer is not an issue.

Fixes: e90e236250e9 ("scsi: pm80xx: Increase timeout for pm80xx
mpi_uninit_check")
Reviewed-by: Vishakha Channapattan <redacted>
Signed-off-by: Igor Pylypiv <redacted>
---
 drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index 84315560e8e1..a6f65666c98e 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -1502,9 +1502,9 @@ static int mpi_uninit_check(struct pm8001_hba_info *pm8001_ha)
 
 	/* wait until Inbound DoorBell Clear Register toggled */
 	if (IS_SPCV_12G(pm8001_ha->pdev)) {
-		max_wait_count = 4 * 1000 * 1000;/* 4 sec */
+		max_wait_count = (30 * 1000 * 1000) /* 30 sec */
 	} else {
-		max_wait_count = 2 * 1000 * 1000;/* 2 sec */
+		max_wait_count = (15 * 1000 * 1000) /* 15 sec */
 	}
 	do {
 		udelay(1);
-- 
2.31.0.291.g576ba9dcdaf-goog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help