diff options
author | Joe Carnuccio <joe.carnuccio@qlogic.com> | 2012-05-15 14:34:20 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-05-22 06:37:07 -0400 |
commit | c6d39e23d5f260a051b597a357d314698c33a58f (patch) | |
tree | 8c58ac2f9a3cdf5e7e1178d689bec53427f69975 /drivers/scsi/qla2xxx/qla_iocb.c | |
parent | f863f603bbb765a144d2773b9e06d07ff0b16bd7 (diff) |
[SCSI] qla2xxx: Remove mirrored field vp_idx from struct fc_port.
The field vp_idx in struct fc_port is a redundant/mirror copy of
the same field in struct scsi_qla_host;
struct fc_port has a pointer vha to scsi_qla_host which allows
the original copy of vp_idx to be readily accessed.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_iocb.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_iocb.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index 7404c6e7865e..6bf6c08650e8 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c | |||
@@ -1243,7 +1243,7 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt, | |||
1243 | return QLA_SUCCESS; | 1243 | return QLA_SUCCESS; |
1244 | } | 1244 | } |
1245 | 1245 | ||
1246 | cmd_pkt->vp_index = sp->fcport->vp_idx; | 1246 | cmd_pkt->vp_index = sp->fcport->vha->vp_idx; |
1247 | 1247 | ||
1248 | /* Set transfer direction */ | 1248 | /* Set transfer direction */ |
1249 | if (cmd->sc_data_direction == DMA_TO_DEVICE) { | 1249 | if (cmd->sc_data_direction == DMA_TO_DEVICE) { |
@@ -1525,7 +1525,7 @@ qla24xx_start_scsi(srb_t *sp) | |||
1525 | cmd_pkt->port_id[0] = sp->fcport->d_id.b.al_pa; | 1525 | cmd_pkt->port_id[0] = sp->fcport->d_id.b.al_pa; |
1526 | cmd_pkt->port_id[1] = sp->fcport->d_id.b.area; | 1526 | cmd_pkt->port_id[1] = sp->fcport->d_id.b.area; |
1527 | cmd_pkt->port_id[2] = sp->fcport->d_id.b.domain; | 1527 | cmd_pkt->port_id[2] = sp->fcport->d_id.b.domain; |
1528 | cmd_pkt->vp_index = sp->fcport->vp_idx; | 1528 | cmd_pkt->vp_index = sp->fcport->vha->vp_idx; |
1529 | 1529 | ||
1530 | int_to_scsilun(cmd->device->lun, &cmd_pkt->lun); | 1530 | int_to_scsilun(cmd->device->lun, &cmd_pkt->lun); |
1531 | host_to_fcp_swap((uint8_t *)&cmd_pkt->lun, sizeof(cmd_pkt->lun)); | 1531 | host_to_fcp_swap((uint8_t *)&cmd_pkt->lun, sizeof(cmd_pkt->lun)); |
@@ -1895,7 +1895,7 @@ qla24xx_login_iocb(srb_t *sp, struct logio_entry_24xx *logio) | |||
1895 | logio->port_id[0] = sp->fcport->d_id.b.al_pa; | 1895 | logio->port_id[0] = sp->fcport->d_id.b.al_pa; |
1896 | logio->port_id[1] = sp->fcport->d_id.b.area; | 1896 | logio->port_id[1] = sp->fcport->d_id.b.area; |
1897 | logio->port_id[2] = sp->fcport->d_id.b.domain; | 1897 | logio->port_id[2] = sp->fcport->d_id.b.domain; |
1898 | logio->vp_index = sp->fcport->vp_idx; | 1898 | logio->vp_index = sp->fcport->vha->vp_idx; |
1899 | } | 1899 | } |
1900 | 1900 | ||
1901 | static void | 1901 | static void |
@@ -1919,7 +1919,7 @@ qla2x00_login_iocb(srb_t *sp, struct mbx_entry *mbx) | |||
1919 | mbx->mb2 = cpu_to_le16(sp->fcport->d_id.b.domain); | 1919 | mbx->mb2 = cpu_to_le16(sp->fcport->d_id.b.domain); |
1920 | mbx->mb3 = cpu_to_le16(sp->fcport->d_id.b.area << 8 | | 1920 | mbx->mb3 = cpu_to_le16(sp->fcport->d_id.b.area << 8 | |
1921 | sp->fcport->d_id.b.al_pa); | 1921 | sp->fcport->d_id.b.al_pa); |
1922 | mbx->mb9 = cpu_to_le16(sp->fcport->vp_idx); | 1922 | mbx->mb9 = cpu_to_le16(sp->fcport->vha->vp_idx); |
1923 | } | 1923 | } |
1924 | 1924 | ||
1925 | static void | 1925 | static void |
@@ -1932,7 +1932,7 @@ qla24xx_logout_iocb(srb_t *sp, struct logio_entry_24xx *logio) | |||
1932 | logio->port_id[0] = sp->fcport->d_id.b.al_pa; | 1932 | logio->port_id[0] = sp->fcport->d_id.b.al_pa; |
1933 | logio->port_id[1] = sp->fcport->d_id.b.area; | 1933 | logio->port_id[1] = sp->fcport->d_id.b.area; |
1934 | logio->port_id[2] = sp->fcport->d_id.b.domain; | 1934 | logio->port_id[2] = sp->fcport->d_id.b.domain; |
1935 | logio->vp_index = sp->fcport->vp_idx; | 1935 | logio->vp_index = sp->fcport->vha->vp_idx; |
1936 | } | 1936 | } |
1937 | 1937 | ||
1938 | static void | 1938 | static void |
@@ -1949,7 +1949,7 @@ qla2x00_logout_iocb(srb_t *sp, struct mbx_entry *mbx) | |||
1949 | mbx->mb2 = cpu_to_le16(sp->fcport->d_id.b.domain); | 1949 | mbx->mb2 = cpu_to_le16(sp->fcport->d_id.b.domain); |
1950 | mbx->mb3 = cpu_to_le16(sp->fcport->d_id.b.area << 8 | | 1950 | mbx->mb3 = cpu_to_le16(sp->fcport->d_id.b.area << 8 | |
1951 | sp->fcport->d_id.b.al_pa); | 1951 | sp->fcport->d_id.b.al_pa); |
1952 | mbx->mb9 = cpu_to_le16(sp->fcport->vp_idx); | 1952 | mbx->mb9 = cpu_to_le16(sp->fcport->vha->vp_idx); |
1953 | /* Implicit: mbx->mbx10 = 0. */ | 1953 | /* Implicit: mbx->mbx10 = 0. */ |
1954 | } | 1954 | } |
1955 | 1955 | ||
@@ -1959,7 +1959,7 @@ qla24xx_adisc_iocb(srb_t *sp, struct logio_entry_24xx *logio) | |||
1959 | logio->entry_type = LOGINOUT_PORT_IOCB_TYPE; | 1959 | logio->entry_type = LOGINOUT_PORT_IOCB_TYPE; |
1960 | logio->control_flags = cpu_to_le16(LCF_COMMAND_ADISC); | 1960 | logio->control_flags = cpu_to_le16(LCF_COMMAND_ADISC); |
1961 | logio->nport_handle = cpu_to_le16(sp->fcport->loop_id); | 1961 | logio->nport_handle = cpu_to_le16(sp->fcport->loop_id); |
1962 | logio->vp_index = sp->fcport->vp_idx; | 1962 | logio->vp_index = sp->fcport->vha->vp_idx; |
1963 | } | 1963 | } |
1964 | 1964 | ||
1965 | static void | 1965 | static void |
@@ -1980,7 +1980,7 @@ qla2x00_adisc_iocb(srb_t *sp, struct mbx_entry *mbx) | |||
1980 | mbx->mb3 = cpu_to_le16(LSW(ha->async_pd_dma)); | 1980 | mbx->mb3 = cpu_to_le16(LSW(ha->async_pd_dma)); |
1981 | mbx->mb6 = cpu_to_le16(MSW(MSD(ha->async_pd_dma))); | 1981 | mbx->mb6 = cpu_to_le16(MSW(MSD(ha->async_pd_dma))); |
1982 | mbx->mb7 = cpu_to_le16(LSW(MSD(ha->async_pd_dma))); | 1982 | mbx->mb7 = cpu_to_le16(LSW(MSD(ha->async_pd_dma))); |
1983 | mbx->mb9 = cpu_to_le16(sp->fcport->vp_idx); | 1983 | mbx->mb9 = cpu_to_le16(sp->fcport->vha->vp_idx); |
1984 | } | 1984 | } |
1985 | 1985 | ||
1986 | static void | 1986 | static void |
@@ -2006,7 +2006,7 @@ qla24xx_tm_iocb(srb_t *sp, struct tsk_mgmt_entry *tsk) | |||
2006 | tsk->port_id[0] = fcport->d_id.b.al_pa; | 2006 | tsk->port_id[0] = fcport->d_id.b.al_pa; |
2007 | tsk->port_id[1] = fcport->d_id.b.area; | 2007 | tsk->port_id[1] = fcport->d_id.b.area; |
2008 | tsk->port_id[2] = fcport->d_id.b.domain; | 2008 | tsk->port_id[2] = fcport->d_id.b.domain; |
2009 | tsk->vp_index = fcport->vp_idx; | 2009 | tsk->vp_index = fcport->vha->vp_idx; |
2010 | 2010 | ||
2011 | if (flags == TCF_LUN_RESET) { | 2011 | if (flags == TCF_LUN_RESET) { |
2012 | int_to_scsilun(lun, &tsk->lun); | 2012 | int_to_scsilun(lun, &tsk->lun); |
@@ -2027,7 +2027,7 @@ qla24xx_els_iocb(srb_t *sp, struct els_entry_24xx *els_iocb) | |||
2027 | els_iocb->handle = sp->handle; | 2027 | els_iocb->handle = sp->handle; |
2028 | els_iocb->nport_handle = cpu_to_le16(sp->fcport->loop_id); | 2028 | els_iocb->nport_handle = cpu_to_le16(sp->fcport->loop_id); |
2029 | els_iocb->tx_dsd_count = __constant_cpu_to_le16(bsg_job->request_payload.sg_cnt); | 2029 | els_iocb->tx_dsd_count = __constant_cpu_to_le16(bsg_job->request_payload.sg_cnt); |
2030 | els_iocb->vp_index = sp->fcport->vp_idx; | 2030 | els_iocb->vp_index = sp->fcport->vha->vp_idx; |
2031 | els_iocb->sof_type = EST_SOFI3; | 2031 | els_iocb->sof_type = EST_SOFI3; |
2032 | els_iocb->rx_dsd_count = __constant_cpu_to_le16(bsg_job->reply_payload.sg_cnt); | 2032 | els_iocb->rx_dsd_count = __constant_cpu_to_le16(bsg_job->reply_payload.sg_cnt); |
2033 | 2033 | ||
@@ -2157,7 +2157,7 @@ qla24xx_ct_iocb(srb_t *sp, struct ct_entry_24xx *ct_iocb) | |||
2157 | ct_iocb->handle = sp->handle; | 2157 | ct_iocb->handle = sp->handle; |
2158 | 2158 | ||
2159 | ct_iocb->nport_handle = cpu_to_le16(sp->fcport->loop_id); | 2159 | ct_iocb->nport_handle = cpu_to_le16(sp->fcport->loop_id); |
2160 | ct_iocb->vp_index = sp->fcport->vp_idx; | 2160 | ct_iocb->vp_index = sp->fcport->vha->vp_idx; |
2161 | ct_iocb->comp_status = __constant_cpu_to_le16(0); | 2161 | ct_iocb->comp_status = __constant_cpu_to_le16(0); |
2162 | 2162 | ||
2163 | ct_iocb->cmd_dsd_count = | 2163 | ct_iocb->cmd_dsd_count = |
@@ -2396,7 +2396,7 @@ sufficient_dsds: | |||
2396 | cmd_pkt->port_id[0] = sp->fcport->d_id.b.al_pa; | 2396 | cmd_pkt->port_id[0] = sp->fcport->d_id.b.al_pa; |
2397 | cmd_pkt->port_id[1] = sp->fcport->d_id.b.area; | 2397 | cmd_pkt->port_id[1] = sp->fcport->d_id.b.area; |
2398 | cmd_pkt->port_id[2] = sp->fcport->d_id.b.domain; | 2398 | cmd_pkt->port_id[2] = sp->fcport->d_id.b.domain; |
2399 | cmd_pkt->vp_index = sp->fcport->vp_idx; | 2399 | cmd_pkt->vp_index = sp->fcport->vha->vp_idx; |
2400 | 2400 | ||
2401 | /* Build IOCB segments */ | 2401 | /* Build IOCB segments */ |
2402 | if (qla24xx_build_scsi_type_6_iocbs(sp, cmd_pkt, tot_dsds)) | 2402 | if (qla24xx_build_scsi_type_6_iocbs(sp, cmd_pkt, tot_dsds)) |
@@ -2485,7 +2485,7 @@ sufficient_dsds: | |||
2485 | cmd_pkt->port_id[0] = sp->fcport->d_id.b.al_pa; | 2485 | cmd_pkt->port_id[0] = sp->fcport->d_id.b.al_pa; |
2486 | cmd_pkt->port_id[1] = sp->fcport->d_id.b.area; | 2486 | cmd_pkt->port_id[1] = sp->fcport->d_id.b.area; |
2487 | cmd_pkt->port_id[2] = sp->fcport->d_id.b.domain; | 2487 | cmd_pkt->port_id[2] = sp->fcport->d_id.b.domain; |
2488 | cmd_pkt->vp_index = sp->fcport->vp_idx; | 2488 | cmd_pkt->vp_index = sp->fcport->vha->vp_idx; |
2489 | 2489 | ||
2490 | int_to_scsilun(cmd->device->lun, &cmd_pkt->lun); | 2490 | int_to_scsilun(cmd->device->lun, &cmd_pkt->lun); |
2491 | host_to_fcp_swap((uint8_t *)&cmd_pkt->lun, | 2491 | host_to_fcp_swap((uint8_t *)&cmd_pkt->lun, |