FROMLIST: scsi: ufs: 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.

Bug: 227177294
Link: https://lore.kernel.org/all/20220427233855.2685505-2-bvanassche@acm.org/
Change-Id: I8a4dd0e93ca02435264961851a095a9c83c68240
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
Bart Van Assche
2022-03-29 15:55:44 -07:00
parent 09c8c3ffe1
commit 8676997959

View File

@@ -1111,7 +1111,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;