Lines Matching refs:fcport
195 * @fcport: fcport entry to updated
200 qla2x00_ga_nxt(scsi_qla_host_t *vha, fc_port_t *fcport)
211 return qla2x00_sns_ga_nxt(vha, fcport);
230 ct_req->req.port_id.port_id = port_id_to_be_id(fcport->d_id);
244 fcport->d_id = be_to_port_id(ct_rsp->rsp.ga_nxt.port_id);
246 memcpy(fcport->node_name, ct_rsp->rsp.ga_nxt.node_name,
248 memcpy(fcport->port_name, ct_rsp->rsp.ga_nxt.port_name,
251 fcport->fc4_type = (ct_rsp->rsp.ga_nxt.fc4_types[2] & BIT_0) ?
256 fcport->d_id.b.domain = 0xf0;
261 fcport->node_name, fcport->port_name,
262 fcport->d_id.b.domain, fcport->d_id.b.area,
263 fcport->d_id.b.al_pa);
996 * @fcport: fcport entry to updated
1003 qla2x00_sns_ga_nxt(scsi_qla_host_t *vha, fc_port_t *fcport)
1015 sns_cmd->p.cmd.param[0] = fcport->d_id.b.al_pa;
1016 sns_cmd->p.cmd.param[1] = fcport->d_id.b.area;
1017 sns_cmd->p.cmd.param[2] = fcport->d_id.b.domain;
1035 fcport->d_id.b.domain = sns_cmd->p.gan_data[17];
1036 fcport->d_id.b.area = sns_cmd->p.gan_data[18];
1037 fcport->d_id.b.al_pa = sns_cmd->p.gan_data[19];
1039 memcpy(fcport->node_name, &sns_cmd->p.gan_data[284], WWN_SIZE);
1040 memcpy(fcport->port_name, &sns_cmd->p.gan_data[20], WWN_SIZE);
1044 fcport->d_id.b.domain = 0xf0;
1049 fcport->node_name, fcport->port_name,
1050 fcport->d_id.b.domain, fcport->d_id.b.area,
1051 fcport->d_id.b.al_pa);
2802 int qla24xx_post_gpsc_work(struct scsi_qla_host *vha, fc_port_t *fcport)
2810 e->u.fcport.fcport = fcport;
2816 struct fc_port *fcport = ea->fcport;
2820 __func__, fcport->port_name, fcport->disc_state,
2821 fcport->fw_login_state, ea->rc, ea->sp->gen2, fcport->login_gen,
2822 ea->sp->gen2, fcport->rscn_gen|ea->sp->gen1, fcport->loop_id);
2824 if (fcport->disc_state == DSC_DELETE_PEND)
2828 if (fcport->disc_state == DSC_LOGIN_AUTH_PEND)
2831 if (ea->sp->gen2 != fcport->login_gen) {
2835 __func__, fcport->port_name);
2837 } else if (ea->sp->gen1 != fcport->rscn_gen) {
2841 qla_post_iidma_work(vha, fcport);
2848 fc_port_t *fcport = sp->fcport;
2852 ct_rsp = &fcport->ct_desc.ct_sns->p.rsp;
2856 sp->name, res, fcport->port_name);
2858 fcport->flags &= ~(FCF_ASYNC_SENT | FCF_ASYNC_ACTIVE);
2877 fcport->fp_speed = qla2x00_port_speed_capability(
2882 sp->name, fcport->fabric_port_name,
2888 ea.fcport = fcport;
2897 int qla24xx_async_gpsc(scsi_qla_host_t *vha, fc_port_t *fcport)
2903 if (!vha->flags.online || (fcport->flags & FCF_ASYNC_SENT))
2907 sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);
2913 sp->gen1 = fcport->rscn_gen;
2914 sp->gen2 = fcport->login_gen;
2919 ct_req = qla24xx_prep_ct_fm_req(fcport->ct_desc.ct_sns, GPSC_CMD,
2923 memcpy(ct_req->req.gpsc.port_name, fcport->fabric_port_name,
2926 sp->u.iocb_cmd.u.ctarg.req = fcport->ct_desc.ct_sns;
2927 sp->u.iocb_cmd.u.ctarg.req_dma = fcport->ct_desc.ct_sns_dma;
2928 sp->u.iocb_cmd.u.ctarg.rsp = fcport->ct_desc.ct_sns;
2929 sp->u.iocb_cmd.u.ctarg.rsp_dma = fcport->ct_desc.ct_sns_dma;
2936 sp->name, fcport->port_name, sp->handle,
2937 fcport->loop_id, fcport->d_id.b.domain,
2938 fcport->d_id.b.area, fcport->d_id.b.al_pa);
2987 fc_port_t *fcport = sp->fcport;
2994 sp->name, res, fcport->d_id.b24, fcport->port_name);
3009 fcport->fc4_type = FS_FC4TYPE_FCP;
3010 fcport->fc4_features = fc4_scsi_feat & 0xf;
3015 fcport->fc4_type |= FS_FC4TYPE_NVME;
3016 fcport->fc4_features = fc4_nvme_feat & 0xf;
3047 int qla24xx_async_gffid(scsi_qla_host_t *vha, fc_port_t *fcport, bool wait)
3059 sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);
3065 sp->gen1 = fcport->rscn_gen;
3066 sp->gen2 = fcport->login_gen;
3102 ct_req->req.gff_id.port_id[0] = fcport->d_id.b.domain;
3103 ct_req->req.gff_id.port_id[1] = fcport->d_id.b.area;
3104 ct_req->req.gff_id.port_id[2] = fcport->d_id.b.al_pa;
3118 sp->name, sp->handle, fcport->d_id.b24);
3173 fc_port_t *fcport;
3206 list_for_each_entry(fcport, &vha->vp_fcports, list) {
3207 if ((fcport->flags & FCF_FABRIC_DEVICE) != 0) {
3208 fcport->scan_state = QLA_FCPORT_SCAN;
3209 if (fcport->loop_id == FC_NO_LOOP_ID)
3210 fcport->logout_on_delete = 0;
3212 fcport->logout_on_delete = 1;
3220 list_for_each_entry(fcport, &vha->vp_fcports, list)
3221 fcport->scan_state = QLA_FCPORT_SCAN;
3259 list_for_each_entry(fcport, &vha->vp_fcports, list) {
3260 if (memcmp(rp->port_name, fcport->port_name, WWN_SIZE))
3262 fcport->scan_state = QLA_FCPORT_FOUND;
3263 fcport->last_rscn_gen = fcport->rscn_gen;
3264 fcport->fc4_type = rp->fc4type;
3267 if (fcport->scan_needed) {
3268 if (NVME_PRIORITY(vha->hw, fcport))
3269 fcport->do_prli_nvme = 1;
3271 fcport->do_prli_nvme = 0;
3277 if ((fcport->flags & FCF_FABRIC_DEVICE) == 0) {
3278 qla2x00_clear_loop_id(fcport);
3279 fcport->flags |= FCF_FABRIC_DEVICE;
3280 } else if (fcport->d_id.b24 != rp->id.b24 ||
3281 (fcport->scan_needed &&
3282 fcport->port_type != FCT_INITIATOR &&
3283 fcport->port_type != FCT_NVME_INITIATOR)) {
3284 qlt_schedule_sess_for_deletion(fcport);
3286 fcport->d_id.b24 = rp->id.b24;
3287 fcport->scan_needed = 0;
3310 list_for_each_entry(fcport, &vha->vp_fcports, list) {
3311 if ((fcport->flags & FCF_FABRIC_DEVICE) == 0) {
3312 fcport->scan_needed = 0;
3316 if (fcport->scan_state != QLA_FCPORT_FOUND) {
3319 if (fcport->scan_needed &&
3320 fcport->disc_state == DSC_LOGIN_PEND) {
3324 fcport->logout_on_delete = 1;
3328 fcport->scan_needed = 0;
3331 atomic_read(&fcport->state) == FCS_ONLINE) ||
3333 if (fcport->loop_id != FC_NO_LOOP_ID) {
3334 if (fcport->flags & FCF_FCP2_DEVICE)
3340 fcport->port_name);
3342 fcport->tgt_link_down_time = 0;
3343 qlt_schedule_sess_for_deletion(fcport);
3348 if (fcport->scan_needed ||
3349 fcport->disc_state != DSC_LOGIN_COMPLETE) {
3350 if (fcport->login_retry == 0) {
3351 fcport->login_retry =
3355 fcport->port_name, fcport->loop_id,
3356 fcport->login_retry);
3358 fcport->scan_needed = 0;
3359 qla24xx_fcport_handle_login(vha, fcport);
3372 list_for_each_entry(fcport, &vha->vp_fcports, list) {
3373 if (fcport->scan_needed) {
3899 fc_port_t *fcport = ea->fcport;
3903 __func__, fcport->port_name, fcport->disc_state,
3904 fcport->fw_login_state, ea->rc, fcport->login_gen, ea->sp->gen2,
3905 fcport->rscn_gen, ea->sp->gen1, vha->fcport_count);
3907 if (fcport->disc_state == DSC_DELETE_PEND)
3910 if (ea->sp->gen2 != fcport->login_gen) {
3914 __func__, fcport->port_name);
3916 } else if (ea->sp->gen1 != fcport->rscn_gen) {
3920 qla24xx_post_gpsc_work(vha, fcport);
3926 fc_port_t *fcport = sp->fcport;
3927 u8 *fpn = fcport->ct_desc.ct_sns->p.rsp.rsp.gfpn_id.port_name;
3933 memcpy(fcport->fabric_port_name, fpn, WWN_SIZE);
3936 ea.fcport = fcport;
3942 sp->name, res, fcport->port_name, fcport->fabric_port_name);
3950 int qla24xx_async_gfpnid(scsi_qla_host_t *vha, fc_port_t *fcport)
3956 if (!vha->flags.online || (fcport->flags & FCF_ASYNC_SENT))
3960 sp = qla2x00_get_sp(vha, fcport, GFP_ATOMIC);
3966 sp->gen1 = fcport->rscn_gen;
3967 sp->gen2 = fcport->login_gen;
3972 ct_req = qla2x00_prep_ct_req(fcport->ct_desc.ct_sns, GFPN_ID_CMD,
3976 ct_req->req.port_id.port_id = port_id_to_be_id(fcport->d_id);
3980 sp->u.iocb_cmd.u.ctarg.req = fcport->ct_desc.ct_sns;
3981 sp->u.iocb_cmd.u.ctarg.req_dma = fcport->ct_desc.ct_sns_dma;
3982 sp->u.iocb_cmd.u.ctarg.rsp = fcport->ct_desc.ct_sns;
3983 sp->u.iocb_cmd.u.ctarg.rsp_dma = fcport->ct_desc.ct_sns_dma;
3990 sp->name, fcport->port_name,
3991 sp->handle, fcport->loop_id, fcport->d_id.b24);
4006 int qla24xx_post_gfpnid_work(struct scsi_qla_host *vha, fc_port_t *fcport)
4020 e->u.fcport.fcport = fcport;