]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[SCSI] qla4xxx: Re-register IRQ handler while retrying initialize of adapter
authorPoornima Vonti <poornima.vonti@qlogic.com>
Mon, 21 Jan 2013 04:51:01 +0000 (23:51 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Wed, 30 Jan 2013 02:50:19 +0000 (13:50 +1100)
Problem:
If initialization of adapter fails for some reason, then the interrupt handlers
are released. The interrupt handlers are not registered again when initialization
of adapter is retried.

Solution:
Re-register the interrupt handler when adapter initialization is retried.

Signed-off-by: Poornima Vonti <poornima.vonti@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla4xxx/ql4_nx.c
drivers/scsi/qla4xxx/ql4_os.c

index b3d6dabdc6f4a3d7e465a701d456d39a544208e8..71d3d234f5265863f847d9de2694e4ca814d1a78 100644 (file)
@@ -2986,7 +2986,7 @@ int qla4_8xxx_load_risc(struct scsi_qla_host *ha)
 
        retval = qla4_8xxx_device_state_handler(ha);
 
-       if (retval == QLA_SUCCESS && !test_bit(AF_INIT_DONE, &ha->flags))
+       if (retval == QLA_SUCCESS && !test_bit(AF_IRQ_ATTACHED, &ha->flags))
                retval = qla4xxx_request_irqs(ha);
 
        return retval;
index 1df13872ef9d05d6160948f98d08fe32018c82c6..2ccbb3bee096a8e36c8efd2a4acd5dc437ecceb9 100644 (file)
@@ -6110,7 +6110,6 @@ qla4xxx_pci_mmio_enabled(struct pci_dev *pdev)
 static uint32_t qla4_8xxx_error_recovery(struct scsi_qla_host *ha)
 {
        uint32_t rval = QLA_ERROR;
-       uint32_t ret = 0;
        int fn;
        struct pci_dev *other_pdev = NULL;
 
@@ -6196,16 +6195,7 @@ static uint32_t qla4_8xxx_error_recovery(struct scsi_qla_host *ha)
                        qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DRV_STATE, 0);
                        qla4_8xxx_set_drv_active(ha);
                        ha->isp_ops->idc_unlock(ha);
-                       ret = qla4xxx_request_irqs(ha);
-                       if (ret) {
-                               ql4_printk(KERN_WARNING, ha, "Failed to "
-                                   "reserve interrupt %d already in use.\n",
-                                   ha->pdev->irq);
-                               rval = QLA_ERROR;
-                       } else {
-                               ha->isp_ops->enable_intrs(ha);
-                               rval = QLA_SUCCESS;
-                       }
+                       ha->isp_ops->enable_intrs(ha);
                }
        } else {
                ql4_printk(KERN_INFO, ha, "scsi%ld: %s: devfn 0x%x is not "
@@ -6215,18 +6205,9 @@ static uint32_t qla4_8xxx_error_recovery(struct scsi_qla_host *ha)
                     QLA8XXX_DEV_READY)) {
                        clear_bit(AF_FW_RECOVERY, &ha->flags);
                        rval = qla4xxx_initialize_adapter(ha, RESET_ADAPTER);
-                       if (rval == QLA_SUCCESS) {
-                               ret = qla4xxx_request_irqs(ha);
-                               if (ret) {
-                                       ql4_printk(KERN_WARNING, ha, "Failed to"
-                                           " reserve interrupt %d already in"
-                                           " use.\n", ha->pdev->irq);
-                                       rval = QLA_ERROR;
-                               } else {
-                                       ha->isp_ops->enable_intrs(ha);
-                                       rval = QLA_SUCCESS;
-                               }
-                       }
+                       if (rval == QLA_SUCCESS)
+                               ha->isp_ops->enable_intrs(ha);
+
                        ha->isp_ops->idc_lock(ha);
                        qla4_8xxx_set_drv_active(ha);
                        ha->isp_ops->idc_unlock(ha);