[PATCH] osst: use msleep() instead of schedule_timeout() From: Nishanth Aravamudan Replace schedule_timeout() with msleep() to guarantee the task delays as expected. Patch is compile-tested. Signed-off-by: Nishanth Aravamudan Signed-off-by: Alexey Dobriyan Index: linux-kj/drivers/scsi/osst.c =================================================================== --- linux-kj.orig/drivers/scsi/osst.c 2005-12-05 13:19:16.000000000 +0300 +++ linux-kj/drivers/scsi/osst.c 2005-12-05 13:19:59.000000000 +0300 @@ -863,7 +863,7 @@ static int osst_recover_wait_frame(struc retval = osst_write_error_recovery(STp, aSRpnt, 0); break; } - schedule_timeout_interruptible(HZ / OSST_POLL_PER_SEC); + msleep(1000 / OSST_POLL_PER_SEC); STp->buffer->b_data = mybuf; STp->buffer->buffer_size = 24; memset(cmd, 0, MAX_COMMAND_SIZE); @@ -1558,7 +1558,7 @@ static int osst_reposition_and_retry(str osst_set_frame_position(STp, aSRpnt, frame + skip, 1); flag = 0; attempts--; - schedule_timeout_interruptible(msecs_to_jiffies(100)); + msleep(100); } if (osst_get_frame_position(STp, aSRpnt) < 0) { /* additional write error */ #if DEBUG @@ -1619,7 +1619,7 @@ static int osst_reposition_and_retry(str debugging = 0; } #endif - schedule_timeout_interruptible(msecs_to_jiffies(100)); + msleep(100); } printk(KERN_ERR "%s:E: Failed to find valid tape media\n", name); #if DEBUG