Lines Matching refs:fcport
14 int qla_nvme_register_remote(struct scsi_qla_host *vha, struct fc_port *fcport)
36 if (!(fcport->nvme_prli_service_param &
38 (fcport->nvme_flag & NVME_FLAG_REGISTERED))
41 fcport->nvme_flag &= ~NVME_FLAG_RESETTING;
44 req.port_name = wwn_to_u64(fcport->port_name);
45 req.node_name = wwn_to_u64(fcport->node_name);
49 if (fcport->nvme_prli_service_param & NVME_PRLI_SP_INITIATOR)
52 if (fcport->nvme_prli_service_param & NVME_PRLI_SP_TARGET)
55 if (fcport->nvme_prli_service_param & NVME_PRLI_SP_DISCOVERY)
58 req.port_id = fcport->d_id.b24;
66 &fcport->nvme_remote_port);
74 if (fcport->nvme_prli_service_param & NVME_PRLI_SP_SLER)
78 if (fcport->nvme_prli_service_param & NVME_PRLI_SP_PI_CTRL)
82 rport = fcport->nvme_remote_port->private;
83 rport->fcport = fcport;
85 fcport->nvme_flag |= NVME_FLAG_REGISTERED;
232 fc_port_t *fcport = sp->fcport;
233 struct qla_hw_data *ha = fcport->vha->hw;
236 ql_dbg(ql_dbg_io, fcport->vha, 0xffff,
237 "%s called for sp=%p, hndl=%x on fcport=%p deleted=%d\n",
238 __func__, sp, sp->handle, fcport, fcport->deleted);
240 if (!ha->flags.fw_started && fcport->deleted)
244 ql_log(ql_log_info, sp->fcport->vha, 0xffff,
253 ql_dbg(ql_dbg_io, fcport->vha, 0x212b,
254 "%s: %s command for sp=%p, handle=%x on fcport=%p rval=%x\n",
256 sp, sp->handle, fcport, rval);
289 fc_port_t *fcport = qla_rport->fcport;
298 if (!fcport || (fcport && fcport->deleted))
301 vha = fcport->vha;
308 sp = qla2x00_get_sp(vha, fcport, GFP_ATOMIC);
380 struct scsi_qla_host *vha = sp->fcport->vha;
455 (sp->fcport->nvme_prli_service_param &
458 sp->fcport->nvme_first_burst_size) ||
459 (sp->fcport->nvme_first_burst_size == 0))
475 cmd_pkt->nport_handle = cpu_to_le16(sp->fcport->loop_id);
476 cmd_pkt->port_id[0] = sp->fcport->d_id.b.al_pa;
477 cmd_pkt->port_id[1] = sp->fcport->d_id.b.area;
478 cmd_pkt->port_id[2] = sp->fcport->d_id.b.domain;
479 cmd_pkt->vp_index = sp->fcport->vha->vp_idx;
555 fc_port_t *fcport;
569 fcport = qla_rport->fcport;
571 if (!qpair || !fcport)
574 if (!qpair->fw_started || fcport->deleted)
577 vha = fcport->vha;
579 if (!(fcport->nvme_flag & NVME_FLAG_REGISTERED))
583 (qpair && !qpair->fw_started) || fcport->deleted)
593 if (fcport->nvme_flag & NVME_FLAG_RESETTING)
597 sp = qla2xxx_get_qpair_sp(vha, qpair, fcport, GFP_ATOMIC);
638 fc_port_t *fcport;
641 fcport = qla_rport->fcport;
642 fcport->nvme_remote_port = NULL;
643 fcport->nvme_flag &= ~NVME_FLAG_REGISTERED;
644 fcport->nvme_flag &= ~NVME_FLAG_DELETING;
645 ql_log(ql_log_info, fcport->vha, 0x2110,
647 fcport, fcport->port_name);
648 complete(&fcport->nvme_del_done);
670 void qla_nvme_unregister_remote_port(struct fc_port *fcport)
679 __func__, fcport, fcport->port_name);
681 if (test_bit(PFLG_DRIVER_REMOVING, &fcport->vha->pci_flags))
682 nvme_fc_set_remoteport_devloss(fcport->nvme_remote_port, 0);
684 init_completion(&fcport->nvme_del_done);
685 ret = nvme_fc_unregister_remoteport(fcport->nvme_remote_port);
687 ql_log(ql_log_info, fcport->vha, 0x2114,
690 wait_for_completion(&fcport->nvme_del_done);