aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Dupuis <chad.dupuis@qlogic.com>2013-02-08 01:57:52 -0500
committerJames Bottomley <JBottomley@Parallels.com>2013-02-22 07:41:20 -0500
commit992357c6514398ab874198f5059c5e5024480f8c (patch)
tree75a4701201db1ab84a77272033dc4d644d6a5b3f
parent67b2a31f517a43631af218d146e39f4e502b3e83 (diff)
[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: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/qla2xxx/qla_bsg.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
index be299c83e07e..747f440b1a93 100644
--- a/drivers/scsi/qla2xxx/qla_bsg.c
+++ b/drivers/scsi/qla2xxx/qla_bsg.c
@@ -790,6 +790,26 @@ qla2x00_process_loopback(struct fc_bsg_job *bsg_job)
790 command_sent = INT_DEF_LB_LOOPBACK_CMD; 790 command_sent = INT_DEF_LB_LOOPBACK_CMD;
791 rval = qla2x00_loopback_test(vha, &elreq, response); 791 rval = qla2x00_loopback_test(vha, &elreq, response);
792 792
793 if (response[0] == MBS_COMMAND_ERROR &&
794 response[1] == MBS_LB_RESET) {
795 ql_log(ql_log_warn, vha, 0x7029,
796 "MBX command error, Aborting ISP.\n");
797 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
798 qla2xxx_wake_dpc(vha);
799 qla2x00_wait_for_chip_reset(vha);
800 /* Also reset the MPI */
801 if (IS_QLA81XX(ha)) {
802 if (qla81xx_restart_mpi_firmware(vha) !=
803 QLA_SUCCESS) {
804 ql_log(ql_log_warn, vha, 0x702a,
805 "MPI reset failed.\n");
806 }
807 }
808
809 rval = -EIO;
810 goto done_free_dma_rsp;
811 }
812
793 if (new_config[0]) { 813 if (new_config[0]) {
794 int ret; 814 int ret;
795 815
@@ -811,25 +831,6 @@ qla2x00_process_loopback(struct fc_bsg_job *bsg_job)
811 831
812 } 832 }
813 833
814 if (response[0] == MBS_COMMAND_ERROR &&
815 response[1] == MBS_LB_RESET) {
816 ql_log(ql_log_warn, vha, 0x7029,
817 "MBX command error, Aborting ISP.\n");
818 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
819 qla2xxx_wake_dpc(vha);
820 qla2x00_wait_for_chip_reset(vha);
821 /* Also reset the MPI */
822 if (IS_QLA81XX(ha)) {
823 if (qla81xx_restart_mpi_firmware(vha) !=
824 QLA_SUCCESS) {
825 ql_log(ql_log_warn, vha, 0x702a,
826 "MPI reset failed.\n");
827 }
828 }
829
830 rval = -EIO;
831 goto done_free_dma_rsp;
832 }
833 } else { 834 } else {
834 type = "FC_BSG_HST_VENDOR_LOOPBACK"; 835 type = "FC_BSG_HST_VENDOR_LOOPBACK";
835 ql_dbg(ql_dbg_user, vha, 0x702b, 836 ql_dbg(ql_dbg_user, vha, 0x702b,