diff mbox series

[v1] scsi: ufs-mediatek: Fix incorrect time to wait link status

Message ID 20200809055702.20140-1-stanley.chu@mediatek.com (mailing list archive)
State Mainlined
Commit 215d326702516366a8dfa9624b67ba0761c22b86
Headers show
Series [v1] scsi: ufs-mediatek: Fix incorrect time to wait link status | expand

Commit Message

Stanley Chu Aug. 9, 2020, 5:57 a.m. UTC
Fix incorrect calculation of "ms" based waiting time in
function ufs_mtk_setup_clocks().

Fixes: 9006e3986f66 ("scsi: ufs-mediatek: Do not gate clocks if auto-hibern8 is not entered yet")
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
---
 drivers/scsi/ufs/ufs-mediatek.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Avri Altman Aug. 10, 2020, 8:58 p.m. UTC | #1
> 
> Fix incorrect calculation of "ms" based waiting time in
> function ufs_mtk_setup_clocks().
> 
> Fixes: 9006e3986f66 ("scsi: ufs-mediatek: Do not gate clocks if auto-hibern8 is
> not entered yet")
> Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Martin K. Petersen Aug. 18, 2020, 3:12 a.m. UTC | #2
On Sun, 9 Aug 2020 13:57:02 +0800, Stanley Chu wrote:

> Fix incorrect calculation of "ms" based waiting time in
> function ufs_mtk_setup_clocks().

Applied to 5.9/scsi-fixes, thanks!

[1/1] scsi: ufs-mediatek: Fix incorrect time to wait link status
      https://git.kernel.org/mkp/scsi/c/215d32670251
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c
index 29cd017c1aa0..1755dd6b04ae 100644
--- a/drivers/scsi/ufs/ufs-mediatek.c
+++ b/drivers/scsi/ufs/ufs-mediatek.c
@@ -212,7 +212,7 @@  static int ufs_mtk_wait_link_state(struct ufs_hba *hba, u32 state,
 	ktime_t timeout, time_checked;
 	u32 val;
 
-	timeout = ktime_add_us(ktime_get(), ms_to_ktime(max_wait_ms));
+	timeout = ktime_add_ms(ktime_get(), max_wait_ms);
 	do {
 		time_checked = ktime_get();
 		ufshcd_writel(hba, 0x20, REG_UFS_DEBUG_SEL);