drivers: libata-core: Use usleep_range() instead of msleep() for short sleeps (<20 ms)
authorAnil Veliyankara Madam <aveliyan@cisco.com>
Fri, 8 Jan 2016 05:18:52 +0000 (21:18 -0800)
committerTejun Heo <tj@kernel.org>
Fri, 8 Jan 2016 15:36:57 +0000 (10:36 -0500)
commit848c3920866fdb7b8b353408348df7929306e9be
treecbb86365742718165a97a1df062677b35347f072
parent427cc61a4486fa80eccaad2bdfcc50cfd1b46625
drivers: libata-core: Use usleep_range() instead of msleep() for short sleeps (<20 ms)

Since msleep() may sleep longer than intended time for values less
than 20ms, this patch allows the use of usleep_range for waits less
that 20ms. usleep_range is a finer precision implementation of
msleep and is designed to be a drop-in replacement for udelay
where a precise sleep/busy-wait is unnecessary.

More details can be found at http://lkml.org/lkml/2007/8/3/250
and in Documentation/timers/timers-howto.txt.

This change has been done to improve the performace in PIO6 mode
which is used by viking flash.

Cc: xe-kernel@external.cisco.com
Signed-off-by: Anil Veliyankara Madam <aveliyan@cisco.com>
Signed-off-by: Shikha Jain <shikjain@cisco.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/libata-core.c