From c4210a99349e190c8df4ab4e2ad178336e24775d Mon Sep 17 00:00:00 2001 From: yuedl1 Date: Wed, 13 May 2020 18:18:25 +0800 Subject: [PATCH] ufs:fixed ufshcd wait doorbell clear timeout when devfreq ufs, ufshcd wait doorbell clear timeout. some operations maybe take time longer than 1s. such as unmap operation. so change the timeout to 2s. error log as bellow: 01-07 09:50:34.508 0 0 E ufshcd-qcom 1d84000.ufshc: ufshcd_wait_for_doorbell_clr: timedout waiting for doorbell to clear (tm=0x0, tr=0x2000000) 01-07 09:50:34.508 0 0 E devfreq 1d84000.ufshc: dvfs failed with (-16) error Change-Id: Ie33481603a6f96c710e0180bfdd61b7d88eb003b Signed-off-by: yuedl1 Reviewed-on: https://gerrit.mot.com/1554341 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Chuanchun Zhu Reviewed-by: Huosheng Liao Reviewed-by: Shi-Yong Li Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1779344 --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 13f5f4626322..569d2efbf783 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -1232,7 +1232,7 @@ static int ufshcd_scale_gear(struct ufs_hba *hba, bool scale_up) static int ufshcd_clock_scaling_prepare(struct ufs_hba *hba) { - #define DOORBELL_CLR_TOUT_US (1000 * 1000) /* 1 sec */ + #define DOORBELL_CLR_TOUT_US (2000 * 1000) /* 2 sec */ int ret = 0; /* * make sure that there are no outstanding requests when