diff options
Diffstat (limited to 'drivers/scsi/aacraid/commsup.c')
-rw-r--r-- | drivers/scsi/aacraid/commsup.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 19e42ac07cb2..4893a6d06a33 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, | |||
518 | */ | 518 | */ |
519 | unsigned long count = 36000000L; /* 3 minutes */ | 519 | unsigned long count = 36000000L; /* 3 minutes */ |
520 | while (down_trylock(&fibptr->event_wait)) { | 520 | while (down_trylock(&fibptr->event_wait)) { |
521 | int blink; | ||
521 | if (--count == 0) { | 522 | if (--count == 0) { |
522 | spin_lock_irqsave(q->lock, qflags); | 523 | spin_lock_irqsave(q->lock, qflags); |
523 | q->numpending--; | 524 | q->numpending--; |
@@ -530,6 +531,14 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, | |||
530 | } | 531 | } |
531 | return -ETIMEDOUT; | 532 | return -ETIMEDOUT; |
532 | } | 533 | } |
534 | if ((blink = aac_adapter_check_health(dev)) > 0) { | ||
535 | if (wait == -1) { | ||
536 | printk(KERN_ERR "aacraid: aac_fib_send: adapter blinkLED 0x%x.\n" | ||
537 | "Usually a result of a serious unrecoverable hardware problem\n", | ||
538 | blink); | ||
539 | } | ||
540 | return -EFAULT; | ||
541 | } | ||
533 | udelay(5); | 542 | udelay(5); |
534 | } | 543 | } |
535 | } else if (down_interruptible(&fibptr->event_wait)) { | 544 | } else if (down_interruptible(&fibptr->event_wait)) { |
@@ -1093,6 +1102,20 @@ static int _aac_reset_adapter(struct aac_dev *aac) | |||
1093 | goto out; | 1102 | goto out; |
1094 | } | 1103 | } |
1095 | 1104 | ||
1105 | /* | ||
1106 | * Loop through the fibs, close the synchronous FIBS | ||
1107 | */ | ||
1108 | for (index = 0; index < (aac->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB); index++) { | ||
1109 | struct fib *fib = &aac->fibs[index]; | ||
1110 | if (!(fib->hw_fib->header.XferState & cpu_to_le32(NoResponseExpected | Async)) && | ||
1111 | (fib->hw_fib->header.XferState & cpu_to_le32(ResponseExpected))) { | ||
1112 | unsigned long flagv; | ||
1113 | spin_lock_irqsave(&fib->event_lock, flagv); | ||
1114 | up(&fib->event_wait); | ||
1115 | spin_unlock_irqrestore(&fib->event_lock, flagv); | ||
1116 | schedule(); | ||
1117 | } | ||
1118 | } | ||
1096 | index = aac->cardtype; | 1119 | index = aac->cardtype; |
1097 | 1120 | ||
1098 | /* | 1121 | /* |