public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 02/11] scsi/st: replace schedule_timeout() with msleep_interruptible()
@ 2005-03-06 22:26 domen
  2005-03-07 17:17 ` Kai Makisara
  0 siblings, 1 reply; 2+ messages in thread
From: domen @ 2005-03-06 22:26 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, domen, nacc



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: Domen Puncer <domen@coderock.org>
---


 kj-domen/drivers/scsi/st.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff -puN drivers/scsi/st.c~msleep_interruptible-drivers_scsi_st drivers/scsi/st.c
--- kj/drivers/scsi/st.c~msleep_interruptible-drivers_scsi_st	2005-03-05 16:11:03.000000000 +0100
+++ kj-domen/drivers/scsi/st.c	2005-03-05 16:11:03.000000000 +0100
@@ -36,6 +36,7 @@ static char *verstr = "20041025";
 #include <linux/moduleparam.h>
 #include <linux/devfs_fs_kernel.h>
 #include <linux/cdev.h>
+#include <linux/delay.h>
 #include <asm/uaccess.h>
 #include <asm/dma.h>
 #include <asm/system.h>
@@ -760,9 +761,7 @@ static int test_ready(struct scsi_tape *
 
 			if (scode == NOT_READY) {
 				if (waits < max_wait) {
-					set_current_state(TASK_INTERRUPTIBLE);
-					schedule_timeout(HZ);
-					if (signal_pending(current)) {
+					if (msleep_interruptible(1000)) {
 						retval = (-EINTR);
 						break;
 					}
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 02/11] scsi/st: replace schedule_timeout() with msleep_interruptible()
  2005-03-06 22:26 [patch 02/11] scsi/st: replace schedule_timeout() with msleep_interruptible() domen
@ 2005-03-07 17:17 ` Kai Makisara
  0 siblings, 0 replies; 2+ messages in thread
From: Kai Makisara @ 2005-03-07 17:17 UTC (permalink / raw)
  To: domen; +Cc: James Bottomley, linux-scsi, nacc

On Sun, 6 Mar 2005 domen@coderock.org wrote:

> 
> 
> Use msleep_interruptible() instead of
> schedule_timeout() to guarantee the task delays as expected.
> 
This patch is already in the scsi-misc-2.6 tree merged into one of the st 
patches.

Thanks for the reminder and the patch.

-- 
Kai

^ permalink raw reply	[flat|nested] 2+ messages in thread

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-06 22:26 [patch 02/11] scsi/st: replace schedule_timeout() with msleep_interruptible() domen
2005-03-07 17:17 ` Kai Makisara

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