All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: ufs: Increase the START STOP UNIT timeout from 1 s to 10 s
@ 2023-04-11  0:11 Bart Van Assche
  2023-04-11  8:39 ` Adrian Hunter
  0 siblings, 1 reply; 7+ messages in thread
From: Bart Van Assche @ 2023-04-11  0:11 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: Jaegeuk Kim, Avri Altman, Adrian Hunter, linux-scsi,
	Bart Van Assche, James E.J. Bottomley, Bean Huo, Stanley Chu,
	Asutosh Das

One UFS vendor asked to increase the UFS timeout from 1 s to 3 s.
Another UFS vendor asked to increase the UFS timeout from 1 s to 10 s.
Hence this patch that increases the UFS timeout to 10 s. This patch can
cause the total timeout to exceed 20 s, the Android shutdown timeout.
This is fine since the loop around ufshcd_execute_start_stop() exists to
deal with unit attentions and because unit attentions are reported
quickly.

Fixes: dcd5b7637c6d ("scsi: ufs: Reduce the START STOP UNIT timeout")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/ufs/core/ufshcd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 03c47f9a2750..8363a1667feb 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -9181,7 +9181,8 @@ static int ufshcd_execute_start_stop(struct scsi_device *sdev,
 	};
 
 	return scsi_execute_cmd(sdev, cdb, REQ_OP_DRV_IN, /*buffer=*/NULL,
-			/*bufflen=*/0, /*timeout=*/HZ, /*retries=*/0, &args);
+			/*bufflen=*/0, /*timeout=*/10 * HZ, /*retries=*/0,
+			&args);
 }
 
 /**

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-04-12 17:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-11  0:11 [PATCH] scsi: ufs: Increase the START STOP UNIT timeout from 1 s to 10 s Bart Van Assche
2023-04-11  8:39 ` Adrian Hunter
2023-04-11 17:31   ` Bart Van Assche
2023-04-11 18:31     ` Adrian Hunter
2023-04-12 16:34       ` Bart Van Assche
2023-04-12 17:24         ` Adrian Hunter
2023-04-12 17:31           ` Bart Van Assche

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.