linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 04/10]  scsi/osst: replace  schedule_timeout() with msleep_interruptible()
@ 2004-10-21  8:47 janitor
  0 siblings, 0 replies; only message in thread
From: janitor @ 2004-10-21  8:47 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, janitor, nacc




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 <nacc@us.ibm.com>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
---

 linux-2.6.9-max/drivers/scsi/osst.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff -puN drivers/scsi/osst.c~msleep-drivers_scsi_osst drivers/scsi/osst.c
--- linux-2.6.9/drivers/scsi/osst.c~msleep-drivers_scsi_osst	2004-10-21 02:41:29.000000000 +0200
+++ linux-2.6.9-max/drivers/scsi/osst.c	2004-10-21 02:41:29.000000000 +0200
@@ -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
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-21  8:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-21  8:47 [patch 04/10] scsi/osst: replace schedule_timeout() with msleep_interruptible() janitor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).