Lines Matching refs:fcport
781 struct qla_hw_data *ha = sp->fcport->vha->hw;
876 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
934 if (!fcport || fcport->deleted) {
939 if (atomic_read(&fcport->state) != FCS_ONLINE || fcport->deleted) {
940 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
944 atomic_read(&fcport->state),
956 if (fcport->retry_delay_timestamp == 0) {
958 } else if (time_after(jiffies, fcport->retry_delay_timestamp))
959 fcport->retry_delay_timestamp = 0;
965 qla2xxx_init_sp(sp, vha, vha->hw->base_qpair, fcport);
1000 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
1023 if (!fcport || fcport->deleted) {
1028 if (atomic_read(&fcport->state) != FCS_ONLINE || fcport->deleted) {
1029 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
1033 atomic_read(&fcport->state),
1045 if (fcport->retry_delay_timestamp == 0) {
1047 } else if (time_after(jiffies, fcport->retry_delay_timestamp))
1048 fcport->retry_delay_timestamp = 0;
1054 qla2xxx_init_sp(sp, vha, qpair, fcport);
1137 struct fc_port *fcport;
1139 list_for_each_entry(fcport, &vha->vp_fcports, list) {
1140 if (fcport->deleted != QLA_SESS_DELETED) {
1280 if ((sp->fcport && sp->fcport->deleted) || !qpair)
1374 if (sp->fcport)
1375 match = sp->fcport->d_id.b24 == t;
1380 if (sp->fcport)
1381 match = (sp->fcport->d_id.b24 == t &&
1453 fc_port_t *fcport = (struct fc_port *) sdev->hostdata;
1464 if (!fcport) {
1472 if (fcport->deleted)
1486 if (ha->isp_ops->lun_reset(fcport, sdev->lun, 1)
1493 if (qla2x00_eh_wait_for_pending_commands(vha, fcport->d_id.b24,
1523 fc_port_t *fcport = *(fc_port_t **)rport->dd_data;
1533 if (!fcport) {
1541 if (fcport->deleted)
1555 if (ha->isp_ops->target_reset(fcport, 0, 0) != QLA_SUCCESS) {
1561 if (qla2x00_eh_wait_for_pending_commands(vha, fcport->d_id.b24, 0,
3277 /* Setup fcport template structure. */
3278 ha->mr.fcport.vha = base_vha;
3279 ha->mr.fcport.port_type = FCT_UNKNOWN;
3280 ha->mr.fcport.loop_id = FC_NO_LOOP_ID;
3281 qla2x00_set_fcport_state(&ha->mr.fcport, FCS_UNCONFIGURED);
3282 ha->mr.fcport.supported_classes = FC_COS_UNSPECIFIED;
3283 ha->mr.fcport.scan_state = 1;
3572 &base_vha->hw->mr.fcport, FXDISC_GET_CONFIG_INFO);
3599 &base_vha->hw->mr.fcport, FXDISC_GET_PORT_INFO);
3603 &base_vha->hw->mr.fcport, FXDISC_REG_HOST_INFO);
4047 fc_port_t *fcport, *tfcport;
4049 list_for_each_entry_safe(fcport, tfcport, &vha->vp_fcports, list)
4050 qla2x00_free_fcport(fcport);
4054 qla2x00_schedule_rport_del(struct scsi_qla_host *vha, fc_port_t *fcport)
4058 if (!fcport->rport)
4061 if (fcport->rport) {
4062 ql_dbg(ql_dbg_disc, fcport->vha, 0x2109,
4064 __func__, fcport->port_name, fcport->rport,
4065 fcport->rport->roles);
4066 fc_remote_port_delete(fcport->rport);
4072 * qla2x00_mark_device_lost Updates fcport state when device goes offline.
4074 * Input: ha = adapter block pointer. fcport = port structure pointer.
4080 void qla2x00_mark_device_lost(scsi_qla_host_t *vha, fc_port_t *fcport,
4084 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST);
4085 qla2x00_schedule_rport_del(vha, fcport);
4089 if (atomic_read(&fcport->state) == FCS_ONLINE &&
4090 vha->vp_idx == fcport->vha->vp_idx) {
4091 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST);
4092 qla2x00_schedule_rport_del(vha, fcport);
4099 if (atomic_read(&fcport->state) != FCS_DEVICE_DEAD)
4100 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST);
4111 fc_port_t *fcport;
4116 list_for_each_entry(fcport, &vha->vp_fcports, list) {
4118 fcport->loop_id != FC_NO_LOOP_ID &&
4119 (fcport->flags & FCF_FCP2_DEVICE) &&
4120 fcport->port_type == FCT_TARGET &&
4124 fcport->flags, fcport->port_type,
4125 fcport->d_id.b24, fcport->port_name);
4128 fcport->scan_state = 0;
4129 qlt_schedule_sess_for_deletion(fcport);
5209 fc_port_t *fcport, uint16_t *data) \
5217 e->u.logio.fcport = fcport; \
5222 fcport->flags |= FCF_ASYNC_ACTIVE; \
5279 void qla24xx_sched_upd_fcport(fc_port_t *fcport)
5283 if (IS_SW_RESV_ADDR(fcport->d_id))
5286 spin_lock_irqsave(&fcport->vha->work_lock, flags);
5287 if (fcport->disc_state == DSC_UPD_FCPORT) {
5288 spin_unlock_irqrestore(&fcport->vha->work_lock, flags);
5291 fcport->jiffies_at_registration = jiffies;
5292 fcport->sec_since_registration = 0;
5293 fcport->next_disc_state = DSC_DELETED;
5294 qla2x00_set_fcport_disc_state(fcport, DSC_UPD_FCPORT);
5295 spin_unlock_irqrestore(&fcport->vha->work_lock, flags);
5297 queue_work(system_unbound_wq, &fcport->reg_work);
5304 fc_port_t *fcport = NULL, *tfcp;
5314 fcport = qla2x00_find_fcport_by_wwpn(vha, e->u.new_sess.port_name, 1);
5315 if (fcport) {
5316 fcport->d_id = e->u.new_sess.id;
5318 fcport->fw_login_state = DSC_LS_PLOGI_PEND;
5319 memcpy(fcport->node_name,
5322 qlt_plogi_ack_link(vha, pla, fcport, QLT_PLOGI_LINK_SAME_WWN);
5324 * fcport/sess has not been created.
5330 fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL);
5331 if (fcport) {
5332 fcport->d_id = e->u.new_sess.id;
5333 fcport->flags |= FCF_FABRIC_DEVICE;
5334 fcport->fw_login_state = DSC_LS_PLOGI_PEND;
5335 fcport->tgt_short_link_down_cnt = 0;
5337 memcpy(fcport->port_name, e->u.new_sess.port_name,
5340 fcport->fc4_type = e->u.new_sess.fc4_type;
5341 if (NVME_PRIORITY(vha->hw, fcport))
5342 fcport->do_prli_nvme = 1;
5344 fcport->do_prli_nvme = 0;
5347 fcport->dm_login_expire = jiffies +
5349 fcport->fc4_type = FS_FC4TYPE_FCP;
5350 fcport->n2n_flag = 1;
5352 fcport->fc4_type |= FS_FC4TYPE_NVME;
5374 "%s %8phC found existing fcport b4 add. DS %d LS %d\n",
5380 list_add_tail(&fcport->list, &vha->vp_fcports);
5384 qlt_plogi_ack_link(vha, pla, fcport,
5391 if (fcport) {
5392 fcport->id_changed = 1;
5393 fcport->scan_state = QLA_FCPORT_FOUND;
5394 fcport->chip_reset = vha->hw->base_qpair->chip_reset;
5395 memcpy(fcport->node_name, e->u.new_sess.node_name, WWN_SIZE);
5401 fcport->fw_login_state = DSC_LS_PRLI_PEND;
5402 fcport->local = 0;
5403 fcport->loop_id =
5406 fcport->fw_login_state = DSC_LS_PRLI_PEND;
5412 fcport->conf_compl_supported = 1;
5415 fcport->port_type = FCT_INITIATOR;
5417 fcport->port_type = FCT_TARGET;
5426 if (tfcp && (tfcp != fcport)) {
5428 * We have a conflict fcport with same NportID.
5439 fcport->login_pause = 1;
5440 tfcp->conflict = fcport;
5443 fcport->login_pause = 1;
5444 tfcp->conflict = fcport;
5454 fcport->flags &= ~FCF_FABRIC_DEVICE;
5455 fcport->keep_nport_handle = 1;
5457 fcport->fc4_type =
5459 fcport->n2n_flag = 1;
5461 fcport->fw_login_state = 0;
5465 qla24xx_fcport_handle_login(vha, fcport);
5471 qla2x00_free_fcport(fcport);
5516 qla2x00_async_login(vha, e->u.logio.fcport,
5520 rc = qla2x00_async_logout(vha, e->u.logio.fcport);
5523 qla2x00_async_adisc(vha, e->u.logio.fcport,
5542 qla24xx_async_gpdb(vha, e->u.fcport.fcport,
5543 e->u.fcport.opt);
5546 qla24xx_async_prli(vha, e->u.fcport.fcport);
5549 qla24xx_async_gpsc(vha, e->u.fcport.fcport);
5552 qla24xx_async_gnl(vha, e->u.fcport.fcport);
5558 rc = qla2x00_async_prlo(vha, e->u.logio.fcport);
5561 qla2x00_async_prlo_done(vha, e->u.logio.fcport,
5575 qla24xx_async_gfpnid(vha, e->u.fcport.fcport);
5581 qla_do_iidma_work(vha, e->u.fcport.fcport);
5585 e->u.fcport.fcport, false);
5627 fc_port_t *fcport;
5631 list_for_each_entry(fcport, &vha->vp_fcports, list) {
5636 if (atomic_read(&fcport->state) != FCS_ONLINE &&
5637 fcport->login_retry) {
5638 if (fcport->scan_state != QLA_FCPORT_FOUND ||
5639 fcport->disc_state == DSC_LOGIN_AUTH_PEND ||
5640 fcport->disc_state == DSC_LOGIN_COMPLETE)
5643 if (fcport->flags & (FCF_ASYNC_SENT|FCF_ASYNC_ACTIVE) ||
5644 fcport->disc_state == DSC_DELETE_PEND) {
5649 ea.fcport = fcport;
5655 fcport);
5658 fcport->login_retry--;
5661 fcport);
5663 fcport->old_loop_id =
5664 fcport->loop_id;
5667 fcport->loop_id);
5669 (vha, fcport);
5676 fcport->login_retry,
5677 fcport->loop_id);
5679 fcport->login_retry = 0;
5682 if (fcport->login_retry == 0 &&
5684 qla2x00_clear_loop_id(fcport);
7025 &base_vha->hw->mr.fcport,
7409 fc_port_t *fcport = NULL;
7447 list_for_each_entry(fcport, &vha->vp_fcports, list) {
7448 if (fcport->tgt_link_down_time < QLA2XX_MAX_LINK_DOWN_TIME)
7449 fcport->tgt_link_down_time++;
7489 sfcp = sp->fcport;
7735 fc_port_t *fcport;
7775 list_for_each_entry(fcport, &vha->vp_fcports, list)
7776 fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT);
7782 list_for_each_entry(fcport, &vp->vp_fcports, list)
7783 fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT);