summaryrefslogtreecommitdiffstats
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 09:32:43 -0500
commite6990c6448ca9359b6d4ad027c0a6efbf4379e64 (patch)
tree513ca9b2aca6e667717a01d035fefe545d661426 /drivers/scsi/aacraid
parent582df15327828570595d4be55b2b300dac5271c1 (diff)
downloadlinux-e6990c6448ca9359b6d4ad027c0a6efbf4379e64.tar.gz
linux-e6990c6448ca9359b6d4ad027c0a6efbf4379e64.tar.bz2
linux-e6990c6448ca9359b6d4ad027c0a6efbf4379e64.zip
[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,
}
udelay(5);
}
- } else
- (void)down_interruptible(&fibptr->event_wait);
+ } else if (down_interruptible(&fibptr->event_wait) == 0) {
+ fibptr->done = 2;
+ up(&fibptr->event_wait);
+ }
spin_lock_irqsave(&fibptr->event_lock, flags);
- if (fibptr->done == 0) {
+ if ((fibptr->done == 0) || (fibptr->done == 2)) {
fibptr->done = 2; /* Tell interrupt we aborted */
spin_unlock_irqrestore(&fibptr->event_lock, flags);
return -EINTR;