public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: domen@coderock.org
To: James.Bottomley@SteelEye.com
Cc: linux-scsi@vger.kernel.org, domen@coderock.org, nacc@us.ibm.com
Subject: [patch 01/11] Re: scsi/ide-scsi: use msleep()
Date: Sun, 06 Mar 2005 23:26:50 +0100	[thread overview]
Message-ID: <20050306222651.3F0FF1EC90@trashy.coderock.org> (raw)



Use msleep() instead of schedule_timeout() to guarantee the
task delays as expected. Remove set_current_state() as it is taken care of by
msleep().

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


 kj-domen/drivers/scsi/ide-scsi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/scsi/ide-scsi.c~msleep-drivers_scsi_ide-scsi drivers/scsi/ide-scsi.c
--- kj/drivers/scsi/ide-scsi.c~msleep-drivers_scsi_ide-scsi	2005-03-05 16:10:50.000000000 +0100
+++ kj-domen/drivers/scsi/ide-scsi.c	2005-03-05 16:10:50.000000000 +0100
@@ -46,6 +46,7 @@
 #include <linux/slab.h>
 #include <linux/ide.h>
 #include <linux/scatterlist.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <asm/bitops.h>
@@ -979,9 +980,8 @@ static int idescsi_eh_reset (struct scsi
 	/* ide_do_reset starts a polling handler which restarts itself every 50ms until the reset finishes */
 
 	do {
-		set_current_state(TASK_UNINTERRUPTIBLE);
 		spin_unlock_irq(cmd->device->host->host_lock);
-		schedule_timeout(HZ/20);
+		msleep(50);
 		spin_lock_irq(cmd->device->host->host_lock);
 	} while ( HWGROUP(drive)->handler );
 
_

                 reply	other threads:[~2005-03-06 22:26 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=20050306222651.3F0FF1EC90@trashy.coderock.org \
    --to=domen@coderock.org \
    --cc=James.Bottomley@SteelEye.com \
    --cc=linux-scsi@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