]> err.no Git - linux-2.6/blobdiff - drivers/scsi/aacraid/commsup.c
[SCSI] aacraid: Detect Blinkled at startup
[linux-2.6] / drivers / scsi / aacraid / commsup.c
index 19e42ac07cb228dd09dc771ec9a85f6513f877fd..0fd462a876f989d2e2e3f8f3e394bd3bb0c11852 100644 (file)
@@ -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)) {