linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] scsi: ufs: Increase the UIC command timeout to 5 seconds
@ 2022-04-19  1:36 Bao D. Nguyen
  2022-04-19 15:13 ` Manivannan Sadhasivam
  0 siblings, 1 reply; 2+ messages in thread
From: Bao D. Nguyen @ 2022-04-19  1:36 UTC (permalink / raw)
  To: quic_cang, quic_asutoshd, martin.petersen, linux-scsi
  Cc: Bao D. Nguyen, linux-arm-msm, Alim Akhtar, Avri Altman,
	James E.J. Bottomley, Bart Van Assche, Bean Huo, Daejun Park,
	Adrian Hunter, Can Guo, Asutosh Das, open list

Increase the UIC command timeout to avoid false and unnecessary
UFS errors printout. There are increasing number of false UIC command
timeout error events where the actual cause of the issues is interrupt
starvation. When looking into these issues closely, it was clear that
the UIC command completed successfully, but the CPUs were hogged by other
subsystems for more than 500ms, causing a false UIC command timeout.

Increase the UIC command timeout to 5 seconds to avoid false and
time consuming support calls so that we can shift the focus to where
the real issue would be.

Signed-off-by: Bao D. Nguyen <quic_nguyenb@quicinc.com>
---
 drivers/scsi/ufs/ufshcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 3f9caaf..806acf4 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -35,7 +35,7 @@
 				 UTP_TASK_REQ_COMPL |\
 				 UFSHCD_ERROR_MASK)
 /* UIC command timeout, unit: ms */
-#define UIC_CMD_TIMEOUT	500
+#define UIC_CMD_TIMEOUT	5000
 
 /* NOP OUT retries waiting for NOP IN response */
 #define NOP_OUT_RETRIES    10
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


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

* Re: [PATCH v1 1/1] scsi: ufs: Increase the UIC command timeout to 5 seconds
  2022-04-19  1:36 [PATCH v1 1/1] scsi: ufs: Increase the UIC command timeout to 5 seconds Bao D. Nguyen
@ 2022-04-19 15:13 ` Manivannan Sadhasivam
  0 siblings, 0 replies; 2+ messages in thread
From: Manivannan Sadhasivam @ 2022-04-19 15:13 UTC (permalink / raw)
  To: Bao D. Nguyen
  Cc: quic_cang, quic_asutoshd, martin.petersen, linux-scsi,
	linux-arm-msm, Alim Akhtar, Avri Altman, James E.J. Bottomley,
	Bart Van Assche, Bean Huo, Daejun Park, Adrian Hunter, Can Guo,
	Asutosh Das, open list

On Mon, Apr 18, 2022 at 06:36:05PM -0700, Bao D. Nguyen wrote:
> Increase the UIC command timeout to avoid false and unnecessary
> UFS errors printout. There are increasing number of false UIC command
> timeout error events where the actual cause of the issues is interrupt
> starvation. When looking into these issues closely, it was clear that
> the UIC command completed successfully, but the CPUs were hogged by other
> subsystems for more than 500ms, causing a false UIC command timeout.
> 

UFS irq handler is a hardirq. Not sure how CPU starving can happen here.
Unless all CPUs are occupied by hardirq handlers from other subsystems.

Thanks,
Mani

> Increase the UIC command timeout to 5 seconds to avoid false and
> time consuming support calls so that we can shift the focus to where
> the real issue would be.
> 
> Signed-off-by: Bao D. Nguyen <quic_nguyenb@quicinc.com>
> ---
>  drivers/scsi/ufs/ufshcd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 3f9caaf..806acf4 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -35,7 +35,7 @@
>  				 UTP_TASK_REQ_COMPL |\
>  				 UFSHCD_ERROR_MASK)
>  /* UIC command timeout, unit: ms */
> -#define UIC_CMD_TIMEOUT	500
> +#define UIC_CMD_TIMEOUT	5000
>  
>  /* NOP OUT retries waiting for NOP IN response */
>  #define NOP_OUT_RETRIES    10
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 

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

end of thread, other threads:[~2022-04-19 15:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-19  1:36 [PATCH v1 1/1] scsi: ufs: Increase the UIC command timeout to 5 seconds Bao D. Nguyen
2022-04-19 15:13 ` Manivannan Sadhasivam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).