diff mbox series

[v4,02/10] scsi: ufs: Fix ADAPT logic for HS-G5

Message ID 20220615035146.20964-3-stanley.chu@mediatek.com (mailing list archive)
State Changes Requested
Headers show
Series csi: ufs: Fix PMC and low-power mode on MediaTek UFS platforms | expand

Commit Message

Stanley Chu June 15, 2022, 3:51 a.m. UTC
ADAPT now is added not only for HS Gear4 mode but also higher gears.
Fix the logic for higher gears.

Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
---
 drivers/ufs/core/ufshcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bart Van Assche June 15, 2022, 4:44 p.m. UTC | #1
On 6/14/22 20:51, Stanley Chu wrote:
> ADAPT now is added not only for HS Gear4 mode but also higher gears.
> Fix the logic for higher gears.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
diff mbox series

Patch

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 19e17c898319..0d16739c67bb 100755
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -3802,7 +3802,7 @@  int ufshcd_dme_configure_adapt(struct ufs_hba *hba,
 {
 	int ret;
 
-	if (agreed_gear != UFS_HS_G4)
+	if (agreed_gear < UFS_HS_G4)
 		adapt_val = PA_NO_ADAPT;
 
 	ret = ufshcd_dme_set(hba,