Skip to content

Commit

Permalink
[SCSI] arcmsr: Fix hardware wait loops
Browse files Browse the repository at this point in the history
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.

[jejb: fix up merge conflict]

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Nick Cheng <nick.cheng@areca.com.tw>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Jeff Garzik authored and James Bottomley committed Oct 12, 2007
1 parent 095862a commit 2443045
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/scsi/arcmsr/arcmsr_hba.c
Original file line number Diff line number Diff line change
Expand Up @@ -2092,8 +2092,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*/
ssleep(3);

/* disable all outbound interrupt */
intmask_org = arcmsr_disable_outbound_ints(acb);
/* clear all outbound posted Q */
Expand Down

0 comments on commit 2443045

Please sign in to comment.