diff options
author | Joe Carnuccio <joe.carnuccio@qlogic.com> | 2013-03-28 08:21:26 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-04-11 18:48:42 -0400 |
commit | 1b98b42150af7ab1673a49219ea86111109e0ef8 (patch) | |
tree | a930f3e86c79888c4018932c2d522b62ceb4b365 | |
parent | 490b773a02a1832f629fe36e3e5d6b9d54f74d2c (diff) |
[SCSI] qla2xxx: Obtain loopback iteration count from bsg request.
qla2x00_loopback_test() was hard setting the loopback iteration
count to 1 rather than obtaining it from the bsg request.
Signed-off-by: Joe Carnuccio <joe.carnuccio@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.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 1 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 5 |
3 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index 7d2f021dda6d..39719f892488 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xxx/qla_bsg.c | |||
@@ -768,6 +768,8 @@ qla2x00_process_loopback(struct fc_bsg_job *bsg_job) | |||
768 | elreq.transfer_size = req_data_len; | 768 | elreq.transfer_size = req_data_len; |
769 | 769 | ||
770 | elreq.options = bsg_job->request->rqst_data.h_vendor.vendor_cmd[1]; | 770 | elreq.options = bsg_job->request->rqst_data.h_vendor.vendor_cmd[1]; |
771 | elreq.iteration_count = | ||
772 | bsg_job->request->rqst_data.h_vendor.vendor_cmd[2]; | ||
771 | 773 | ||
772 | if (atomic_read(&vha->loop_state) == LOOP_READY && | 774 | if (atomic_read(&vha->loop_state) == LOOP_READY && |
773 | (ha->current_topology == ISP_CFG_F || | 775 | (ha->current_topology == ISP_CFG_F || |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index e52722d759fc..c32efc753229 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -417,6 +417,7 @@ struct msg_echo_lb { | |||
417 | uint16_t rsp_sg_cnt; | 417 | uint16_t rsp_sg_cnt; |
418 | uint16_t options; | 418 | uint16_t options; |
419 | uint32_t transfer_size; | 419 | uint32_t transfer_size; |
420 | uint32_t iteration_count; | ||
420 | }; | 421 | }; |
421 | 422 | ||
422 | /* | 423 | /* |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 3b6a41c7fecf..9e5d89db7272 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -4113,7 +4113,6 @@ qla2x00_loopback_test(scsi_qla_host_t *vha, struct msg_echo_lb *mreq, | |||
4113 | int rval; | 4113 | int rval; |
4114 | mbx_cmd_t mc; | 4114 | mbx_cmd_t mc; |
4115 | mbx_cmd_t *mcp = &mc; | 4115 | mbx_cmd_t *mcp = &mc; |
4116 | uint32_t iter_cnt = 0x1; | ||
4117 | 4116 | ||
4118 | ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x10f7, | 4117 | ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x10f7, |
4119 | "Entered %s.\n", __func__); | 4118 | "Entered %s.\n", __func__); |
@@ -4139,8 +4138,8 @@ qla2x00_loopback_test(scsi_qla_host_t *vha, struct msg_echo_lb *mreq, | |||
4139 | mcp->mb[7] = MSW(MSD(mreq->rcv_dma)); | 4138 | mcp->mb[7] = MSW(MSD(mreq->rcv_dma)); |
4140 | 4139 | ||
4141 | /* Iteration count */ | 4140 | /* Iteration count */ |
4142 | mcp->mb[18] = LSW(iter_cnt); | 4141 | mcp->mb[18] = LSW(mreq->iteration_count); |
4143 | mcp->mb[19] = MSW(iter_cnt); | 4142 | mcp->mb[19] = MSW(mreq->iteration_count); |
4144 | 4143 | ||
4145 | mcp->out_mb = MBX_21|MBX_20|MBX_19|MBX_18|MBX_17|MBX_16|MBX_15| | 4144 | mcp->out_mb = MBX_21|MBX_20|MBX_19|MBX_18|MBX_17|MBX_16|MBX_15| |
4146 | MBX_14|MBX_13|MBX_12|MBX_11|MBX_10|MBX_7|MBX_6|MBX_1|MBX_0; | 4145 | MBX_14|MBX_13|MBX_12|MBX_11|MBX_10|MBX_7|MBX_6|MBX_1|MBX_0; |