Skip to content
Commit 838c1efc authored by Bean Huo's avatar Bean Huo Committed by Martin K. Petersen
Browse files

scsi: ufs: change msleep to usleep_range



This patch is to change msleep() to usleep_range() based on
Documentation/timers/timers-howto.txt. It suggests using usleep_range()
for small msec(1ms - 20ms) since msleep() will often sleep longer than
desired value.

After changing, booting time will be 5ms-10ms faster than before.  I
tested this change on two different platforms, one has 5ms faster, another
one is about 10ms. I think this is different on different platform.

Actually, from UFS host side, 1ms-5ms delay is already sufficient for its
initialization of the local UIC layer.

Fixes: 7a3e97b0 ([SCSI] ufshcd: UFS Host controller driver)
Signed-off-by: default avatarBean Huo <beanhuo@micron.com>
Acked-by: default avatarStanley Chu <stanley.chu@mediatek.com>
Reviewed-by: default avatarAvri Altman <avri.altman@wdc.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 70a51d8c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment