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.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index e5f2d7d9002e..4b32ca442433 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -416,6 +416,7 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size,
416 unsigned long flags = 0; 416 unsigned long flags = 0;
417 unsigned long qflags; 417 unsigned long qflags;
418 unsigned long mflags = 0; 418 unsigned long mflags = 0;
419 unsigned long sflags = 0;
419 420
420 421
421 if (!(hw_fib->header.XferState & cpu_to_le32(HostOwned))) 422 if (!(hw_fib->header.XferState & cpu_to_le32(HostOwned)))
@@ -512,6 +513,31 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size,
512 spin_lock_irqsave(&fibptr->event_lock, flags); 513 spin_lock_irqsave(&fibptr->event_lock, flags);
513 } 514 }
514 515
516 if (dev->sync_mode) {
517 if (wait)
518 spin_unlock_irqrestore(&fibptr->event_lock, flags);
519 spin_lock_irqsave(&dev->sync_lock, sflags);
520 if (dev->sync_fib) {
521 list_add_tail(&fibptr->fiblink, &dev->sync_fib_list);
522 spin_unlock_irqrestore(&dev->sync_lock, sflags);
523 } else {
524 dev->sync_fib = fibptr;
525 spin_unlock_irqrestore(&dev->sync_lock, sflags);
526 aac_adapter_sync_cmd(dev, SEND_SYNCHRONOUS_FIB,
527 (u32)fibptr->hw_fib_pa, 0, 0, 0, 0, 0,
528 NULL, NULL, NULL, NULL, NULL);
529 }
530 if (wait) {
531 fibptr->flags |= FIB_CONTEXT_FLAG_WAIT;
532 if (down_interruptible(&fibptr->event_wait)) {
533 fibptr->flags &= ~FIB_CONTEXT_FLAG_WAIT;
534 return -EFAULT;
535 }
536 return 0;
537 }
538 return -EINPROGRESS;
539 }
540
515 if (aac_adapter_deliver(fibptr) != 0) { 541 if (aac_adapter_deliver(fibptr) != 0) {
516 printk(KERN_ERR "aac_fib_send: returned -EBUSY\n"); 542 printk(KERN_ERR "aac_fib_send: returned -EBUSY\n");
517 if (wait) { 543 if (wait) {