Commit 07899aed authored by Jeff Garzik's avatar Jeff Garzik

[libata] fix broken delay

Due to rounding and HZ==100, sometimes delays would not occur for
the desired length of time, or even at all.

Fix call to schedule_timeout() to ensure we delay -at least- for
the correct amount of time.
parent 88adbcd0
...@@ -118,7 +118,7 @@ static const char *ata_thr_state_name(unsigned int thr_state) ...@@ -118,7 +118,7 @@ static const char *ata_thr_state_name(unsigned int thr_state)
static void msleep(unsigned long msecs) static void msleep(unsigned long msecs)
{ {
set_current_state(TASK_UNINTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(msecs_to_jiffies(msecs)); schedule_timeout(msecs_to_jiffies(msecs) + 1);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment