[SCSI] bfa: Fix to process mbox interrupts only if interrupts are enabled in INTx...
authorKrishna Gudipati <kgudipat@brocade.com>
Thu, 23 Aug 2012 02:52:18 +0000 (19:52 -0700)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 24 Sep 2012 08:10:57 +0000 (12:10 +0400)
- Made changes to process mbox and error interrupts only if interrupts are
  enabled, when running in INTx mode.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/bfa/bfa_core.c
drivers/scsi/bfa/bfa_modules.h

index a4129c9..b7c326f 100644 (file)
@@ -775,7 +775,8 @@ bfa_intx(struct bfa_s *bfa)
        if (!intr)
                return BFA_TRUE;
 
-       bfa_msix_lpu_err(bfa, intr);
+       if (bfa->intr_enabled)
+               bfa_msix_lpu_err(bfa, intr);
 
        return BFA_TRUE;
 }
@@ -803,11 +804,17 @@ bfa_isr_enable(struct bfa_s *bfa)
        writel(~umsk, bfa->iocfc.bfa_regs.intr_mask);
        bfa->iocfc.intr_mask = ~umsk;
        bfa_isr_mode_set(bfa, bfa->msix.nvecs != 0);
+
+       /*
+        * Set the flag indicating successful enabling of interrupts
+        */
+       bfa->intr_enabled = BFA_TRUE;
 }
 
 void
 bfa_isr_disable(struct bfa_s *bfa)
 {
+       bfa->intr_enabled = BFA_FALSE;
        bfa_isr_mode_set(bfa, BFA_FALSE);
        writel(-1L, bfa->iocfc.bfa_regs.intr_mask);
        bfa_msix_uninstall(bfa);
index 2d36e48..189fff7 100644 (file)
@@ -121,6 +121,7 @@ struct bfa_s {
        bfa_boolean_t           fcs;            /*  FCS is attached to BFA */
        struct bfa_msix_s       msix;
        int                     bfa_aen_seq;
+       bfa_boolean_t           intr_enabled;   /*  Status of interrupts */
 };
 
 extern bfa_boolean_t bfa_auto_recover;