diff options
Diffstat (limited to 'drivers/scsi/aacraid/commsup.c')
-rw-r--r-- | drivers/scsi/aacraid/commsup.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 3f27419c66af..c67da1321133 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c | |||
@@ -464,6 +464,8 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, | |||
464 | dprintk((KERN_DEBUG " hw_fib pa being sent=%lx\n",(ulong)fibptr->hw_fib_pa)); | 464 | dprintk((KERN_DEBUG " hw_fib pa being sent=%lx\n",(ulong)fibptr->hw_fib_pa)); |
465 | dprintk((KERN_DEBUG " fib being sent=%p\n",fibptr)); | 465 | dprintk((KERN_DEBUG " fib being sent=%p\n",fibptr)); |
466 | 466 | ||
467 | if (!dev->queues) | ||
468 | return -ENODEV; | ||
467 | q = &dev->queues->queue[AdapNormCmdQueue]; | 469 | q = &dev->queues->queue[AdapNormCmdQueue]; |
468 | 470 | ||
469 | if(wait) | 471 | if(wait) |
@@ -527,8 +529,15 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, | |||
527 | } | 529 | } |
528 | udelay(5); | 530 | udelay(5); |
529 | } | 531 | } |
530 | } else | 532 | } else if (down_interruptible(&fibptr->event_wait)) { |
531 | down(&fibptr->event_wait); | 533 | spin_lock_irqsave(&fibptr->event_lock, flags); |
534 | if (fibptr->done == 0) { | ||
535 | fibptr->done = 2; /* Tell interrupt we aborted */ | ||
536 | spin_unlock_irqrestore(&fibptr->event_lock, flags); | ||
537 | return -EINTR; | ||
538 | } | ||
539 | spin_unlock_irqrestore(&fibptr->event_lock, flags); | ||
540 | } | ||
532 | BUG_ON(fibptr->done == 0); | 541 | BUG_ON(fibptr->done == 0); |
533 | 542 | ||
534 | if((fibptr->flags & FIB_CONTEXT_FLAG_TIMED_OUT)){ | 543 | if((fibptr->flags & FIB_CONTEXT_FLAG_TIMED_OUT)){ |
@@ -795,7 +804,7 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr) | |||
795 | 804 | ||
796 | /* Sniff for container changes */ | 805 | /* Sniff for container changes */ |
797 | 806 | ||
798 | if (!dev) | 807 | if (!dev || !dev->fsa_dev) |
799 | return; | 808 | return; |
800 | container = (u32)-1; | 809 | container = (u32)-1; |
801 | 810 | ||