scsi/osst: replace schedule_timeout() with msleep_interruptible()
PATCH 4/10 scsi/osst: replace schedule_timeout() with msleep_interruptible()
Any comments would be appreciated.
Description: Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected.
Signed-off-by Nishanth Aravamudan <[email protected]>
Signed-off-by Maximilian Attems <[email protected]>
---
linux-2.6.9-max/drivers/scsi/osst.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
drivers/scsi/osst.c renamed from drivers/scsi/osst.c~msleep-drivers_scsi_osst +2 -3
@@ -1488,8 +1488,7 @@ static int osst_reposition_and_retry(OS_osst_set_frame_position (STp, aSRpnt, frame + skip,1 ); flag =0 ; attempts--; -set_current_state (TASK_INTERRUPTIBLE ); -schedule_timeout (HZ /10 ); +msleep_interruptible (100 ); }if (osst_get_frame_position (STp, aSRpnt) <0 ) {/* additional write error */ #if DEBUG
@@ -1550,7 +1549,7 @@ static int osst_reposition_and_retry(OS_ debugging = 0; }#endif -schedule_timeout (HZ /10 ); +msleep_interruptible (100 ); }printk (KERN_ERR "%s:E: Failed to find valid tape media\n" , name);#if DEBUG
_