From: domen@coderock.org
To: osst@riede.org
Cc: linux-scsi@vger.kernel.org, domen@coderock.org, nacc@us.ibm.com
Subject: [patch 1/1] scsi/osst: replace schedule_timeout() with msleep()
Date: Sun, 06 Mar 2005 23:27:41 +0100 [thread overview]
Message-ID: <20050306222742.294F71EC90@trashy.coderock.org> (raw)
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
_
next reply other threads:[~2005-03-06 22:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-06 22:27 domen [this message]
2005-03-06 22:42 ` [patch 1/1] scsi/osst: replace schedule_timeout() with msleep() Willem Riede
2005-03-07 23:05 ` [UPDATE PATCH] " Nishanth Aravamudan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050306222742.294F71EC90@trashy.coderock.org \
--to=domen@coderock.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nacc@us.ibm.com \
--cc=osst@riede.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox