public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 1/1] scsi/osst: replace schedule_timeout() with msleep()
@ 2005-03-06 22:27 domen
  2005-03-06 22:42 ` Willem Riede
  0 siblings, 1 reply; 3+ messages in thread
From: domen @ 2005-03-06 22:27 UTC (permalink / raw)
  To: osst; +Cc: linux-scsi, domen, nacc



Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. Although TASK_INTERRUPTIBLE is used in the current code,
there is no code dealing with an early return / signals_pending().

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
---


 kj-domen/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
--- kj/drivers/scsi/osst.c~msleep-drivers_scsi_osst	2005-03-05 16:10:51.000000000 +0100
+++ kj-domen/drivers/scsi/osst.c	2005-03-05 16:10:51.000000000 +0100
@@ -1558,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,7 +1620,7 @@ static int osst_reposition_and_retry(str
 		}
 #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] 3+ messages in thread

end of thread, other threads:[~2005-03-07 23:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-06 22:27 [patch 1/1] scsi/osst: replace schedule_timeout() with msleep() domen
2005-03-06 22:42 ` Willem Riede
2005-03-07 23:05   ` [UPDATE PATCH] " Nishanth Aravamudan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox