diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_bsg.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_bsg.c | 50 |
1 files changed, 9 insertions, 41 deletions
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index b1d0f936bf2d..1682e2e4201d 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xxx/qla_bsg.c | |||
@@ -108,13 +108,6 @@ qla24xx_proc_fcp_prio_cfg_cmd(struct fc_bsg_job *bsg_job) | |||
108 | goto exit_fcp_prio_cfg; | 108 | goto exit_fcp_prio_cfg; |
109 | } | 109 | } |
110 | 110 | ||
111 | if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || | ||
112 | test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || | ||
113 | test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { | ||
114 | ret = -EBUSY; | ||
115 | goto exit_fcp_prio_cfg; | ||
116 | } | ||
117 | |||
118 | /* Get the sub command */ | 111 | /* Get the sub command */ |
119 | oper = bsg_job->request->rqst_data.h_vendor.vendor_cmd[1]; | 112 | oper = bsg_job->request->rqst_data.h_vendor.vendor_cmd[1]; |
120 | 113 | ||
@@ -646,13 +639,6 @@ qla2x00_process_loopback(struct fc_bsg_job *bsg_job) | |||
646 | dma_addr_t rsp_data_dma; | 639 | dma_addr_t rsp_data_dma; |
647 | uint32_t rsp_data_len; | 640 | uint32_t rsp_data_len; |
648 | 641 | ||
649 | if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || | ||
650 | test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || | ||
651 | test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { | ||
652 | ql_log(ql_log_warn, vha, 0x7018, "Abort active or needed.\n"); | ||
653 | return -EBUSY; | ||
654 | } | ||
655 | |||
656 | if (!vha->flags.online) { | 642 | if (!vha->flags.online) { |
657 | ql_log(ql_log_warn, vha, 0x7019, "Host is not online.\n"); | 643 | ql_log(ql_log_warn, vha, 0x7019, "Host is not online.\n"); |
658 | return -EIO; | 644 | return -EIO; |
@@ -874,13 +860,6 @@ qla84xx_reset(struct fc_bsg_job *bsg_job) | |||
874 | int rval = 0; | 860 | int rval = 0; |
875 | uint32_t flag; | 861 | uint32_t flag; |
876 | 862 | ||
877 | if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || | ||
878 | test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || | ||
879 | test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { | ||
880 | ql_log(ql_log_warn, vha, 0x702e, "Abort active or needed.\n"); | ||
881 | return -EBUSY; | ||
882 | } | ||
883 | |||
884 | if (!IS_QLA84XX(ha)) { | 863 | if (!IS_QLA84XX(ha)) { |
885 | ql_dbg(ql_dbg_user, vha, 0x702f, "Not 84xx, exiting.\n"); | 864 | ql_dbg(ql_dbg_user, vha, 0x702f, "Not 84xx, exiting.\n"); |
886 | return -EINVAL; | 865 | return -EINVAL; |
@@ -922,11 +901,6 @@ qla84xx_updatefw(struct fc_bsg_job *bsg_job) | |||
922 | uint32_t flag; | 901 | uint32_t flag; |
923 | uint32_t fw_ver; | 902 | uint32_t fw_ver; |
924 | 903 | ||
925 | if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || | ||
926 | test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || | ||
927 | test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) | ||
928 | return -EBUSY; | ||
929 | |||
930 | if (!IS_QLA84XX(ha)) { | 904 | if (!IS_QLA84XX(ha)) { |
931 | ql_dbg(ql_dbg_user, vha, 0x7032, | 905 | ql_dbg(ql_dbg_user, vha, 0x7032, |
932 | "Not 84xx, exiting.\n"); | 906 | "Not 84xx, exiting.\n"); |
@@ -1036,14 +1010,6 @@ qla84xx_mgmt_cmd(struct fc_bsg_job *bsg_job) | |||
1036 | uint32_t data_len = 0; | 1010 | uint32_t data_len = 0; |
1037 | uint32_t dma_direction = DMA_NONE; | 1011 | uint32_t dma_direction = DMA_NONE; |
1038 | 1012 | ||
1039 | if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || | ||
1040 | test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || | ||
1041 | test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { | ||
1042 | ql_log(ql_log_warn, vha, 0x7039, | ||
1043 | "Abort active or needed.\n"); | ||
1044 | return -EBUSY; | ||
1045 | } | ||
1046 | |||
1047 | if (!IS_QLA84XX(ha)) { | 1013 | if (!IS_QLA84XX(ha)) { |
1048 | ql_log(ql_log_warn, vha, 0x703a, | 1014 | ql_log(ql_log_warn, vha, 0x703a, |
1049 | "Not 84xx, exiting.\n"); | 1015 | "Not 84xx, exiting.\n"); |
@@ -1246,13 +1212,6 @@ qla24xx_iidma(struct fc_bsg_job *bsg_job) | |||
1246 | 1212 | ||
1247 | bsg_job->reply->reply_payload_rcv_len = 0; | 1213 | bsg_job->reply->reply_payload_rcv_len = 0; |
1248 | 1214 | ||
1249 | if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) || | ||
1250 | test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || | ||
1251 | test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { | ||
1252 | ql_log(ql_log_warn, vha, 0x7045, "abort active or needed.\n"); | ||
1253 | return -EBUSY; | ||
1254 | } | ||
1255 | |||
1256 | if (!IS_IIDMA_CAPABLE(vha->hw)) { | 1215 | if (!IS_IIDMA_CAPABLE(vha->hw)) { |
1257 | ql_log(ql_log_info, vha, 0x7046, "iiDMA not supported.\n"); | 1216 | ql_log(ql_log_info, vha, 0x7046, "iiDMA not supported.\n"); |
1258 | return -EINVAL; | 1217 | return -EINVAL; |
@@ -1668,6 +1627,15 @@ qla24xx_bsg_request(struct fc_bsg_job *bsg_job) | |||
1668 | vha = shost_priv(host); | 1627 | vha = shost_priv(host); |
1669 | } | 1628 | } |
1670 | 1629 | ||
1630 | if (qla2x00_reset_active(vha)) { | ||
1631 | ql_dbg(ql_dbg_user, vha, 0x709f, | ||
1632 | "BSG: ISP abort active/needed -- cmd=%d.\n", | ||
1633 | bsg_job->request->msgcode); | ||
1634 | bsg_job->reply->result = (DID_ERROR << 16); | ||
1635 | bsg_job->job_done(bsg_job); | ||
1636 | return -EBUSY; | ||
1637 | } | ||
1638 | |||
1671 | ql_dbg(ql_dbg_user, vha, 0x7000, | 1639 | ql_dbg(ql_dbg_user, vha, 0x7000, |
1672 | "Entered %s msgcode=0x%x.\n", __func__, bsg_job->request->msgcode); | 1640 | "Entered %s msgcode=0x%x.\n", __func__, bsg_job->request->msgcode); |
1673 | 1641 | ||