aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h1
-rw-r--r--drivers/scsi/qla2xxx/qla_iocb.c12
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c2
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c2
-rw-r--r--drivers/scsi/qla2xxx/qla_mid.c4
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c3
6 files changed, 11 insertions, 13 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index c8e5af5f56a7..6b3762243689 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -187,7 +187,6 @@ struct req_que;
187 * SCSI Request Block 187 * SCSI Request Block
188 */ 188 */
189typedef struct srb { 189typedef struct srb {
190 struct scsi_qla_host *vha; /* HA the SP is queued on */
191 struct req_que *que; 190 struct req_que *que;
192 struct fc_port *fcport; 191 struct fc_port *fcport;
193 192
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
index 5bedc9d05942..2258152b1f41 100644
--- a/drivers/scsi/qla2xxx/qla_iocb.c
+++ b/drivers/scsi/qla2xxx/qla_iocb.c
@@ -173,7 +173,7 @@ void qla2x00_build_scsi_iocbs_32(srb_t *sp, cmd_entry_t *cmd_pkt,
173 return; 173 return;
174 } 174 }
175 175
176 vha = sp->vha; 176 vha = sp->fcport->vha;
177 req = sp->que; 177 req = sp->que;
178 178
179 cmd_pkt->control_flags |= cpu_to_le16(qla2x00_get_cmd_direction(sp)); 179 cmd_pkt->control_flags |= cpu_to_le16(qla2x00_get_cmd_direction(sp));
@@ -234,7 +234,7 @@ void qla2x00_build_scsi_iocbs_64(srb_t *sp, cmd_entry_t *cmd_pkt,
234 return; 234 return;
235 } 235 }
236 236
237 vha = sp->vha; 237 vha = sp->fcport->vha;
238 req = sp->que; 238 req = sp->que;
239 239
240 cmd_pkt->control_flags |= cpu_to_le16(qla2x00_get_cmd_direction(sp)); 240 cmd_pkt->control_flags |= cpu_to_le16(qla2x00_get_cmd_direction(sp));
@@ -294,7 +294,7 @@ qla2x00_start_scsi(srb_t *sp)
294 294
295 /* Setup device pointers. */ 295 /* Setup device pointers. */
296 ret = 0; 296 ret = 0;
297 vha = sp->vha; 297 vha = sp->fcport->vha;
298 ha = vha->hw; 298 ha = vha->hw;
299 reg = &ha->iobase->isp; 299 reg = &ha->iobase->isp;
300 cmd = sp->cmd; 300 cmd = sp->cmd;
@@ -353,7 +353,6 @@ qla2x00_start_scsi(srb_t *sp)
353 /* Build command packet */ 353 /* Build command packet */
354 req->current_outstanding_cmd = handle; 354 req->current_outstanding_cmd = handle;
355 req->outstanding_cmds[handle] = sp; 355 req->outstanding_cmds[handle] = sp;
356 sp->vha = vha;
357 sp->que = req; 356 sp->que = req;
358 sp->cmd->host_scribble = (unsigned char *)(unsigned long)handle; 357 sp->cmd->host_scribble = (unsigned char *)(unsigned long)handle;
359 req->cnt -= req_cnt; 358 req->cnt -= req_cnt;
@@ -656,7 +655,7 @@ qla24xx_build_scsi_iocbs(srb_t *sp, struct cmd_type_7 *cmd_pkt,
656 return; 655 return;
657 } 656 }
658 657
659 vha = sp->vha; 658 vha = sp->fcport->vha;
660 req = sp->que; 659 req = sp->que;
661 660
662 /* Set transfer direction */ 661 /* Set transfer direction */
@@ -723,7 +722,7 @@ qla24xx_start_scsi(srb_t *sp)
723 struct req_que *req = NULL; 722 struct req_que *req = NULL;
724 struct rsp_que *rsp = NULL; 723 struct rsp_que *rsp = NULL;
725 struct scsi_cmnd *cmd = sp->cmd; 724 struct scsi_cmnd *cmd = sp->cmd;
726 struct scsi_qla_host *vha = sp->vha; 725 struct scsi_qla_host *vha = sp->fcport->vha;
727 struct qla_hw_data *ha = vha->hw; 726 struct qla_hw_data *ha = vha->hw;
728 uint16_t que_id; 727 uint16_t que_id;
729 728
@@ -791,7 +790,6 @@ qla24xx_start_scsi(srb_t *sp)
791 /* Build command packet. */ 790 /* Build command packet. */
792 req->current_outstanding_cmd = handle; 791 req->current_outstanding_cmd = handle;
793 req->outstanding_cmds[handle] = sp; 792 req->outstanding_cmds[handle] = sp;
794 sp->vha = vha;
795 sp->cmd->host_scribble = (unsigned char *)(unsigned long)handle; 793 sp->cmd->host_scribble = (unsigned char *)(unsigned long)handle;
796 req->cnt -= req_cnt; 794 req->cnt -= req_cnt;
797 795
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 5ff6f9453c0f..dcfec7429cc7 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -2026,7 +2026,7 @@ qla2x00_get_rsp_host(struct rsp_que *rsp)
2026 if (pkt && pkt->handle < MAX_OUTSTANDING_COMMANDS) { 2026 if (pkt && pkt->handle < MAX_OUTSTANDING_COMMANDS) {
2027 sp = req->outstanding_cmds[pkt->handle]; 2027 sp = req->outstanding_cmds[pkt->handle];
2028 if (sp) 2028 if (sp)
2029 vha = sp->vha; 2029 vha = sp->fcport->vha;
2030 } 2030 }
2031 } 2031 }
2032 if (!vha) 2032 if (!vha)
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 29bf8bc8731a..4cb679146126 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -3145,7 +3145,7 @@ qla25xx_init_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp,
3145 mcp->mb[7] = LSW(MSD(rsp->dma)); 3145 mcp->mb[7] = LSW(MSD(rsp->dma));
3146 mcp->mb[5] = rsp->length; 3146 mcp->mb[5] = rsp->length;
3147 mcp->mb[11] = rsp->vp_idx; 3147 mcp->mb[11] = rsp->vp_idx;
3148 mcp->mb[14] = rsp->msix->vector; 3148 mcp->mb[14] = rsp->msix->entry;
3149 mcp->mb[13] = rsp->rid; 3149 mcp->mb[13] = rsp->rid;
3150 3150
3151 reg = (struct device_reg_25xxmq *)((void *)(ha->mqiobase) + 3151 reg = (struct device_reg_25xxmq *)((void *)(ha->mqiobase) +
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c
index 386ffeae5b5a..886323130fcc 100644
--- a/drivers/scsi/qla2xxx/qla_mid.c
+++ b/drivers/scsi/qla2xxx/qla_mid.c
@@ -614,8 +614,10 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options,
614 req->vp_idx = vp_idx; 614 req->vp_idx = vp_idx;
615 req->qos = qos; 615 req->qos = qos;
616 616
617 if (ha->rsp_q_map[rsp_que]) 617 if (ha->rsp_q_map[rsp_que]) {
618 req->rsp = ha->rsp_q_map[rsp_que]; 618 req->rsp = ha->rsp_q_map[rsp_que];
619 req->rsp->req = req;
620 }
619 /* Use alternate PCI bus number */ 621 /* Use alternate PCI bus number */
620 if (MSB(req->rid)) 622 if (MSB(req->rid))
621 options |= BIT_4; 623 options |= BIT_4;
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 3580c034ab0a..1b475c5fa6f4 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -438,7 +438,6 @@ qla2x00_get_new_sp(scsi_qla_host_t *vha, fc_port_t *fcport,
438 if (!sp) 438 if (!sp)
439 return sp; 439 return sp;
440 440
441 sp->vha = vha;
442 sp->fcport = fcport; 441 sp->fcport = fcport;
443 sp->cmd = cmd; 442 sp->cmd = cmd;
444 sp->que = ha->req_q_map[0]; 443 sp->que = ha->req_q_map[0];
@@ -1182,7 +1181,7 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res)
1182 continue; 1181 continue;
1183 for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) { 1182 for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) {
1184 sp = req->outstanding_cmds[cnt]; 1183 sp = req->outstanding_cmds[cnt];
1185 if (sp && sp->vha == vha) { 1184 if (sp && sp->fcport->vha == vha) {
1186 req->outstanding_cmds[cnt] = NULL; 1185 req->outstanding_cmds[cnt] = NULL;
1187 sp->cmd->result = res; 1186 sp->cmd->result = res;
1188 qla2x00_sp_compl(ha, sp); 1187 qla2x00_sp_compl(ha, sp);