Commit 2000bc30 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen
Browse files

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: default avatarAvri Altman <avri.altman@wdc.com>
Reviewed-by: default avatarStanley Chu <stanley.chu@mediatek.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent ee8c88ca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;