scsi: ufs: modify Tactive time setting conditions
A message that is not in the archive (sent off-list or not yet received): CGME20220107095451epcas2p2d06b23e50cbd46e910532e2d9078c912@epcas2p2.samsung.com
PATCH v2 1/1 scsi: ufs: modify Tactive time setting conditions
The Tactive time determine the waiting time before burst at hibern8 exit and is determined by H/W at linkup state However, in the case of samsung devices, guided host's Tactive time +100us for stability.
If the HCI's Tactive time is equal or greater than the device, +100us should be set.
--- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ufs/ufshcd.c +1 -1
@@ -7815,7 +7815,7 @@ static int ufshcd_quirk_tune_host_pa_tactivate(struct ufs_hba *hba) peer_pa_tactivate_us = peer_pa_tactivate * gran_to_us_table[peer_granularity -1 ]; -if (pa_tactivate_us > peer_pa_tactivate_us) { +if (pa_tactivate_us >= peer_pa_tactivate_us) {u32 new_peer_pa_tactivate; new_peer_pa_tactivate = pa_tactivate_us /
Signature · 1 line
2.26.0
Quoted 6 lines
The Tactive time determine the waiting time before burst at hibern8 exit and is determined by H/W at linkup state However, in the case of samsung devices, guided host's Tactive time +100us for stability.
If the HCI's Tactive time is equal or greater than the device, +100us should be set.
This way you are changing this for everyone - not just for Samsung. e.g. Qualcomm are using this quirk as well for WDC devices.
Thanks,
Avri
Quoted 22 lines
Signed-off-by SEO HOYOUNG <[email protected]>--- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/ufs/ufshcd.c +1
-1@@ -7815,7 +7815,7 @@ static int ufshcd_quirk_tune_host_pa_tactivate(struct ufs_hba *hba) peer_pa_tactivate_us = peer_pa_tactivate * gran_to_us_table[peer_granularity -1 ]; -if (pa_tactivate_us > peer_pa_tactivate_us) { +if (pa_tactivate_us >= peer_pa_tactivate_us) {u32 new_peer_pa_tactivate;
new_peer_pa_tactivate=pa_tactivate_us/
--
2.26.0
Hi,
If register "UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE" quirk,
using this Tact time function.
And I mean all Samsung device use UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE quirk below this. so I told that.
static struct ufs_dev_fix ufs_fixups[] = {
/* UFS cards deviations table */
UFS_FIX(UFS_VENDOR_MICRON, UFS_ANY_MODEL,
UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM |
UFS_DEVICE_QUIRK_SWAP_L2P_ENTRY_FOR_HPB_READ),
UFS_FIX(UFS_VENDOR_SAMSUNG, UFS_ANY_MODEL,
UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM |
UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE |Other vendors can use it if necessary.
And for stability, the device tact time must be longer than host tact time. (I already check Major device vendors)
That's reason why use this function.
But the Host tact time and Device tact time same, stability may not be satisfied. So I changed this way
Thanks,
HOYOUNG.
Quoted 44 lines
-----Original Message-----
From: Avri Altman [mailto:[email protected]]
Sent: Friday, January 7, 2022 7:57 PM
To: SEO HOYOUNG; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: RE: [PATCH v2] scsi: ufs: modify Tactive time setting conditionsQuoted 6 lines
The Tactive time determine the waiting time before burst at hibern8 exit and is determined by H/W at linkup state However, in the case of samsung devices, guided host's Tactive time
+100us for stability.
If the HCI's Tactive time is equal or greater than the device, +100us should be set.This way you are changing this for everyone - not just for Samsung. e.g. Qualcomm are using this quirk as well for WDC devices.
Thanks,
AvriQuoted 23 lines
Signed-off-by SEO HOYOUNG <[email protected]>--- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/ufs/ufshcd.c +0
-0@@ -7815,7 +7815,7 @@ static intufshcd_quirk_tune_host_pa_tactivate(struct
ufs_hba*hba)
peer_pa_tactivate_us=peer_pa_tactivate*
gran_to_us_table[peer_granularity - 1];drivers/scsi/ufs/ufshcd.c +1
-2-if (pa_tactivate_us > peer_pa_tactivate_us) { +if (pa_tactivate_us >= peer_pa_tactivate_us) {u32 new_peer_pa_tactivate; new_peer_pa_tactivate = pa_tactivate_us / --2.26.0
Quoted 15 lines
Hi,
If register "UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE" quirk, using this Tact time function.
And I mean all Samsung device useUFS_DEVICE_QUIRK_HOST_PA_TACTIVATEquirk below this. so I told that.static struct ufs_dev_fix ufs_fixups[] = { /* UFS cards deviations table */ UFS_FIX(UFS_VENDOR_MICRON, UFS_ANY_MODEL, UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM | UFS_DEVICE_QUIRK_SWAP_L2P_ENTRY_FOR_HPB_READ), UFS_FIX(UFS_VENDOR_SAMSUNG, UFS_ANY_MODEL, UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM | UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE |
Quoted 6 lines
Other vendors can use it if necessary.
And for stability, the device tact time must be longer than host tact time. (I already check Major device vendors)
That's reason why use this function.
But the Host tact time and Device tact time same, stability may not be satisfied. So I changed this way
Yes - I agree.
Looks good to me.
Thanks,
Avri
Quoted 50 lines
Thanks,
HOYOUNG.Quoted 5 lines
-----Original Message-----
From: Avri Altman [mailto:[email protected]]
Sent: Friday, January 7, 2022 7:57 PM
To: SEO HOYOUNG; [email protected]; [email protected]; [email protected]; [email protected];Quoted 39 lines
[email protected]; [email protected]; [email protected]; [email protected]
Subject: RE: [PATCH v2] scsi: ufs: modify Tactive time setting conditionsQuoted 6 lines
The Tactive time determine the waiting time before burst at hibern8 exit and is determined by H/W at linkup state However, in the case of samsung devices, guided host's Tactive time
+100us for stability.
If the HCI's Tactive time is equal or greater than the device, +100us should be set.This way you are changing this for everyone - not just for Samsung. e.g. Qualcomm are using this quirk as well for WDC devices.
Thanks,
AvriQuoted 23 lines
Signed-off-by SEO HOYOUNG <[email protected]>--- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/ufs/ufshcd.c +0
-0@@ -7815,7 +7815,7 @@ static intufshcd_quirk_tune_host_pa_tactivate(struct
ufs_hba*hba)
peer_pa_tactivate_us=peer_pa_tactivate*
gran_to_us_table[peer_granularity - 1];drivers/scsi/ufs/ufshcd.c +1
-2-if (pa_tactivate_us > peer_pa_tactivate_us) { +if (pa_tactivate_us >= peer_pa_tactivate_us) {u32 new_peer_pa_tactivate; new_peer_pa_tactivate = pa_tactivate_us / --2.26.0
Martin K. Petersen
AppliedQuoted 3 lines
If register "
UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE" quirk, using this Tact time function.
Applied to 5.17/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Hello Seo Hoyoung,
Quoted 17 lines
-----Original Message-----
From: SEO HOYOUNG [mailto:[email protected]]
Sent: Friday, January 7, 2022 3:09 AM
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: SEO HOYOUNG <[email protected]>
Subject: [PATCH v2] scsi: ufs: modify Tactive time setting conditionsThe Tactive time determine the waiting time before burst at hibern8 exit and is determined by H/W at linkup state However, in the case of samsung devices, guided host's Tactive time
+100us for stability.
If the HCI's Tactive time is equal or greater than the device, +100us should be set.
Quoted 2 lines
Signed-off-by SEO HOYOUNG <[email protected]>---
Thanks!
Quoted 19 lines
drivers/scsi/ufs/ufshcd.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/ufs/ufshcd.c index renamed from drivers/scsi/ufs/ufshcd.c +0
-0
1049e41abd5b..460d2b440d2e100644drivers/scsi/ufs/ufshcd.c +1
-1@@ -7815,7 +7815,7 @@ static int ufshcd_quirk_tune_host_pa_tactivate(struct ufs_hba *hba) peer_pa_tactivate_us = peer_pa_tactivate * gran_to_us_table[peer_granularity -1 ]; -if (pa_tactivate_us > peer_pa_tactivate_us) { +if (pa_tactivate_us >= peer_pa_tactivate_us) {u32 new_peer_pa_tactivate;
new_peer_pa_tactivate=pa_tactivate_us/
--
2.26.0
Martin K. Petersen
AppliedQuoted 8 lines · SEO HOYOUNG
The Tactive time determine the waiting time before burst at hibern8 exit and is determined by H/W at linkup state However, in the case of samsung devices, guided host's Tactive time +100us for stability.
If the HCI's Tactive time is equal or greater than the device, +100us should be set.[...]
Applied to 5.17/scsi-queue, thanks!
[1/1] scsi: ufs: modify Tactive time setting conditions
https://git.kernel.org/mkp/scsi/c/9008661e1960
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering