diff mbox series

scsi: ufs: Enable HOST_PA_TACTIVATE quirk for WDC UFS devices

Message ID 1580977315-19321-1-git-send-email-cang@codeaurora.org (mailing list archive)
State Superseded
Headers show
Series scsi: ufs: Enable HOST_PA_TACTIVATE quirk for WDC UFS devices | expand

Commit Message

Can Guo Feb. 6, 2020, 8:21 a.m. UTC
Western Digital UFS devices require host PA_TACTIVATE to be lower than
device PA_TACTIVATE, otherwise it may get stuck during hibern8 sequence.

Signed-off-by: Can Guo <cang@codeaurora.org>

Comments

Avri Altman Feb. 6, 2020, 1:21 p.m. UTC | #1
Hi,
 
> 
> Western Digital UFS devices require host PA_TACTIVATE to be lower than
> device PA_TACTIVATE, otherwise it may get stuck during hibern8 sequence.
> 
> Signed-off-by: Can Guo <cang@codeaurora.org>

Please allow few more days to consult internally about this.
Thanks,
Avri
Avri Altman Feb. 20, 2020, 6:20 a.m. UTC | #2
Hi,

> 
>  /**
>   * ufs_dev_fix - ufs device quirk info
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 1fe0a97..a066f00 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -239,6 +239,8 @@ struct ufs_pm_lvl_states ufs_pm_lvl_states[] = {
>                 UFS_DEVICE_QUIRK_HOST_PA_SAVECONFIGTIME),
>         UFS_FIX(UFS_VENDOR_SKHYNIX, "hB8aL1" /*H28U62301AMR*/,
>                 UFS_DEVICE_QUIRK_HOST_VS_DEBUGSAVECONFIGTIME),
> +       UFS_FIX(UFS_VENDOR_WDC, UFS_ANY_MODEL,
> +               UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE),
We are objecting to apply this quirk categorically for all SOC vendors.
Please use a vendor-specific quirk for that.

Thanks,
Avri
Can Guo Feb. 20, 2020, 6:34 a.m. UTC | #3
On 2020-02-20 14:20, Avri Altman wrote:
> Hi,
> 
>> 
>>  /**
>>   * ufs_dev_fix - ufs device quirk info
>> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
>> index 1fe0a97..a066f00 100644
>> --- a/drivers/scsi/ufs/ufshcd.c
>> +++ b/drivers/scsi/ufs/ufshcd.c
>> @@ -239,6 +239,8 @@ struct ufs_pm_lvl_states ufs_pm_lvl_states[] = {
>>                 UFS_DEVICE_QUIRK_HOST_PA_SAVECONFIGTIME),
>>         UFS_FIX(UFS_VENDOR_SKHYNIX, "hB8aL1" /*H28U62301AMR*/,
>>                 UFS_DEVICE_QUIRK_HOST_VS_DEBUGSAVECONFIGTIME),
>> +       UFS_FIX(UFS_VENDOR_WDC, UFS_ANY_MODEL,
>> +               UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE),
> We are objecting to apply this quirk categorically for all SOC vendors.
> Please use a vendor-specific quirk for that.
> 
> Thanks,
> Avri

Yeah, as we discussed, I will apply it in ufshcd_vops_apply_dev_quirks()
in next version and this is agreed by Stanley as well.
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufs_quirks.h b/drivers/scsi/ufs/ufs_quirks.h
index d0ab147..df7a1e6 100644
--- a/drivers/scsi/ufs/ufs_quirks.h
+++ b/drivers/scsi/ufs/ufs_quirks.h
@@ -15,6 +15,7 @@ 
 #define UFS_VENDOR_TOSHIBA     0x198
 #define UFS_VENDOR_SAMSUNG     0x1CE
 #define UFS_VENDOR_SKHYNIX     0x1AD
+#define UFS_VENDOR_WDC         0x145
 
 /**
  * ufs_dev_fix - ufs device quirk info
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 1fe0a97..a066f00 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -239,6 +239,8 @@  struct ufs_pm_lvl_states ufs_pm_lvl_states[] = {
 		UFS_DEVICE_QUIRK_HOST_PA_SAVECONFIGTIME),
 	UFS_FIX(UFS_VENDOR_SKHYNIX, "hB8aL1" /*H28U62301AMR*/,
 		UFS_DEVICE_QUIRK_HOST_VS_DEBUGSAVECONFIGTIME),
+	UFS_FIX(UFS_VENDOR_WDC, UFS_ANY_MODEL,
+		UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE),
 
 	END_FIX
 };