Commit 992357c6 authored by Chad Dupuis's avatar Chad Dupuis Committed by James Bottomley

[SCSI] qla2xxx: Move loopback mode reset after chip reset check.

If we need to do a chip reset because of a serious loopback error don't try to
reset the loopback mode on the port as the mailbox command will timeout.
Signed-off-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: default avatarSaurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 67b2a31f
...@@ -790,6 +790,26 @@ qla2x00_process_loopback(struct fc_bsg_job *bsg_job) ...@@ -790,6 +790,26 @@ qla2x00_process_loopback(struct fc_bsg_job *bsg_job)
command_sent = INT_DEF_LB_LOOPBACK_CMD; command_sent = INT_DEF_LB_LOOPBACK_CMD;
rval = qla2x00_loopback_test(vha, &elreq, response); rval = qla2x00_loopback_test(vha, &elreq, response);
if (response[0] == MBS_COMMAND_ERROR &&
response[1] == MBS_LB_RESET) {
ql_log(ql_log_warn, vha, 0x7029,
"MBX command error, Aborting ISP.\n");
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
qla2xxx_wake_dpc(vha);
qla2x00_wait_for_chip_reset(vha);
/* Also reset the MPI */
if (IS_QLA81XX(ha)) {
if (qla81xx_restart_mpi_firmware(vha) !=
QLA_SUCCESS) {
ql_log(ql_log_warn, vha, 0x702a,
"MPI reset failed.\n");
}
}
rval = -EIO;
goto done_free_dma_rsp;
}
if (new_config[0]) { if (new_config[0]) {
int ret; int ret;
...@@ -811,25 +831,6 @@ qla2x00_process_loopback(struct fc_bsg_job *bsg_job) ...@@ -811,25 +831,6 @@ qla2x00_process_loopback(struct fc_bsg_job *bsg_job)
} }
if (response[0] == MBS_COMMAND_ERROR &&
response[1] == MBS_LB_RESET) {
ql_log(ql_log_warn, vha, 0x7029,
"MBX command error, Aborting ISP.\n");
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
qla2xxx_wake_dpc(vha);
qla2x00_wait_for_chip_reset(vha);
/* Also reset the MPI */
if (IS_QLA81XX(ha)) {
if (qla81xx_restart_mpi_firmware(vha) !=
QLA_SUCCESS) {
ql_log(ql_log_warn, vha, 0x702a,
"MPI reset failed.\n");
}
}
rval = -EIO;
goto done_free_dma_rsp;
}
} else { } else {
type = "FC_BSG_HST_VENDOR_LOOPBACK"; type = "FC_BSG_HST_VENDOR_LOOPBACK";
ql_dbg(ql_dbg_user, vha, 0x702b, ql_dbg(ql_dbg_user, vha, 0x702b,
......
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