]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] be2iscsi: fix boot hang due to interrupts not getting rearmed
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>
Fri, 29 Apr 2011 19:30:06 +0000 (14:30 -0500)
committerJames Bottomley <James.Bottomley@suse.de>
Sun, 1 May 2011 21:33:46 +0000 (16:33 -0500)
This patch fixes a bug where the interrupts were not rearmed if
the Interrupt Mask was enabled. This patch checks for Interrupt mask
enabled and still rearms interrupt generation even if the Interrupt
mask was enabled

Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/be2iscsi/be_main.c

index d83413658a9dc841da09acec092ac78c1a58132f..cea9b275965c3fbce6cae3d2f7c3e486e14b5448 100644 (file)
@@ -3465,23 +3465,23 @@ static void hwi_enable_intr(struct beiscsi_hba *phba)
        addr = (u8 __iomem *) ((u8 __iomem *) ctrl->pcicfg +
                        PCICFG_MEMBAR_CTRL_INT_CTRL_OFFSET);
        reg = ioread32(addr);
-       SE_DEBUG(DBG_LVL_8, "reg =x%08x\n", reg);
 
        enabled = reg & MEMBAR_CTRL_INT_CTRL_HOSTINTR_MASK;
        if (!enabled) {
                reg |= MEMBAR_CTRL_INT_CTRL_HOSTINTR_MASK;
                SE_DEBUG(DBG_LVL_8, "reg =x%08x addr=%p\n", reg, addr);
                iowrite32(reg, addr);
-               if (!phba->msix_enabled) {
-                       eq = &phwi_context->be_eq[0].q;
+       }
+
+       if (!phba->msix_enabled) {
+               eq = &phwi_context->be_eq[0].q;
+               SE_DEBUG(DBG_LVL_8, "eq->id=%d\n", eq->id);
+               hwi_ring_eq_db(phba, eq->id, 0, 0, 1, 1);
+       } else {
+               for (i = 0; i <= phba->num_cpus; i++) {
+                       eq = &phwi_context->be_eq[i].q;
                        SE_DEBUG(DBG_LVL_8, "eq->id=%d\n", eq->id);
                        hwi_ring_eq_db(phba, eq->id, 0, 0, 1, 1);
-               } else {
-                       for (i = 0; i <= phba->num_cpus; i++) {
-                               eq = &phwi_context->be_eq[i].q;
-                               SE_DEBUG(DBG_LVL_8, "eq->id=%d\n", eq->id);
-                               hwi_ring_eq_db(phba, eq->id, 0, 0, 1, 1);
-                       }
                }
        }
 }