aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/commsup.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aacraid/commsup.c')
-rw-r--r--drivers/scsi/aacraid/commsup.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index 47434499e82b..23a8e9f8dcb4 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,
515 } 515 }
516 udelay(5); 516 udelay(5);
517 } 517 }
518 } else 518 } else if (down_interruptible(&fibptr->event_wait) == 0) {
519 (void)down_interruptible(&fibptr->event_wait); 519 fibptr->done = 2;
520 up(&fibptr->event_wait);
521 }
520 spin_lock_irqsave(&fibptr->event_lock, flags); 522 spin_lock_irqsave(&fibptr->event_lock, flags);
521 if (fibptr->done == 0) { 523 if ((fibptr->done == 0) || (fibptr->done == 2)) {
522 fibptr->done = 2; /* Tell interrupt we aborted */ 524 fibptr->done = 2; /* Tell interrupt we aborted */
523 spin_unlock_irqrestore(&fibptr->event_lock, flags); 525 spin_unlock_irqrestore(&fibptr->event_lock, flags);
524 return -EINTR; 526 return -EINTR;
@@ -594,7 +596,7 @@ void aac_consumer_free(struct aac_dev * dev, struct aac_queue *q, u32 qid)
594 if (le32_to_cpu(*q->headers.consumer) >= q->entries) 596 if (le32_to_cpu(*q->headers.consumer) >= q->entries)
595 *q->headers.consumer = cpu_to_le32(1); 597 *q->headers.consumer = cpu_to_le32(1);
596 else 598 else
597 *q->headers.consumer = cpu_to_le32(le32_to_cpu(*q->headers.consumer)+1); 599 le32_add_cpu(q->headers.consumer, 1);
598 600
599 if (wasfull) { 601 if (wasfull) {
600 switch (qid) { 602 switch (qid) {