aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid
diff options
context:
space:
mode:
authorMark Salyzyn <Mark_Salyzyn@adaptec.com>2008-04-14 14:20:16 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-04-16 10:32:43 -0400
commite6990c6448ca9359b6d4ad027c0a6efbf4379e64 (patch)
tree513ca9b2aca6e667717a01d035fefe545d661426 /drivers/scsi/aacraid
parent582df15327828570595d4be55b2b300dac5271c1 (diff)
[SCSI] aacraid: Fix down_interruptible() to check the return value
Instead of ignoring the return value in aac_fib_send() return 2 to indicate to the layers above that fib transmission was aborted due to timeout. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r--drivers/scsi/aacraid/commsup.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index 5156e057d062..23a8e9f8dcb4 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -515,10 +515,12 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size,
515 } 515 }
516 udelay(5); 516 udelay(5);
517 } 517 }
518 } else 518 } else if (down_interruptible(&fibptr->event_wait) == 0) {
519 (void)down_interruptible(&fibptr->event_wait); 519 fibptr->done = 2;
520 up(&fibptr->event_wait);
521 }
520 spin_lock_irqsave(&fibptr->event_lock, flags); 522 spin_lock_irqsave(&fibptr->event_lock, flags);
521 if (fibptr->done == 0) { 523 if ((fibptr->done == 0) || (fibptr->done == 2)) {
522 fibptr->done = 2; /* Tell interrupt we aborted */ 524 fibptr->done = 2; /* Tell interrupt we aborted */
523 spin_unlock_irqrestore(&fibptr->event_lock, flags); 525 spin_unlock_irqrestore(&fibptr->event_lock, flags);
524 return -EINTR; 526 return -EINTR;