summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Haverkamp <markh@osdl.org>2006-11-21 10:40:08 -0800
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-11-22 12:28:22 -0600
commit33524b70e8f3dd55a4ba78ad81742c7814e7b0ed (patch)
tree54a8d7a738570be0b49cd78127a0daaff378cde9
parent51d23da95c3b71ce70587af8fc8244a05722c191 (diff)
downloadlinux-3.10-33524b70e8f3dd55a4ba78ad81742c7814e7b0ed.tar.gz
linux-3.10-33524b70e8f3dd55a4ba78ad81742c7814e7b0ed.tar.bz2
linux-3.10-33524b70e8f3dd55a4ba78ad81742c7814e7b0ed.zip
[SCSI] aacraid: Detect Blinkled at startup
Received from Mark Salyzyn: Blinkled at startup is useful for catching Adapters in a lot of pain, in a BlinkLED assert, quickly; rather than waiting several minutes for commands to timeout. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--drivers/scsi/aacraid/commsup.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index 19e42ac07cb..0fd462a876f 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -518,6 +518,7 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size,
*/
unsigned long count = 36000000L; /* 3 minutes */
while (down_trylock(&fibptr->event_wait)) {
+ int blink;
if (--count == 0) {
spin_lock_irqsave(q->lock, qflags);
q->numpending--;
@@ -530,6 +531,14 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size,
}
return -ETIMEDOUT;
}
+ if ((blink = aac_adapter_check_health(dev)) > 0) {
+ if (wait == -1) {
+ printk(KERN_ERR "aacraid: aac_fib_send: adapter blinkLED 0x%x.\n"
+ "Usually a result of a serious unrecoverable hardware problem\n",
+ blink);
+ }
+ return -EFAULT;
+ }
udelay(5);
}
} else if (down_interruptible(&fibptr->event_wait)) {