[PATCH 2/2] qla4xxx: Driver Fault Recovery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Driver Fault Recovery

Fixed driver bug where adapter recovery did not complete if there were
outstanding commands detected on that host adapter.

Signed-off-by: Karen Higgins <karen.higgins@xxxxxxxxxx>
---
 drivers/scsi/qla4xxx/ql4_os.c |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index eb3a414..fcc65a5 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -904,18 +904,17 @@ static int qla4xxx_recover_adapter(struct scsi_qla_host *ha,
     /* Flush any pending ddb changed AENs */
     qla4xxx_process_aen(ha, FLUSH_DDB_CHANGED_AENS);
 
+    qla4xxx_flush_active_srbs(ha);
+
     /* Reset the firmware.    If successful, function
      * returns with ISP interrupts enabled.
      */
-    if (status == QLA_SUCCESS) {
-        DEBUG2(printk("scsi%ld: %s - Performing soft reset..\n",
-                  ha->host_no, __func__));
-        qla4xxx_flush_active_srbs(ha);
-        if (ql4xxx_lock_drvr_wait(ha) == QLA_SUCCESS)
-            status = qla4xxx_soft_reset(ha);
-        else
-            status = QLA_ERROR;
-    }
+    DEBUG2(printk("scsi%ld: %s - Performing soft reset..\n",
+              ha->host_no, __func__));
+    if (ql4xxx_lock_drvr_wait(ha) == QLA_SUCCESS)
+        status = qla4xxx_soft_reset(ha);
+    else
+        status = QLA_ERROR;
 
     /* Flush any pending ddb changed AENs */
     qla4xxx_process_aen(ha, FLUSH_DDB_CHANGED_AENS);
@@ -1644,7 +1643,7 @@ static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd)
     ha = (struct scsi_qla_host *) cmd->device->host->hostdata;
 
     dev_info(&ha->pdev->dev,
-           "scsi(%ld:%d:%d:%d): ADAPTER RESET ISSUED.\n", ha->host_no,
+           "scsi(%ld:%d:%d:%d): HOST RESET ISSUED.\n", ha->host_no,
            cmd->device->channel, cmd->device->id, cmd->device->lun);
 
     if (qla4xxx_wait_for_hba_online(ha) != QLA_SUCCESS) {
-- 
1.5.6
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux