2020-02-24 04:12:02

by Can Guo

[permalink] [raw]
Subject: [PATCH v2 1/2] scsi: ufs: Allow vendor apply device quirks in advance

Currently ufshcd_vops_apply_dev_quirks() comes after all UniPro parameters
have been tuned. Move it up so that vendors have a chance to apply device
quirks in advance.

Signed-off-by: Can Guo <[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 abd0e6b..03af432 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -6804,14 +6804,14 @@ static void ufshcd_tune_unipro_params(struct ufs_hba *hba)
ufshcd_tune_pa_hibern8time(hba);
}

+ ufshcd_vops_apply_dev_quirks(hba);
+
if (hba->dev_quirks & UFS_DEVICE_QUIRK_PA_TACTIVATE)
/* set 1ms timeout for PA_TACTIVATE */
ufshcd_dme_set(hba, UIC_ARG_MIB(PA_TACTIVATE), 10);

if (hba->dev_quirks & UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE)
ufshcd_quirk_tune_host_pa_tactivate(hba);
-
- ufshcd_vops_apply_dev_quirks(hba);
}

static void ufshcd_clear_dbg_ufs_stats(struct ufs_hba *hba)
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


2020-02-24 04:41:22

by Stanley Chu

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] scsi: ufs: Allow vendor apply device quirks in advance

Hi Can,

On Sun, 2020-02-23 at 20:09 -0800, Can Guo wrote:
> Currently ufshcd_vops_apply_dev_quirks() comes after all UniPro parameters
> have been tuned. Move it up so that vendors have a chance to apply device
> quirks in advance.
>
> Signed-off-by: Can Guo <[email protected]>

As discussed, ufs-mediatek needs to do corresponding patch and I will
submit it once this commit is merged.

Reviewed-by: Stanley Chu <[email protected]>

2020-02-24 04:54:45

by Can Guo

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] scsi: ufs: Allow vendor apply device quirks in advance

Hi Stanley,

On 2020-02-24 12:39, Stanley Chu wrote:
> Hi Can,
>
> On Sun, 2020-02-23 at 20:09 -0800, Can Guo wrote:
>> Currently ufshcd_vops_apply_dev_quirks() comes after all UniPro
>> parameters
>> have been tuned. Move it up so that vendors have a chance to apply
>> device
>> quirks in advance.
>>
>> Signed-off-by: Can Guo <[email protected]>
>
> As discussed, ufs-mediatek needs to do corresponding patch and I will
> submit it once this commit is merged.
>
> Reviewed-by: Stanley Chu <[email protected]>

Yes, sure, thanks for your cooperation. :)

Best Regards,
Can Guo.