[PATCH 2/2] ahci: Use usleep_range() in ahci_start_port()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Using msleep(1) may actually sleep much longer than 1 msecs (~20 msecs)
which unnecessarily slows down system startup. Avoid that and use
usleep_range() instead.

Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
---
 drivers/ata/libahci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index a0de7a38430c..27e7daa01ccb 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -871,7 +871,7 @@ static void ahci_start_port(struct ata_port *ap)
 				 * ports to fail the same way.
 				 */
 				if (rc == -EBUSY)
-					msleep(1);
+					usleep_range(1000, 1050);
 				else
 					break;
 			}
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux