[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4e58fa6c-ddec-a6a9-fb8b-5f4ffa12fbc3@quicinc.com>
Date: Fri, 3 Oct 2025 14:11:37 -0700
From: "Bao D. Nguyen" <quic_nguyenb@...cinc.com>
To: Peter Wang (王信友) <peter.wang@...iatek.com>,
"avri.altman@....com" <avri.altman@....com>,
"quic_cang@...cinc.com"
<quic_cang@...cinc.com>,
"quic_nitirawa@...cinc.com"
<quic_nitirawa@...cinc.com>,
"manivannan.sadhasivam@...aro.org"
<manivannan.sadhasivam@...aro.org>,
"bvanassche@....org"
<bvanassche@....org>,
"adrian.hunter@...el.com" <adrian.hunter@...el.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>
CC: "beanhuo@...ron.com" <beanhuo@...ron.com>,
"chu.stanley@...il.com"
<chu.stanley@...il.com>,
"quic_mapa@...cinc.com" <quic_mapa@...cinc.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"AngeloGioacchino
Del Regno" <angelogioacchino.delregno@...labora.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
"linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"matthias.bgg@...il.com"
<matthias.bgg@...il.com>,
"James.Bottomley@...senPartnership.com"
<James.Bottomley@...senPartnership.com>,
"mani@...nel.org" <mani@...nel.org>,
"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v1 1/2] scsi: ufs: core: Remove
UFS_DEVICE_QUIRK_DELAY_AFTER_LPM quirk
On 10/2/2025 8:10 PM, Peter Wang (王信友) wrote:
> On Thu, 2025-10-02 at 11:48 -0700, Bao D. Nguyen wrote:
>>
>>
>> Hi Peter,
>>
>> The current Mediatek platform driver applies this quirk to all ufs
>> vendors which is consistent with what we would like to do in the
>> Qualcomm platform driver per the vendor's requests.
>>
>> I do see that, about 5 years ago, Mediatek merged a patch to keep the
>> device vcc always on, probably to workaround some HW issues. Since
>
> Hi Bao,
>
> Yes, some UFS devices may have issues when turning off VCC.
>
>> this
>> is a very old patch and the impact of this change on a broken
>> hardware
>> is minimal, I would like weight the benefit of cleaning up the ufs
>> core
>> driver by removing the unnecessary quirk
>> UFS_DEVICE_QUIRK_DELAY_AFTER_LPM vs the inconvenience of a 5ms
>> (potentially reduce to 2ms) delay impact it may cause on an old
>> broken
>> HW in the suspend/shutdown path.
>>
>> I believe removing the UFS_DEVICE_QUIRK_DELAY_AFTER_LPM quirk in the
>> ufs
>> core driver as well as all the platform drivers yields positive net
>> benefits in this case.
>>
>> Thanks, Bao
>>
>>
>
> I think you misunderstood my point.
> I am okay with removing this flag, but this patch will cause
> devices with VCC always on to unnecessarily wait for the
> delay, resulting in wasted time.
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.
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
>
> Thanks
> Peter
>
>
Powered by blists - more mailing lists