From: Alexey Dobriyan <adobriyan@gmail.com>
To: Jens Axboe <axboe@suse.de>
Cc: Nishanth Aravamudan <nacc@us.ibm.com>, linux-kernel@vger.kernel.org
Subject: [PATCH] sonycd535: replace schedule_timeout() with msleep()
Date: Sat, 17 Sep 2005 15:19:45 +0400 [thread overview]
Message-ID: <20050917111944.GA2768@mipter.zuzino.mipt.ru> (raw)
From: Nishanth Aravamudan <nacc@us.ibm.com>
Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. Although TASK_INTERRUPTIBLE is used in the
original code, schedule_timeout() return conditions for such a state
are not checked appropriately; therefore, TASK_UNINTERRUPTIBLE should
be ok (and, hence, msleep()).
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
drivers/cdrom/sonycd535.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/cdrom/sonycd535.c
+++ b/drivers/cdrom/sonycd535.c
@@ -129,6 +129,7 @@
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/init.h>
+#include <linux/delay.h>
#define REALLY_SLOW_IO
#include <asm/system.h>
@@ -896,9 +897,8 @@ do_cdu535_request(request_queue_t * q)
}
if (readStatus == BAD_STATUS) {
/* Sleep for a while, then retry */
- set_current_state(TASK_INTERRUPTIBLE);
spin_unlock_irq(&sonycd535_lock);
- schedule_timeout(RETRY_FOR_BAD_STATUS*HZ/10);
+ msleep(RETRY_FOR_BAD_STATUS*100);
spin_lock_irq(&sonycd535_lock);
}
#if DEBUG > 0
reply other threads:[~2005-09-17 11:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20050917111944.GA2768@mipter.zuzino.mipt.ru \
--to=adobriyan@gmail.com \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nacc@us.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).