diff options
Diffstat (limited to 'drivers/scsi/qla2xxx')
-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_init.c | 10 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_iocb.c | 26 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 4 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mid.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 6 |
7 files changed, 19 insertions, 32 deletions
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index 26d34cb0986f..f709e6642e5b 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xxx/qla_bsg.c | |||
@@ -297,7 +297,6 @@ qla2x00_process_els(struct fc_bsg_job *bsg_job) | |||
297 | 297 | ||
298 | /* Initialize all required fields of fcport */ | 298 | /* Initialize all required fields of fcport */ |
299 | fcport->vha = vha; | 299 | fcport->vha = vha; |
300 | fcport->vp_idx = vha->vp_idx; | ||
301 | fcport->d_id.b.al_pa = | 300 | fcport->d_id.b.al_pa = |
302 | bsg_job->request->rqst_data.h_els.port_id[0]; | 301 | bsg_job->request->rqst_data.h_els.port_id[0]; |
303 | fcport->d_id.b.area = | 302 | fcport->d_id.b.area = |
@@ -483,7 +482,6 @@ qla2x00_process_ct(struct fc_bsg_job *bsg_job) | |||
483 | 482 | ||
484 | /* Initialize all required fields of fcport */ | 483 | /* Initialize all required fields of fcport */ |
485 | fcport->vha = vha; | 484 | fcport->vha = vha; |
486 | fcport->vp_idx = vha->vp_idx; | ||
487 | fcport->d_id.b.al_pa = bsg_job->request->rqst_data.h_ct.port_id[0]; | 485 | fcport->d_id.b.al_pa = bsg_job->request->rqst_data.h_ct.port_id[0]; |
488 | fcport->d_id.b.area = bsg_job->request->rqst_data.h_ct.port_id[1]; | 486 | fcport->d_id.b.area = bsg_job->request->rqst_data.h_ct.port_id[1]; |
489 | fcport->d_id.b.domain = bsg_job->request->rqst_data.h_ct.port_id[2]; | 487 | fcport->d_id.b.domain = bsg_job->request->rqst_data.h_ct.port_id[2]; |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 7f7ebec2172f..f601a938fe9f 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -1719,7 +1719,6 @@ typedef struct fc_port { | |||
1719 | struct fc_rport *rport, *drport; | 1719 | struct fc_rport *rport, *drport; |
1720 | u32 supported_classes; | 1720 | u32 supported_classes; |
1721 | 1721 | ||
1722 | uint16_t vp_idx; | ||
1723 | uint8_t fc4_type; | 1722 | uint8_t fc4_type; |
1724 | uint8_t scan_state; | 1723 | uint8_t scan_state; |
1725 | } fc_port_t; | 1724 | } fc_port_t; |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 14f4aeb1919b..6c26e049c662 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -2495,7 +2495,6 @@ qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags) | |||
2495 | 2495 | ||
2496 | /* Setup fcport template structure. */ | 2496 | /* Setup fcport template structure. */ |
2497 | fcport->vha = vha; | 2497 | fcport->vha = vha; |
2498 | fcport->vp_idx = vha->vp_idx; | ||
2499 | fcport->port_type = FCT_UNKNOWN; | 2498 | fcport->port_type = FCT_UNKNOWN; |
2500 | fcport->loop_id = FC_NO_LOOP_ID; | 2499 | fcport->loop_id = FC_NO_LOOP_ID; |
2501 | qla2x00_set_fcport_state(fcport, FCS_UNCONFIGURED); | 2500 | qla2x00_set_fcport_state(fcport, FCS_UNCONFIGURED); |
@@ -2726,7 +2725,6 @@ qla2x00_configure_local_loop(scsi_qla_host_t *vha) | |||
2726 | new_fcport->d_id.b.area = area; | 2725 | new_fcport->d_id.b.area = area; |
2727 | new_fcport->d_id.b.al_pa = al_pa; | 2726 | new_fcport->d_id.b.al_pa = al_pa; |
2728 | new_fcport->loop_id = loop_id; | 2727 | new_fcport->loop_id = loop_id; |
2729 | new_fcport->vp_idx = vha->vp_idx; | ||
2730 | rval2 = qla2x00_get_port_database(vha, new_fcport, 0); | 2728 | rval2 = qla2x00_get_port_database(vha, new_fcport, 0); |
2731 | if (rval2 != QLA_SUCCESS) { | 2729 | if (rval2 != QLA_SUCCESS) { |
2732 | ql_dbg(ql_dbg_disc, vha, 0x201a, | 2730 | ql_dbg(ql_dbg_disc, vha, 0x201a, |
@@ -2760,10 +2758,6 @@ qla2x00_configure_local_loop(scsi_qla_host_t *vha) | |||
2760 | 2758 | ||
2761 | if (!found) { | 2759 | if (!found) { |
2762 | /* New device, add to fcports list. */ | 2760 | /* New device, add to fcports list. */ |
2763 | if (vha->vp_idx) { | ||
2764 | new_fcport->vha = vha; | ||
2765 | new_fcport->vp_idx = vha->vp_idx; | ||
2766 | } | ||
2767 | list_add_tail(&new_fcport->list, &vha->vp_fcports); | 2761 | list_add_tail(&new_fcport->list, &vha->vp_fcports); |
2768 | 2762 | ||
2769 | /* Allocate a new replacement fcport. */ | 2763 | /* Allocate a new replacement fcport. */ |
@@ -3084,10 +3078,6 @@ qla2x00_configure_fabric(scsi_qla_host_t *vha) | |||
3084 | /* Login and update database */ | 3078 | /* Login and update database */ |
3085 | qla2x00_fabric_dev_login(vha, fcport, &next_loopid); | 3079 | qla2x00_fabric_dev_login(vha, fcport, &next_loopid); |
3086 | 3080 | ||
3087 | if (vha->vp_idx) { | ||
3088 | fcport->vha = vha; | ||
3089 | fcport->vp_idx = vha->vp_idx; | ||
3090 | } | ||
3091 | list_move_tail(&fcport->list, &vha->vp_fcports); | 3081 | list_move_tail(&fcport->list, &vha->vp_fcports); |
3092 | } | 3082 | } |
3093 | } while (0); | 3083 | } while (0); |
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, |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index c7fcc30c9812..07f4d3cbcc07 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -2461,7 +2461,7 @@ qla24xx_abort_command(srb_t *sp) | |||
2461 | abt->port_id[0] = fcport->d_id.b.al_pa; | 2461 | abt->port_id[0] = fcport->d_id.b.al_pa; |
2462 | abt->port_id[1] = fcport->d_id.b.area; | 2462 | abt->port_id[1] = fcport->d_id.b.area; |
2463 | abt->port_id[2] = fcport->d_id.b.domain; | 2463 | abt->port_id[2] = fcport->d_id.b.domain; |
2464 | abt->vp_index = fcport->vp_idx; | 2464 | abt->vp_index = fcport->vha->vp_idx; |
2465 | 2465 | ||
2466 | abt->req_que_no = cpu_to_le16(req->id); | 2466 | abt->req_que_no = cpu_to_le16(req->id); |
2467 | 2467 | ||
@@ -2537,7 +2537,7 @@ __qla24xx_issue_tmf(char *name, uint32_t type, struct fc_port *fcport, | |||
2537 | tsk->p.tsk.port_id[0] = fcport->d_id.b.al_pa; | 2537 | tsk->p.tsk.port_id[0] = fcport->d_id.b.al_pa; |
2538 | tsk->p.tsk.port_id[1] = fcport->d_id.b.area; | 2538 | tsk->p.tsk.port_id[1] = fcport->d_id.b.area; |
2539 | tsk->p.tsk.port_id[2] = fcport->d_id.b.domain; | 2539 | tsk->p.tsk.port_id[2] = fcport->d_id.b.domain; |
2540 | tsk->p.tsk.vp_index = fcport->vp_idx; | 2540 | tsk->p.tsk.vp_index = fcport->vha->vp_idx; |
2541 | if (type == TCF_LUN_RESET) { | 2541 | if (type == TCF_LUN_RESET) { |
2542 | int_to_scsilun(l, &tsk->p.tsk.lun); | 2542 | int_to_scsilun(l, &tsk->p.tsk.lun); |
2543 | host_to_fcp_swap((uint8_t *)&tsk->p.tsk.lun, | 2543 | host_to_fcp_swap((uint8_t *)&tsk->p.tsk.lun, |
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index 6230ba98addc..efb3cc3d6793 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c | |||
@@ -134,7 +134,7 @@ qla2x00_mark_vp_devices_dead(scsi_qla_host_t *vha) | |||
134 | list_for_each_entry(fcport, &vha->vp_fcports, list) { | 134 | list_for_each_entry(fcport, &vha->vp_fcports, list) { |
135 | ql_dbg(ql_dbg_vport, vha, 0xa001, | 135 | ql_dbg(ql_dbg_vport, vha, 0xa001, |
136 | "Marking port dead, loop_id=0x%04x : %x.\n", | 136 | "Marking port dead, loop_id=0x%04x : %x.\n", |
137 | fcport->loop_id, fcport->vp_idx); | 137 | fcport->loop_id, fcport->vha->vp_idx); |
138 | 138 | ||
139 | qla2x00_mark_device_lost(vha, fcport, 0, 0); | 139 | qla2x00_mark_device_lost(vha, fcport, 0, 0); |
140 | qla2x00_set_fcport_state(fcport, FCS_UNCONFIGURED); | 140 | qla2x00_set_fcport_state(fcport, FCS_UNCONFIGURED); |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 71a39c780eba..9387f7914e66 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -2877,7 +2877,7 @@ void qla2x00_mark_device_lost(scsi_qla_host_t *vha, fc_port_t *fcport, | |||
2877 | int do_login, int defer) | 2877 | int do_login, int defer) |
2878 | { | 2878 | { |
2879 | if (atomic_read(&fcport->state) == FCS_ONLINE && | 2879 | if (atomic_read(&fcport->state) == FCS_ONLINE && |
2880 | vha->vp_idx == fcport->vp_idx) { | 2880 | vha->vp_idx == fcport->vha->vp_idx) { |
2881 | qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); | 2881 | qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); |
2882 | qla2x00_schedule_rport_del(vha, fcport, defer); | 2882 | qla2x00_schedule_rport_del(vha, fcport, defer); |
2883 | } | 2883 | } |
@@ -2926,7 +2926,7 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha, int defer) | |||
2926 | fc_port_t *fcport; | 2926 | fc_port_t *fcport; |
2927 | 2927 | ||
2928 | list_for_each_entry(fcport, &vha->vp_fcports, list) { | 2928 | list_for_each_entry(fcport, &vha->vp_fcports, list) { |
2929 | if (vha->vp_idx != 0 && vha->vp_idx != fcport->vp_idx) | 2929 | if (vha->vp_idx != 0 && vha->vp_idx != fcport->vha->vp_idx) |
2930 | continue; | 2930 | continue; |
2931 | 2931 | ||
2932 | /* | 2932 | /* |
@@ -2939,7 +2939,7 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha, int defer) | |||
2939 | qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); | 2939 | qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); |
2940 | if (defer) | 2940 | if (defer) |
2941 | qla2x00_schedule_rport_del(vha, fcport, defer); | 2941 | qla2x00_schedule_rport_del(vha, fcport, defer); |
2942 | else if (vha->vp_idx == fcport->vp_idx) | 2942 | else if (vha->vp_idx == fcport->vha->vp_idx) |
2943 | qla2x00_schedule_rport_del(vha, fcport, defer); | 2943 | qla2x00_schedule_rport_del(vha, fcport, defer); |
2944 | } | 2944 | } |
2945 | } | 2945 | } |