Re: [PATCH v1 2/2] scsi: ufs: core: Reduce the sleep before vcc can be powered on

From: Peter Wang (王信友)
Date: Thu Oct 02 2025 - 03:59:44 EST


On Wed, 2025-10-01 at 13:57 -0700, Bao D. Nguyen wrote:
>
> After the ufs device vcc is powered off, all the ufs device
> manufacturers require a minimum of 1ms of power-off time before
> vcc can be powered on again. This requirement has been verified
> with all the ufs device manufacturer's datasheets.
> Improve the system resume latency by reducing the required power-off
> time from 5ms to 2ms. The chosen 2ms should include enough
> additional buffer time without being wasteful.
>
> Signed-off-by: Bao D. Nguyen <quic_nguyenb@xxxxxxxxxxx>
> ---
>  drivers/ufs/core/ufshcd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 45e509b..83bd731 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -9741,7 +9741,7 @@ static void ufshcd_vreg_set_lpm(struct ufs_hba
> *hba)
>          * All UFS devices require delay after VCC power rail is
> turned-off.
>          */
>         if (vcc_off && hba->vreg_info.vcc)
> -               usleep_range(5000, 5100);
> +               usleep_range(2000, 2100);

Hi Bao,

This delay should be compatible with legacy devices.
The initial value was set to 5ms, does that mean there
is a device that actually needs 5ms?

Thanks
Peter