Lines Matching refs:fcport

732 	struct qla_hw_data *ha = sp->fcport->vha->hw;
824 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
882 if (!fcport || fcport->deleted) {
887 if (atomic_read(&fcport->state) != FCS_ONLINE || fcport->deleted) {
888 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
892 atomic_read(&fcport->state),
904 if (fcport->retry_delay_timestamp == 0) {
906 } else if (time_after(jiffies, fcport->retry_delay_timestamp))
907 fcport->retry_delay_timestamp = 0;
912 qla2xxx_init_sp(sp, vha, vha->hw->base_qpair, fcport);
948 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
971 if (!fcport || fcport->deleted) {
976 if (atomic_read(&fcport->state) != FCS_ONLINE || fcport->deleted) {
977 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
981 atomic_read(&fcport->state),
993 if (fcport->retry_delay_timestamp == 0) {
995 } else if (time_after(jiffies, fcport->retry_delay_timestamp))
996 fcport->retry_delay_timestamp = 0;
1001 qla2xxx_init_sp(sp, vha, qpair, fcport);
1246 if ((sp->fcport && sp->fcport->deleted) || !qpair)
1364 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
1367 if (!fcport) {
1375 if (fcport->deleted)
1389 if (do_reset(fcport, cmd->device->lun, 1)
1470 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
1486 if (!fcport) {
3114 /* Setup fcport template structure. */
3115 ha->mr.fcport.vha = base_vha;
3116 ha->mr.fcport.port_type = FCT_UNKNOWN;
3117 ha->mr.fcport.loop_id = FC_NO_LOOP_ID;
3118 qla2x00_set_fcport_state(&ha->mr.fcport, FCS_UNCONFIGURED);
3119 ha->mr.fcport.supported_classes = FC_COS_UNSPECIFIED;
3120 ha->mr.fcport.scan_state = 1;
3401 &base_vha->hw->mr.fcport, FXDISC_GET_CONFIG_INFO);
3428 &base_vha->hw->mr.fcport, FXDISC_GET_PORT_INFO);
3432 &base_vha->hw->mr.fcport, FXDISC_REG_HOST_INFO);
3870 fc_port_t *fcport, *tfcport;
3872 list_for_each_entry_safe(fcport, tfcport, &vha->vp_fcports, list)
3873 qla2x00_free_fcport(fcport);
3877 qla2x00_schedule_rport_del(struct scsi_qla_host *vha, fc_port_t *fcport)
3881 if (!fcport->rport)
3884 if (fcport->rport) {
3885 ql_dbg(ql_dbg_disc, fcport->vha, 0x2109,
3887 __func__, fcport->port_name, fcport->rport,
3888 fcport->rport->roles);
3889 fc_remote_port_delete(fcport->rport);
3895 * qla2x00_mark_device_lost Updates fcport state when device goes offline.
3897 * Input: ha = adapter block pointer. fcport = port structure pointer.
3903 void qla2x00_mark_device_lost(scsi_qla_host_t *vha, fc_port_t *fcport,
3907 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST);
3908 qla2x00_schedule_rport_del(vha, fcport);
3912 if (atomic_read(&fcport->state) == FCS_ONLINE &&
3913 vha->vp_idx == fcport->vha->vp_idx) {
3914 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST);
3915 qla2x00_schedule_rport_del(vha, fcport);
3921 if (atomic_read(&fcport->state) != FCS_DEVICE_DEAD)
3922 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST);
3933 fc_port_t *fcport;
3938 list_for_each_entry(fcport, &vha->vp_fcports, list) {
3939 if (fcport->loop_id != FC_NO_LOOP_ID &&
3940 (fcport->flags & FCF_FCP2_DEVICE) &&
3941 fcport->port_type == FCT_TARGET &&
3945 fcport->flags, fcport->port_type,
3946 fcport->d_id.b24, fcport->port_name);
3949 fcport->scan_state = 0;
3950 qlt_schedule_sess_for_deletion(fcport);
4960 fc_port_t *fcport, uint16_t *data) \
4968 e->u.logio.fcport = fcport; \
4973 fcport->flags |= FCF_ASYNC_ACTIVE; \
5030 void qla24xx_sched_upd_fcport(fc_port_t *fcport)
5034 if (IS_SW_RESV_ADDR(fcport->d_id))
5037 spin_lock_irqsave(&fcport->vha->work_lock, flags);
5038 if (fcport->disc_state == DSC_UPD_FCPORT) {
5039 spin_unlock_irqrestore(&fcport->vha->work_lock, flags);
5042 fcport->jiffies_at_registration = jiffies;
5043 fcport->sec_since_registration = 0;
5044 fcport->next_disc_state = DSC_DELETED;
5045 qla2x00_set_fcport_disc_state(fcport, DSC_UPD_FCPORT);
5046 spin_unlock_irqrestore(&fcport->vha->work_lock, flags);
5048 queue_work(system_unbound_wq, &fcport->reg_work);
5055 fc_port_t *fcport = NULL, *tfcp;
5065 fcport = qla2x00_find_fcport_by_wwpn(vha, e->u.new_sess.port_name, 1);
5066 if (fcport) {
5067 fcport->d_id = e->u.new_sess.id;
5069 fcport->fw_login_state = DSC_LS_PLOGI_PEND;
5070 memcpy(fcport->node_name,
5073 qlt_plogi_ack_link(vha, pla, fcport, QLT_PLOGI_LINK_SAME_WWN);
5075 * fcport/sess has not been created.
5081 fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL);
5082 if (fcport) {
5083 fcport->d_id = e->u.new_sess.id;
5084 fcport->flags |= FCF_FABRIC_DEVICE;
5085 fcport->fw_login_state = DSC_LS_PLOGI_PEND;
5087 memcpy(fcport->port_name, e->u.new_sess.port_name,
5090 fcport->fc4_type = e->u.new_sess.fc4_type;
5092 fcport->dm_login_expire = jiffies +
5094 fcport->fc4_type = FS_FC4TYPE_FCP;
5095 fcport->n2n_flag = 1;
5097 fcport->fc4_type |= FS_FC4TYPE_NVME;
5119 "%s %8phC found existing fcport b4 add. DS %d LS %d\n",
5125 list_add_tail(&fcport->list, &vha->vp_fcports);
5129 qlt_plogi_ack_link(vha, pla, fcport,
5136 if (fcport) {
5137 fcport->id_changed = 1;
5138 fcport->scan_state = QLA_FCPORT_FOUND;
5139 fcport->chip_reset = vha->hw->base_qpair->chip_reset;
5140 memcpy(fcport->node_name, e->u.new_sess.node_name, WWN_SIZE);
5146 fcport->fw_login_state = DSC_LS_PRLI_PEND;
5147 fcport->local = 0;
5148 fcport->loop_id =
5151 fcport->fw_login_state = DSC_LS_PRLI_PEND;
5157 fcport->conf_compl_supported = 1;
5160 fcport->port_type = FCT_INITIATOR;
5162 fcport->port_type = FCT_TARGET;
5171 if (tfcp && (tfcp != fcport)) {
5173 * We have a conflict fcport with same NportID.
5184 fcport->login_pause = 1;
5185 tfcp->conflict = fcport;
5188 fcport->login_pause = 1;
5189 tfcp->conflict = fcport;
5199 fcport->flags &= ~FCF_FABRIC_DEVICE;
5200 fcport->keep_nport_handle = 1;
5202 fcport->fc4_type =
5204 fcport->n2n_flag = 1;
5206 fcport->fw_login_state = 0;
5210 qla24xx_fcport_handle_login(vha, fcport);
5216 qla2x00_free_fcport(fcport);
5261 qla2x00_async_login(vha, e->u.logio.fcport,
5265 rc = qla2x00_async_logout(vha, e->u.logio.fcport);
5268 qla2x00_async_adisc(vha, e->u.logio.fcport,
5290 qla24xx_async_gpdb(vha, e->u.fcport.fcport,
5291 e->u.fcport.opt);
5294 qla24xx_async_prli(vha, e->u.fcport.fcport);
5297 qla24xx_async_gpsc(vha, e->u.fcport.fcport);
5300 qla24xx_async_gnl(vha, e->u.fcport.fcport);
5306 rc = qla2x00_async_prlo(vha, e->u.logio.fcport);
5309 qla2x00_async_prlo_done(vha, e->u.logio.fcport,
5323 qla24xx_async_gnnid(vha, e->u.fcport.fcport);
5326 qla24xx_async_gfpnid(vha, e->u.fcport.fcport);
5332 qla_do_iidma_work(vha, e->u.fcport.fcport);
5336 e->u.fcport.fcport, false);
5375 fc_port_t *fcport;
5379 list_for_each_entry(fcport, &vha->vp_fcports, list) {
5384 if (atomic_read(&fcport->state) != FCS_ONLINE &&
5385 fcport->login_retry) {
5386 if (fcport->scan_state != QLA_FCPORT_FOUND ||
5387 fcport->disc_state == DSC_LOGIN_COMPLETE)
5390 if (fcport->flags & (FCF_ASYNC_SENT|FCF_ASYNC_ACTIVE) ||
5391 fcport->disc_state == DSC_DELETE_PEND) {
5396 ea.fcport = fcport;
5402 fcport);
5405 fcport->login_retry--;
5408 fcport);
5410 fcport->old_loop_id =
5411 fcport->loop_id;
5414 fcport->loop_id);
5416 (vha, fcport);
5423 fcport->login_retry,
5424 fcport->loop_id);
5426 fcport->login_retry = 0;
5429 if (fcport->login_retry == 0 &&
5431 qla2x00_clear_loop_id(fcport);
6778 &base_vha->hw->mr.fcport,
7135 sfcp = sp->fcport;
7375 fc_port_t *fcport;
7415 list_for_each_entry(fcport, &vha->vp_fcports, list)
7416 fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT);
7422 list_for_each_entry(fcport, &vp->vp_fcports, list)
7423 fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT);