lkml.org 
[lkml]   [2007]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/2] arcmsr: Fix hardware wait loops

IMO this belongs in 2.6.23-rc.

Committed to 'arcmsr' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6.git


commit f9f7b1384995626e1a80322faef3f7cca97aa7ae
Author: Jeff Garzik <jeff@garzik.org>
Date: Fri Jul 27 12:57:38 2007 -0400

[SCSI] arcmsr: Fix hardware wait loops

Remove _interruptible, since receiving a signal while waiting on a
hardware condition will simply cause the driver to busy-wait.

Using msleep_interruptible() is rarely the right thing to do, when
waiting on a hardware condition to change.

Also, replace msleep with ssleep while doing this, where appropriate.

Signed-off-by: Jeff Garzik <jeff@garzik.org>

drivers/scsi/arcmsr/arcmsr_hba.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

f9f7b1384995626e1a80322faef3f7cca97aa7ae
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
index 0ddfc21..ae26ed4 100644
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -540,7 +540,7 @@ static uint8_t arcmsr_wait_msgint_ready(struct AdapterControlBlock *acb)
, &reg->outbound_intstatus);
return 0x00;
}
- msleep_interruptible(10);
+ msleep(10);
}/*max 1 seconds*/
} while (Retries++ < 20);/*max 20 sec*/
return 0xff;
@@ -1421,8 +1421,10 @@ static void arcmsr_iop_reset(struct AdapterControlBlock *acb)
if (atomic_read(&acb->ccboutstandingcount) != 0) {
/* talk to iop 331 outstanding command aborted */
arcmsr_abort_allcmd(acb);
+
/* wait for 3 sec for all command aborted*/
- msleep_interruptible(3000);
+ ssleep(3);
+
/* disable all outbound interrupt */
intmask_org = arcmsr_disable_outbound_ints(acb);
/* clear all outbound posted Q */
@@ -1468,7 +1470,7 @@ static void arcmsr_abort_one_cmd(struct AdapterControlBlock *acb,
/*
** Wait for 3 sec for all command done.
*/
- msleep_interruptible(3000);
+ ssleep(3);

intmask = arcmsr_disable_outbound_ints(acb);
arcmsr_polling_ccbdone(acb, ccb);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-07-27 19:03    [W:0.028 / U:12.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site