block/xd: replace schedule_timeout() with msleep()
Subsystems (2)
PATCH 6/22 block/xd: replace schedule_timeout() with msleep()
Hi,
Please consider applying.
Description: Use msleep() instead of schedule_timeout() to guarantee the task delays as expected. The current code wishes to sleep for 1 jiffy, but I am not sure if this is actually intended, as with the change to HZ=1000, the time equivalent of 1 jiffy changed from 10ms to 1ms. I have assumed the former in this case; however the patch can be easily changed to assume the latter.
Signed-off-by Nishanth Aravamudan <[email protected]>
drivers/block/xd.c +3 -4
@@ -47,6 +47,7 @@#include <linux/wait.h> #include <linux/blkdev.h> #include <linux/blkpg.h> +#include <linux/delay.h> #include <asm/system.h> #include <asm/io.h>
@@ -529,10 +530,8 @@ static inline u_char xd_waitport (u_shorint success; xdc_busy =1 ; -while ((success = ((inb (port) & mask) != flags)) &&time_before (jiffies, expiry)) { -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (1 ); - } +while ((success = ((inb (port) & mask) != flags)) &&time_before (jiffies, expiry)) +msleep (10 ); xdc_busy =0 ;return (success); }
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors