Lines Matching refs:fcport
769 struct qla_hw_data *ha = sp->fcport->vha->hw; in qla2xxx_qpair_sp_free_dma()
864 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; in qla2xxx_queuecommand() local
922 if (!fcport || fcport->deleted) { in qla2xxx_queuecommand()
927 if (atomic_read(&fcport->state) != FCS_ONLINE || fcport->deleted) { in qla2xxx_queuecommand()
928 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD || in qla2xxx_queuecommand()
932 atomic_read(&fcport->state), in qla2xxx_queuecommand()
944 if (fcport->retry_delay_timestamp == 0) { in qla2xxx_queuecommand()
946 } else if (time_after(jiffies, fcport->retry_delay_timestamp)) in qla2xxx_queuecommand()
947 fcport->retry_delay_timestamp = 0; in qla2xxx_queuecommand()
953 qla2xxx_init_sp(sp, vha, vha->hw->base_qpair, fcport); in qla2xxx_queuecommand()
988 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; in qla2xxx_mqueuecommand() local
1011 if (!fcport || fcport->deleted) { in qla2xxx_mqueuecommand()
1016 if (atomic_read(&fcport->state) != FCS_ONLINE || fcport->deleted) { in qla2xxx_mqueuecommand()
1017 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD || in qla2xxx_mqueuecommand()
1021 atomic_read(&fcport->state), in qla2xxx_mqueuecommand()
1033 if (fcport->retry_delay_timestamp == 0) { in qla2xxx_mqueuecommand()
1035 } else if (time_after(jiffies, fcport->retry_delay_timestamp)) in qla2xxx_mqueuecommand()
1036 fcport->retry_delay_timestamp = 0; in qla2xxx_mqueuecommand()
1042 qla2xxx_init_sp(sp, vha, qpair, fcport); in qla2xxx_mqueuecommand()
1125 struct fc_port *fcport; in test_fcport_count() local
1127 list_for_each_entry(fcport, &vha->vp_fcports, list) { in test_fcport_count()
1128 if (fcport->deleted != QLA_SESS_DELETED) { in test_fcport_count()
1268 if ((sp->fcport && sp->fcport->deleted) || !qpair) in qla2xxx_eh_abort()
1362 if (sp->fcport) in __qla2x00_eh_wait_for_pending_commands()
1363 match = sp->fcport->d_id.b24 == t; in __qla2x00_eh_wait_for_pending_commands()
1368 if (sp->fcport) in __qla2x00_eh_wait_for_pending_commands()
1369 match = (sp->fcport->d_id.b24 == t && in __qla2x00_eh_wait_for_pending_commands()
1441 fc_port_t *fcport = (struct fc_port *) sdev->hostdata; in qla2xxx_eh_device_reset() local
1452 if (!fcport) { in qla2xxx_eh_device_reset()
1460 if (fcport->deleted) in qla2xxx_eh_device_reset()
1474 if (ha->isp_ops->lun_reset(fcport, sdev->lun, 1) in qla2xxx_eh_device_reset()
1481 if (qla2x00_eh_wait_for_pending_commands(vha, fcport->d_id.b24, in qla2xxx_eh_device_reset()
1511 fc_port_t *fcport = *(fc_port_t **)rport->dd_data; in qla2xxx_eh_target_reset() local
1521 if (!fcport) { in qla2xxx_eh_target_reset()
1529 if (fcport->deleted) in qla2xxx_eh_target_reset()
1543 if (ha->isp_ops->target_reset(fcport, 0, 0) != QLA_SUCCESS) { in qla2xxx_eh_target_reset()
1549 if (qla2x00_eh_wait_for_pending_commands(vha, fcport->d_id.b24, 0, in qla2xxx_eh_target_reset()
3258 ha->mr.fcport.vha = base_vha; in qla2x00_probe_one()
3259 ha->mr.fcport.port_type = FCT_UNKNOWN; in qla2x00_probe_one()
3260 ha->mr.fcport.loop_id = FC_NO_LOOP_ID; in qla2x00_probe_one()
3261 qla2x00_set_fcport_state(&ha->mr.fcport, FCS_UNCONFIGURED); in qla2x00_probe_one()
3262 ha->mr.fcport.supported_classes = FC_COS_UNSPECIFIED; in qla2x00_probe_one()
3263 ha->mr.fcport.scan_state = 1; in qla2x00_probe_one()
3554 &base_vha->hw->mr.fcport, FXDISC_GET_CONFIG_INFO); in qla2x00_probe_one()
3584 &base_vha->hw->mr.fcport, FXDISC_GET_PORT_INFO); in qla2x00_probe_one()
3588 &base_vha->hw->mr.fcport, FXDISC_REG_HOST_INFO); in qla2x00_probe_one()
4032 fc_port_t *fcport, *tfcport; in qla2x00_free_fcports() local
4034 list_for_each_entry_safe(fcport, tfcport, &vha->vp_fcports, list) in qla2x00_free_fcports()
4035 qla2x00_free_fcport(fcport); in qla2x00_free_fcports()
4039 qla2x00_schedule_rport_del(struct scsi_qla_host *vha, fc_port_t *fcport) in qla2x00_schedule_rport_del() argument
4043 if (!fcport->rport) in qla2x00_schedule_rport_del()
4046 if (fcport->rport) { in qla2x00_schedule_rport_del()
4047 ql_dbg(ql_dbg_disc, fcport->vha, 0x2109, in qla2x00_schedule_rport_del()
4049 __func__, fcport->port_name, fcport->rport, in qla2x00_schedule_rport_del()
4050 fcport->rport->roles); in qla2x00_schedule_rport_del()
4051 fc_remote_port_delete(fcport->rport); in qla2x00_schedule_rport_del()
4065 void qla2x00_mark_device_lost(scsi_qla_host_t *vha, fc_port_t *fcport, in qla2x00_mark_device_lost() argument
4069 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); in qla2x00_mark_device_lost()
4070 qla2x00_schedule_rport_del(vha, fcport); in qla2x00_mark_device_lost()
4074 if (atomic_read(&fcport->state) == FCS_ONLINE && in qla2x00_mark_device_lost()
4075 vha->vp_idx == fcport->vha->vp_idx) { in qla2x00_mark_device_lost()
4076 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); in qla2x00_mark_device_lost()
4077 qla2x00_schedule_rport_del(vha, fcport); in qla2x00_mark_device_lost()
4084 if (atomic_read(&fcport->state) != FCS_DEVICE_DEAD) in qla2x00_mark_device_lost()
4085 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); in qla2x00_mark_device_lost()
4096 fc_port_t *fcport; in qla2x00_mark_all_devices_lost() local
4101 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qla2x00_mark_all_devices_lost()
4103 fcport->loop_id != FC_NO_LOOP_ID && in qla2x00_mark_all_devices_lost()
4104 (fcport->flags & FCF_FCP2_DEVICE) && in qla2x00_mark_all_devices_lost()
4105 fcport->port_type == FCT_TARGET && in qla2x00_mark_all_devices_lost()
4109 fcport->flags, fcport->port_type, in qla2x00_mark_all_devices_lost()
4110 fcport->d_id.b24, fcport->port_name); in qla2x00_mark_all_devices_lost()
4113 fcport->scan_state = 0; in qla2x00_mark_all_devices_lost()
4114 qlt_schedule_sess_for_deletion(fcport); in qla2x00_mark_all_devices_lost()
5195 fc_port_t *fcport, uint16_t *data) \
5203 e->u.logio.fcport = fcport; \
5208 fcport->flags |= FCF_ASYNC_ACTIVE; \
5265 void qla24xx_sched_upd_fcport(fc_port_t *fcport) in qla24xx_sched_upd_fcport() argument
5269 if (IS_SW_RESV_ADDR(fcport->d_id)) in qla24xx_sched_upd_fcport()
5272 spin_lock_irqsave(&fcport->vha->work_lock, flags); in qla24xx_sched_upd_fcport()
5273 if (fcport->disc_state == DSC_UPD_FCPORT) { in qla24xx_sched_upd_fcport()
5274 spin_unlock_irqrestore(&fcport->vha->work_lock, flags); in qla24xx_sched_upd_fcport()
5277 fcport->jiffies_at_registration = jiffies; in qla24xx_sched_upd_fcport()
5278 fcport->sec_since_registration = 0; in qla24xx_sched_upd_fcport()
5279 fcport->next_disc_state = DSC_DELETED; in qla24xx_sched_upd_fcport()
5280 qla2x00_set_fcport_disc_state(fcport, DSC_UPD_FCPORT); in qla24xx_sched_upd_fcport()
5281 spin_unlock_irqrestore(&fcport->vha->work_lock, flags); in qla24xx_sched_upd_fcport()
5283 queue_work(system_unbound_wq, &fcport->reg_work); in qla24xx_sched_upd_fcport()
5290 fc_port_t *fcport = NULL, *tfcp; in qla24xx_create_new_sess() local
5300 fcport = qla2x00_find_fcport_by_wwpn(vha, e->u.new_sess.port_name, 1); in qla24xx_create_new_sess()
5301 if (fcport) { in qla24xx_create_new_sess()
5302 fcport->d_id = e->u.new_sess.id; in qla24xx_create_new_sess()
5304 fcport->fw_login_state = DSC_LS_PLOGI_PEND; in qla24xx_create_new_sess()
5305 memcpy(fcport->node_name, in qla24xx_create_new_sess()
5308 qlt_plogi_ack_link(vha, pla, fcport, QLT_PLOGI_LINK_SAME_WWN); in qla24xx_create_new_sess()
5316 fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); in qla24xx_create_new_sess()
5317 if (fcport) { in qla24xx_create_new_sess()
5318 fcport->d_id = e->u.new_sess.id; in qla24xx_create_new_sess()
5319 fcport->flags |= FCF_FABRIC_DEVICE; in qla24xx_create_new_sess()
5320 fcport->fw_login_state = DSC_LS_PLOGI_PEND; in qla24xx_create_new_sess()
5321 fcport->tgt_short_link_down_cnt = 0; in qla24xx_create_new_sess()
5323 memcpy(fcport->port_name, e->u.new_sess.port_name, in qla24xx_create_new_sess()
5326 fcport->fc4_type = e->u.new_sess.fc4_type; in qla24xx_create_new_sess()
5327 if (NVME_PRIORITY(vha->hw, fcport)) in qla24xx_create_new_sess()
5328 fcport->do_prli_nvme = 1; in qla24xx_create_new_sess()
5330 fcport->do_prli_nvme = 0; in qla24xx_create_new_sess()
5333 fcport->dm_login_expire = jiffies + in qla24xx_create_new_sess()
5335 fcport->fc4_type = FS_FC4TYPE_FCP; in qla24xx_create_new_sess()
5336 fcport->n2n_flag = 1; in qla24xx_create_new_sess()
5338 fcport->fc4_type |= FS_FC4TYPE_NVME; in qla24xx_create_new_sess()
5366 list_add_tail(&fcport->list, &vha->vp_fcports); in qla24xx_create_new_sess()
5370 qlt_plogi_ack_link(vha, pla, fcport, in qla24xx_create_new_sess()
5377 if (fcport) { in qla24xx_create_new_sess()
5378 fcport->id_changed = 1; in qla24xx_create_new_sess()
5379 fcport->scan_state = QLA_FCPORT_FOUND; in qla24xx_create_new_sess()
5380 fcport->chip_reset = vha->hw->base_qpair->chip_reset; in qla24xx_create_new_sess()
5381 memcpy(fcport->node_name, e->u.new_sess.node_name, WWN_SIZE); in qla24xx_create_new_sess()
5387 fcport->fw_login_state = DSC_LS_PRLI_PEND; in qla24xx_create_new_sess()
5388 fcport->local = 0; in qla24xx_create_new_sess()
5389 fcport->loop_id = in qla24xx_create_new_sess()
5392 fcport->fw_login_state = DSC_LS_PRLI_PEND; in qla24xx_create_new_sess()
5398 fcport->conf_compl_supported = 1; in qla24xx_create_new_sess()
5401 fcport->port_type = FCT_INITIATOR; in qla24xx_create_new_sess()
5403 fcport->port_type = FCT_TARGET; in qla24xx_create_new_sess()
5412 if (tfcp && (tfcp != fcport)) { in qla24xx_create_new_sess()
5425 fcport->login_pause = 1; in qla24xx_create_new_sess()
5426 tfcp->conflict = fcport; in qla24xx_create_new_sess()
5429 fcport->login_pause = 1; in qla24xx_create_new_sess()
5430 tfcp->conflict = fcport; in qla24xx_create_new_sess()
5440 fcport->flags &= ~FCF_FABRIC_DEVICE; in qla24xx_create_new_sess()
5441 fcport->keep_nport_handle = 1; in qla24xx_create_new_sess()
5443 fcport->fc4_type = in qla24xx_create_new_sess()
5445 fcport->n2n_flag = 1; in qla24xx_create_new_sess()
5447 fcport->fw_login_state = 0; in qla24xx_create_new_sess()
5451 qla24xx_fcport_handle_login(vha, fcport); in qla24xx_create_new_sess()
5457 qla2x00_free_fcport(fcport); in qla24xx_create_new_sess()
5502 qla2x00_async_login(vha, e->u.logio.fcport, in qla2x00_do_work()
5506 rc = qla2x00_async_logout(vha, e->u.logio.fcport); in qla2x00_do_work()
5509 qla2x00_async_adisc(vha, e->u.logio.fcport, in qla2x00_do_work()
5528 qla24xx_async_gpdb(vha, e->u.fcport.fcport, in qla2x00_do_work()
5529 e->u.fcport.opt); in qla2x00_do_work()
5532 qla24xx_async_prli(vha, e->u.fcport.fcport); in qla2x00_do_work()
5535 qla24xx_async_gpsc(vha, e->u.fcport.fcport); in qla2x00_do_work()
5538 qla24xx_async_gnl(vha, e->u.fcport.fcport); in qla2x00_do_work()
5544 rc = qla2x00_async_prlo(vha, e->u.logio.fcport); in qla2x00_do_work()
5547 qla2x00_async_prlo_done(vha, e->u.logio.fcport, in qla2x00_do_work()
5557 qla24xx_async_gfpnid(vha, e->u.fcport.fcport); in qla2x00_do_work()
5563 qla_do_iidma_work(vha, e->u.fcport.fcport); in qla2x00_do_work()
5567 e->u.fcport.fcport); in qla2x00_do_work()
5609 fc_port_t *fcport; in qla2x00_relogin() local
5613 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qla2x00_relogin()
5618 if (atomic_read(&fcport->state) != FCS_ONLINE && in qla2x00_relogin()
5619 fcport->login_retry) { in qla2x00_relogin()
5620 if (fcport->scan_state != QLA_FCPORT_FOUND || in qla2x00_relogin()
5621 fcport->disc_state == DSC_LOGIN_AUTH_PEND || in qla2x00_relogin()
5622 fcport->disc_state == DSC_LOGIN_COMPLETE) in qla2x00_relogin()
5625 if (fcport->flags & (FCF_ASYNC_SENT|FCF_ASYNC_ACTIVE) || in qla2x00_relogin()
5626 fcport->disc_state == DSC_DELETE_PEND) { in qla2x00_relogin()
5631 ea.fcport = fcport; in qla2x00_relogin()
5637 fcport); in qla2x00_relogin()
5640 fcport->login_retry--; in qla2x00_relogin()
5643 fcport); in qla2x00_relogin()
5645 fcport->old_loop_id = in qla2x00_relogin()
5646 fcport->loop_id; in qla2x00_relogin()
5649 fcport->loop_id); in qla2x00_relogin()
5651 (vha, fcport); in qla2x00_relogin()
5658 fcport->login_retry, in qla2x00_relogin()
5659 fcport->loop_id); in qla2x00_relogin()
5661 fcport->login_retry = 0; in qla2x00_relogin()
5664 if (fcport->login_retry == 0 && in qla2x00_relogin()
5666 qla2x00_clear_loop_id(fcport); in qla2x00_relogin()
7011 &base_vha->hw->mr.fcport, in qla2x00_do_dpc()
7392 fc_port_t *fcport = NULL; in qla2x00_timer() local
7430 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qla2x00_timer()
7431 if (fcport->tgt_link_down_time < QLA2XX_MAX_LINK_DOWN_TIME) in qla2x00_timer()
7432 fcport->tgt_link_down_time++; in qla2x00_timer()
7472 sfcp = sp->fcport; in qla2x00_timer()
7718 fc_port_t *fcport; in qla_pci_error_cleanup() local
7758 list_for_each_entry(fcport, &vha->vp_fcports, list) in qla_pci_error_cleanup()
7759 fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); in qla_pci_error_cleanup()
7765 list_for_each_entry(fcport, &vp->vp_fcports, list) in qla_pci_error_cleanup()
7766 fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); in qla_pci_error_cleanup()