Skip to content

Commit

Permalink
[SCSI] aacraid: Fix down_interruptible() to check the return value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Salyzyn authored and James Bottomley committed Apr 16, 2008
1 parent 582df15 commit e6990c6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/scsi/aacraid/commsup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e6990c6

Please sign in to comment.