From: Mark Salyzyn Date: Mon, 14 Apr 2008 18:20:16 +0000 (-0400) Subject: [SCSI] aacraid: Fix down_interruptible() to check the return value X-Git-Tag: v2.6.26-rc1~1140^2~15 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6990c6448ca9359b6d4ad027c0a6efbf4379e64;p=linux-2.6 [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 Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 5156e057d0..23a8e9f8dc 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;