* [patch 1/1] scsi/osst: use msleep() instead of schedule_timeout()
@ 2005-07-14 21:43 domen
0 siblings, 0 replies; only message in thread
From: domen @ 2005-07-14 21:43 UTC (permalink / raw)
To: osst; +Cc: linux-scsi, Nishanth Aravamudan, domen
[-- Attachment #1: msleep-drivers_scsi_osst --]
[-- Type: text/plain, Size: 1483 bytes --]
From: Nishanth Aravamudan <nacc@us.ibm.com>
Replace schedule_timeout() with msleep() to guarantee the
task delays as expected.
Patch is compile-tested.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
osst.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
Index: quilt/drivers/scsi/osst.c
===================================================================
--- quilt.orig/drivers/scsi/osst.c
+++ quilt/drivers/scsi/osst.c
@@ -863,8 +863,7 @@ static int osst_recover_wait_frame(struc
retval = osst_write_error_recovery(STp, aSRpnt, 0);
break;
}
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout (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);
@@ -1559,8 +1558,7 @@ static int osst_reposition_and_retry(str
osst_set_frame_position(STp, aSRpnt, frame + skip, 1);
flag = 0;
attempts--;
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ / 10);
+ msleep(100);
}
if (osst_get_frame_position(STp, aSRpnt) < 0) { /* additional write error */
#if DEBUG
@@ -1621,8 +1619,7 @@ static int osst_reposition_and_retry(str
debugging = 0;
}
#endif
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ / 10);
+ msleep(100);
}
printk(KERN_ERR "%s:E: Failed to find valid tape media\n", name);
#if DEBUG
--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-14 21:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-14 21:43 [patch 1/1] scsi/osst: use msleep() instead of schedule_timeout() domen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox