]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] qla2xxx: The ISP82XX should be online while waiting for commands completion.
authorSaurav Kashyap <saurav.kashyap@qlogic.com>
Wed, 23 Feb 2011 23:27:16 +0000 (15:27 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Fri, 25 Feb 2011 18:00:38 +0000 (13:00 -0500)
If adapter is not online, the driver will not process the response queue, even
on getting an interrupt.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla2xxx/qla_init.c

index 9b6e39dc0d794e461113d17ff2f45587dac2f784..85b86b82b964ae8f73fce4edd07de524e5f07dcb 100644 (file)
@@ -3945,7 +3945,11 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha)
        unsigned long flags;
        fc_port_t *fcport;
 
-       vha->flags.online = 0;
+       /* For ISP82XX, driver waits for completion of the commands.
+        * online flag should be set.
+        */
+       if (!IS_QLA82XX(ha))
+               vha->flags.online = 0;
        ha->flags.chip_reset_done = 0;
        clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
        ha->qla_stats.total_isp_aborts++;
@@ -3953,7 +3957,10 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha)
        qla_printk(KERN_INFO, ha,
            "Performing ISP error recovery - ha= %p.\n", ha);
 
-       /* Chip reset does not apply to 82XX */
+       /* For ISP82XX, reset_chip is just disabling interrupts.
+        * Driver waits for the completion of the commands.
+        * the interrupts need to be enabled.
+        */
        if (!IS_QLA82XX(ha))
                ha->isp_ops->reset_chip(vha);
 
@@ -3997,9 +4004,15 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha)
 
        if (!ha->flags.eeh_busy) {
                /* Make sure for ISP 82XX IO DMA is complete */
-               if (IS_QLA82XX(ha))
+               if (IS_QLA82XX(ha)) {
                        qla82xx_chip_reset_cleanup(vha);
 
+                       /* Done waiting for pending commands.
+                        * Reset the online flag.
+                        */
+                       vha->flags.online = 0;
+               }
+
                /* Requeue all commands in outstanding command list. */
                qla2x00_abort_all_cmds(vha, DID_RESET << 16);
        }