2020-09-02 03:09:09

by Daejun Park

[permalink] [raw]
Subject: [PATCH] scsi: ufs: Fix NOP OUT timeout value

In some Samsung UFS devices, there is some booting fail issue with
low-power UFS device. The reason of this issue is the UFS device has a
little bit longer latency for NOP OUT response. It causes booting fail
because NOP OUT command is issued during initialization to check whether
the device transport protocol is ready or not. This issue is resolved by
releasing NOP_OUT_TIMEOUT value.

NOP_OUT_TIMEOUT: 30ms -> 50ms

Signed-off-by: Daejun Park <[email protected]>
---
drivers/scsi/ufs/ufshcd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 06e2439d523c..5cbd0e9e4ef8 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -36,8 +36,8 @@

/* NOP OUT retries waiting for NOP IN response */
#define NOP_OUT_RETRIES 10
-/* Timeout after 30 msecs if NOP OUT hangs without response */
-#define NOP_OUT_TIMEOUT 30 /* msecs */
+/* Timeout after 50 msecs if NOP OUT hangs without response */
+#define NOP_OUT_TIMEOUT 50 /* msecs */

/* Query request retries */
#define QUERY_REQ_RETRIES 3
--
2.17.1



2020-09-15 00:35:19

by Daejun Park

[permalink] [raw]
Subject: RE: [PATCH] scsi: ufs: Fix NOP OUT timeout value

> In some Samsung UFS devices, there is some booting fail issue with
> low-power UFS device. The reason of this issue is the UFS device has a
> little bit longer latency for NOP OUT response. It causes booting fail
> because NOP OUT command is issued during initialization to check whether
> the device transport protocol is ready or not. This issue is resolved by
> releasing NOP_OUT_TIMEOUT value.
>
> NOP_OUT_TIMEOUT: 30ms -> 50ms
>
> Signed-off-by: Daejun Park <[email protected]>
> ---
> drivers/scsi/ufs/ufshcd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 06e2439d523c..5cbd0e9e4ef8 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -36,8 +36,8 @@
>
> /* NOP OUT retries waiting for NOP IN response */
> #define NOP_OUT_RETRIES 10
> -/* Timeout after 30 msecs if NOP OUT hangs without response */
> -#define NOP_OUT_TIMEOUT 30 /* msecs */
> +/* Timeout after 50 msecs if NOP OUT hangs without response */
> +#define NOP_OUT_TIMEOUT 50 /* msecs */
>
> /* Query request retries */
> #define QUERY_REQ_RETRIES 3
> --
> 2.17.1

Hello,

Just a gentle reminder that I'd like some feedback.
Any suggestions here?

Thanks,
Daejun

2020-09-15 06:38:28

by Avri Altman

[permalink] [raw]
Subject: RE: [PATCH] scsi: ufs: Fix NOP OUT timeout value

>
>
> In some Samsung UFS devices, there is some booting fail issue with
> low-power UFS device. The reason of this issue is the UFS device has a
> little bit longer latency for NOP OUT response. It causes booting fail
> because NOP OUT command is issued during initialization to check whether
> the device transport protocol is ready or not. This issue is resolved by
> releasing NOP_OUT_TIMEOUT value.
>
> NOP_OUT_TIMEOUT: 30ms -> 50ms
>
> Signed-off-by: Daejun Park <[email protected]>
Acked-by: Avri Altman <[email protected]>

2020-09-15 07:16:03

by Daejun Park

[permalink] [raw]
Subject: RE: [PATCH] scsi: ufs: Fix NOP OUT timeout value

Hi Avri,

> > In some Samsung UFS devices, there is some booting fail issue with
> > low-power UFS device. The reason of this issue is the UFS device has a
> > little bit longer latency for NOP OUT response. It causes booting fail
> > because NOP OUT command is issued during initialization to check whether
> > the device transport protocol is ready or not. This issue is resolved by
> > releasing NOP_OUT_TIMEOUT value.
> >
> > NOP_OUT_TIMEOUT: 30ms -> 50ms
> >
> > Signed-off-by: Daejun Park <[email protected]>
> Acked-by: Avri Altman <[email protected]>

Thanks for the review.

Bart,
Could you review this patch, please?

Thanks,
Daejun

2020-09-16 00:15:47

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH] scsi: ufs: Fix NOP OUT timeout value


Daejun,

> In some Samsung UFS devices, there is some booting fail issue with
> low-power UFS device. The reason of this issue is the UFS device has a
> little bit longer latency for NOP OUT response. It causes booting fail
> because NOP OUT command is issued during initialization to check whether
> the device transport protocol is ready or not. This issue is resolved by
> releasing NOP_OUT_TIMEOUT value.

Applied to 5.10/scsi-staging, thanks!

--
Martin K. Petersen Oracle Linux Engineering

2020-09-22 06:16:33

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH] scsi: ufs: Fix NOP OUT timeout value

On Wed, 02 Sep 2020 11:58:52 +0900, Daejun Park wrote:

> In some Samsung UFS devices, there is some booting fail issue with
> low-power UFS device. The reason of this issue is the UFS device has a
> little bit longer latency for NOP OUT response. It causes booting fail
> because NOP OUT command is issued during initialization to check whether
> the device transport protocol is ready or not. This issue is resolved by
> releasing NOP_OUT_TIMEOUT value.
>
> [...]

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: ufs: Fix NOP OUT timeout value
https://git.kernel.org/mkp/scsi/c/782e2efb749f

--
Martin K. Petersen Oracle Linux Engineering