aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_iocb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_iocb.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_iocb.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
index dbec89622a0f..a4b267e60a35 100644
--- a/drivers/scsi/qla2xxx/qla_iocb.c
+++ b/drivers/scsi/qla2xxx/qla_iocb.c
@@ -120,11 +120,10 @@ qla2x00_prep_cont_type0_iocb(struct scsi_qla_host *vha)
120 * Returns a pointer to the continuation type 1 IOCB packet. 120 * Returns a pointer to the continuation type 1 IOCB packet.
121 */ 121 */
122static inline cont_a64_entry_t * 122static inline cont_a64_entry_t *
123qla2x00_prep_cont_type1_iocb(scsi_qla_host_t *vha) 123qla2x00_prep_cont_type1_iocb(scsi_qla_host_t *vha, struct req_que *req)
124{ 124{
125 cont_a64_entry_t *cont_pkt; 125 cont_a64_entry_t *cont_pkt;
126 126
127 struct req_que *req = vha->req;
128 /* Adjust ring index. */ 127 /* Adjust ring index. */
129 req->ring_index++; 128 req->ring_index++;
130 if (req->ring_index == req->length) { 129 if (req->ring_index == req->length) {
@@ -292,7 +291,7 @@ void qla2x00_build_scsi_iocbs_64(srb_t *sp, cmd_entry_t *cmd_pkt,
292 * Five DSDs are available in the Continuation 291 * Five DSDs are available in the Continuation
293 * Type 1 IOCB. 292 * Type 1 IOCB.
294 */ 293 */
295 cont_pkt = qla2x00_prep_cont_type1_iocb(vha); 294 cont_pkt = qla2x00_prep_cont_type1_iocb(vha, vha->req);
296 cur_dsd = (uint32_t *)cont_pkt->dseg_0_address; 295 cur_dsd = (uint32_t *)cont_pkt->dseg_0_address;
297 avail_dsds = 5; 296 avail_dsds = 5;
298 } 297 }
@@ -684,7 +683,7 @@ qla24xx_build_scsi_iocbs(srb_t *sp, struct cmd_type_7 *cmd_pkt,
684 * Five DSDs are available in the Continuation 683 * Five DSDs are available in the Continuation
685 * Type 1 IOCB. 684 * Type 1 IOCB.
686 */ 685 */
687 cont_pkt = qla2x00_prep_cont_type1_iocb(vha); 686 cont_pkt = qla2x00_prep_cont_type1_iocb(vha, vha->req);
688 cur_dsd = (uint32_t *)cont_pkt->dseg_0_address; 687 cur_dsd = (uint32_t *)cont_pkt->dseg_0_address;
689 avail_dsds = 5; 688 avail_dsds = 5;
690 } 689 }
@@ -2070,7 +2069,8 @@ qla2x00_ct_iocb(srb_t *sp, ms_iocb_entry_t *ct_iocb)
2070 * Five DSDs are available in the Cont. 2069 * Five DSDs are available in the Cont.
2071 * Type 1 IOCB. 2070 * Type 1 IOCB.
2072 */ 2071 */
2073 cont_pkt = qla2x00_prep_cont_type1_iocb(vha); 2072 cont_pkt = qla2x00_prep_cont_type1_iocb(vha,
2073 vha->hw->req_q_map[0]);
2074 cur_dsd = (uint32_t *) cont_pkt->dseg_0_address; 2074 cur_dsd = (uint32_t *) cont_pkt->dseg_0_address;
2075 avail_dsds = 5; 2075 avail_dsds = 5;
2076 cont_iocb_prsnt = 1; 2076 cont_iocb_prsnt = 1;
@@ -2096,6 +2096,7 @@ qla24xx_ct_iocb(srb_t *sp, struct ct_entry_24xx *ct_iocb)
2096 int index; 2096 int index;
2097 uint16_t tot_dsds; 2097 uint16_t tot_dsds;
2098 scsi_qla_host_t *vha = sp->fcport->vha; 2098 scsi_qla_host_t *vha = sp->fcport->vha;
2099 struct qla_hw_data *ha = vha->hw;
2099 struct fc_bsg_job *bsg_job = ((struct srb_ctx *)sp->ctx)->u.bsg_job; 2100 struct fc_bsg_job *bsg_job = ((struct srb_ctx *)sp->ctx)->u.bsg_job;
2100 int loop_iterartion = 0; 2101 int loop_iterartion = 0;
2101 int cont_iocb_prsnt = 0; 2102 int cont_iocb_prsnt = 0;
@@ -2141,7 +2142,8 @@ qla24xx_ct_iocb(srb_t *sp, struct ct_entry_24xx *ct_iocb)
2141 * Five DSDs are available in the Cont. 2142 * Five DSDs are available in the Cont.
2142 * Type 1 IOCB. 2143 * Type 1 IOCB.
2143 */ 2144 */
2144 cont_pkt = qla2x00_prep_cont_type1_iocb(vha); 2145 cont_pkt = qla2x00_prep_cont_type1_iocb(vha,
2146 ha->req_q_map[0]);
2145 cur_dsd = (uint32_t *) cont_pkt->dseg_0_address; 2147 cur_dsd = (uint32_t *) cont_pkt->dseg_0_address;
2146 avail_dsds = 5; 2148 avail_dsds = 5;
2147 cont_iocb_prsnt = 1; 2149 cont_iocb_prsnt = 1;