Commit 9a41a62b authored by Andrew Vasquez's avatar Andrew Vasquez Committed by James Bottomley

[SCSI] qla2xxx: remove eh_active checks in qla2xxx error handling

Here's a patch which drops the eh_active checks in the qla2xxx
eh_handler callbacks.
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 7a691bd3
...@@ -762,29 +762,19 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd) ...@@ -762,29 +762,19 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd)
goto eh_dev_reset_done; goto eh_dev_reset_done;
} }
/* /* Flush outstanding commands. */
* If we are coming down the EH path, wait for all commands to
* complete for the device.
*/
if (cmd->device->host->eh_active) {
if (qla2x00_eh_wait_for_pending_target_commands(ha, id)) if (qla2x00_eh_wait_for_pending_target_commands(ha, id))
ret = FAILED; ret = FAILED;
if (ret == FAILED) { if (ret == FAILED) {
DEBUG3(printk("%s(%ld): failed while waiting for " DEBUG3(printk("%s(%ld): failed while waiting for commands\n",
"commands\n", __func__, ha->host_no)); __func__, ha->host_no));
qla_printk(KERN_INFO, ha, qla_printk(KERN_INFO, ha,
"%s: failed while waiting for commands\n", "%s: failed while waiting for commands\n", __func__);
__func__); } else
goto eh_dev_reset_done;
}
}
qla_printk(KERN_INFO, ha, qla_printk(KERN_INFO, ha,
"scsi(%ld:%d:%d): DEVICE RESET SUCCEEDED.\n", ha->host_no, id, lun); "scsi(%ld:%d:%d): DEVICE RESET SUCCEEDED.\n", ha->host_no,
id, lun);
eh_dev_reset_done:
return ret; return ret;
} }
...@@ -886,8 +876,7 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd) ...@@ -886,8 +876,7 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd)
if (ret == FAILED) if (ret == FAILED)
goto eh_bus_reset_done; goto eh_bus_reset_done;
/* Waiting for our command in done_queue to be returned to OS.*/ /* Flush outstanding commands. */
if (cmd->device->host->eh_active)
if (!qla2x00_eh_wait_for_pending_commands(ha)) if (!qla2x00_eh_wait_for_pending_commands(ha))
ret = FAILED; ret = FAILED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment