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 <yuedl1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1554341
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Chuanchun Zhu <zhucc2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Shi-Yong Li <a22381@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1779344
This commit is contained in:
yuedl1 2020-05-13 18:18:25 +08:00 • committed by Xiaojun Ji
commit c4210a9934

View file

@ -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