]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] qla2xxx: Update to AER support, do early abort commands.
authorLalit Chandivade <lalit.chandivade@qlogic.com>
Fri, 3 Sep 2010 22:20:53 +0000 (15:20 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Sun, 5 Sep 2010 18:35:00 +0000 (15:35 -0300)
Currently the IOs are returned back in slot reset, this
could be late and can cause error handler to invoke.
If error handler invokes, eh_abort fails and escalate to
device/bus/host resets causing issues.
The commands need to be returned back to upper layer in
io_error_detected.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_os.c

index 9f71226e0a3e1ddfc159fb05c280f052c54870b0..f2da5c5dacddd0dd7f03885e6c9ceda9f3ff8112 100644 (file)
@@ -3835,17 +3835,19 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_t *vha)
                            LOOP_DOWN_TIME);
        }
 
-       /* Make sure for ISP 82XX IO DMA is complete */
-       if (IS_QLA82XX(ha)) {
-               if (qla2x00_eh_wait_for_pending_commands(vha, 0, 0,
-                       WAIT_HOST) == QLA_SUCCESS) {
-                       DEBUG2(qla_printk(KERN_INFO, ha,
-                       "Done wait for pending commands\n"));
+       if (!ha->flags.eeh_busy) {
+               /* Make sure for ISP 82XX IO DMA is complete */
+               if (IS_QLA82XX(ha)) {
+                       if (qla2x00_eh_wait_for_pending_commands(vha, 0, 0,
+                               WAIT_HOST) == QLA_SUCCESS) {
+                               DEBUG2(qla_printk(KERN_INFO, ha,
+                               "Done wait for pending commands\n"));
+                       }
                }
-       }
 
-       /* Requeue all commands in outstanding command list. */
-       qla2x00_abort_all_cmds(vha, DID_RESET << 16);
+               /* Requeue all commands in outstanding command list. */
+               qla2x00_abort_all_cmds(vha, DID_RESET << 16);
+       }
 }
 
 /*
index cfa55827a101bedda4ac9a0a65b9c58289139b3d..e1782f7714003f10a6b7223d0788cb8bf32c7c92 100644 (file)
@@ -3773,6 +3773,8 @@ qla2xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
                }
                qla2x00_free_irqs(vha);
                pci_disable_device(pdev);
+               /* Return back all IOs */
+               qla2x00_abort_all_cmds(vha, DID_RESET << 16);
                return PCI_ERS_RESULT_NEED_RESET;
        case pci_channel_io_perm_failure:
                ha->flags.pci_channel_io_perm_failure = 1;