From 2000bc309703b34ab776c7c00dfb5865721eb257 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 8 Dec 2022 15:43:56 -0800 Subject: [PATCH] scsi: ufs: core: Reduce the clock scaling latency Wait at most 20 ms before rechecking the doorbells instead of waiting for a potentially long time between doorbell checks. Reviewed-by: Avri Altman Reviewed-by: Stanley Chu Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen --- drivers/ufs/core/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 2dbe249..b5d9088b 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -1154,7 +1154,7 @@ static int ufshcd_wait_for_doorbell_clr(struct ufs_hba *hba, } spin_unlock_irqrestore(hba->host->host_lock, flags); - schedule(); + io_schedule_timeout(msecs_to_jiffies(20)); if (ktime_to_us(ktime_sub(ktime_get(), start)) > wait_timeout_us) { timeout = true; -- 2.7.4