Re: [PATCH v1 1/2] scsi: ufs: core: Remove UFS_DEVICE_QUIRK_DELAY_AFTER_LPM quirk

From: Peter Wang (王信友)

Date: Tue Oct 07 2025 - 03:02:28 EST


On Fri, 2025-10-03 at 14:11 -0700, Bao D. Nguyen wrote:
> Are you referring to the always_on flag in the struct ufs_vreg? I
> believe currently the ufs_vreg's always_on flag isn't used in
> determining whether the delay is applied or not.
>

Hi Bao,

Yes, I mean vreg_info.vcc->always_on = true.
Before your change, Mediatek would set always_on = true
and remove UFS_DEVICE_QUIRK_DELAY_AFTER_LPM to disable
this delay.


> How about we add the check for the Vcc's always_on as shown below?
> The Mediatek's workaround can avoid the extra delay by setting the
> always_on flag as it already did, without using the
> UFS_DEVICE_QUIRK_DELAY_AFTER_LPM.
>
> if (vcc_off && hba->vreg_info.vcc && !hba->vreg_info.vcc->always_on)
>         usleep_range(5000, 5100);
>
> Thanks, Bao
>
>

Yes, I believe this is the correct way to do it.

Thanks
Peter