From: Bart Van Assche Date: Thu, 8 Dec 2022 23:43:56 +0000 (-0800) Subject: scsi: ufs: core: Reduce the clock scaling latency X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2000bc309703b34ab776c7c00dfb5865721eb257;p=linux.git 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 --- diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 2dbe24977822f..b5d9088b7de34 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;