Lines Matching refs:fcport

779 	struct qla_hw_data *ha = sp->fcport->vha->hw;  in qla2xxx_qpair_sp_free_dma()
874 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; in qla2xxx_queuecommand() local
932 if (!fcport || fcport->deleted) { in qla2xxx_queuecommand()
937 if (atomic_read(&fcport->state) != FCS_ONLINE || fcport->deleted) { in qla2xxx_queuecommand()
938 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD || in qla2xxx_queuecommand()
942 atomic_read(&fcport->state), in qla2xxx_queuecommand()
954 if (fcport->retry_delay_timestamp == 0) { in qla2xxx_queuecommand()
956 } else if (time_after(jiffies, fcport->retry_delay_timestamp)) in qla2xxx_queuecommand()
957 fcport->retry_delay_timestamp = 0; in qla2xxx_queuecommand()
963 qla2xxx_init_sp(sp, vha, vha->hw->base_qpair, fcport); in qla2xxx_queuecommand()
998 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; in qla2xxx_mqueuecommand() local
1021 if (!fcport || fcport->deleted) { in qla2xxx_mqueuecommand()
1026 if (atomic_read(&fcport->state) != FCS_ONLINE || fcport->deleted) { in qla2xxx_mqueuecommand()
1027 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD || in qla2xxx_mqueuecommand()
1031 atomic_read(&fcport->state), in qla2xxx_mqueuecommand()
1043 if (fcport->retry_delay_timestamp == 0) { in qla2xxx_mqueuecommand()
1045 } else if (time_after(jiffies, fcport->retry_delay_timestamp)) in qla2xxx_mqueuecommand()
1046 fcport->retry_delay_timestamp = 0; in qla2xxx_mqueuecommand()
1052 qla2xxx_init_sp(sp, vha, qpair, fcport); in qla2xxx_mqueuecommand()
1172 struct fc_port *fcport; in test_fcport_count() local
1174 list_for_each_entry(fcport, &vha->vp_fcports, list) { in test_fcport_count()
1175 if (fcport->deleted != QLA_SESS_DELETED) { in test_fcport_count()
1315 if ((sp->fcport && sp->fcport->deleted) || !qpair) in qla2xxx_eh_abort()
1453 fc_port_t *fcport = (struct fc_port *) sdev->hostdata; in qla2xxx_eh_device_reset() local
1464 if (!fcport) { in qla2xxx_eh_device_reset()
1472 if (fcport->deleted) in qla2xxx_eh_device_reset()
1486 if (ha->isp_ops->lun_reset(fcport, sdev->lun, 1) in qla2xxx_eh_device_reset()
1522 fc_port_t *fcport = *(fc_port_t **)rport->dd_data; in qla2xxx_eh_target_reset() local
1532 if (!fcport) { in qla2xxx_eh_target_reset()
1540 if (fcport->deleted) in qla2xxx_eh_target_reset()
1554 if (ha->isp_ops->target_reset(fcport, 0, 0) != QLA_SUCCESS) { in qla2xxx_eh_target_reset()
3260 ha->mr.fcport.vha = base_vha; in qla2x00_probe_one()
3261 ha->mr.fcport.port_type = FCT_UNKNOWN; in qla2x00_probe_one()
3262 ha->mr.fcport.loop_id = FC_NO_LOOP_ID; in qla2x00_probe_one()
3263 qla2x00_set_fcport_state(&ha->mr.fcport, FCS_UNCONFIGURED); in qla2x00_probe_one()
3264 ha->mr.fcport.supported_classes = FC_COS_UNSPECIFIED; in qla2x00_probe_one()
3265 ha->mr.fcport.scan_state = 1; in qla2x00_probe_one()
3549 &base_vha->hw->mr.fcport, FXDISC_GET_CONFIG_INFO); in qla2x00_probe_one()
3576 &base_vha->hw->mr.fcport, FXDISC_GET_PORT_INFO); in qla2x00_probe_one()
3580 &base_vha->hw->mr.fcport, FXDISC_REG_HOST_INFO); in qla2x00_probe_one()
4025 fc_port_t *fcport, *tfcport; in qla2x00_free_fcports() local
4027 list_for_each_entry_safe(fcport, tfcport, &vha->vp_fcports, list) in qla2x00_free_fcports()
4028 qla2x00_free_fcport(fcport); in qla2x00_free_fcports()
4032 qla2x00_schedule_rport_del(struct scsi_qla_host *vha, fc_port_t *fcport) in qla2x00_schedule_rport_del() argument
4036 if (!fcport->rport) in qla2x00_schedule_rport_del()
4039 if (fcport->rport) { in qla2x00_schedule_rport_del()
4040 ql_dbg(ql_dbg_disc, fcport->vha, 0x2109, in qla2x00_schedule_rport_del()
4042 __func__, fcport->port_name, fcport->rport, in qla2x00_schedule_rport_del()
4043 fcport->rport->roles); in qla2x00_schedule_rport_del()
4044 fc_remote_port_delete(fcport->rport); in qla2x00_schedule_rport_del()
4058 void qla2x00_mark_device_lost(scsi_qla_host_t *vha, fc_port_t *fcport, in qla2x00_mark_device_lost() argument
4062 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); in qla2x00_mark_device_lost()
4063 qla2x00_schedule_rport_del(vha, fcport); in qla2x00_mark_device_lost()
4067 if (atomic_read(&fcport->state) == FCS_ONLINE && in qla2x00_mark_device_lost()
4068 vha->vp_idx == fcport->vha->vp_idx) { in qla2x00_mark_device_lost()
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()
4077 if (atomic_read(&fcport->state) != FCS_DEVICE_DEAD) in qla2x00_mark_device_lost()
4078 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); in qla2x00_mark_device_lost()
4089 fc_port_t *fcport; in qla2x00_mark_all_devices_lost() local
4094 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qla2x00_mark_all_devices_lost()
4096 fcport->loop_id != FC_NO_LOOP_ID && in qla2x00_mark_all_devices_lost()
4097 (fcport->flags & FCF_FCP2_DEVICE) && in qla2x00_mark_all_devices_lost()
4098 fcport->port_type == FCT_TARGET && in qla2x00_mark_all_devices_lost()
4102 fcport->flags, fcport->port_type, in qla2x00_mark_all_devices_lost()
4103 fcport->d_id.b24, fcport->port_name); in qla2x00_mark_all_devices_lost()
4106 fcport->scan_state = 0; in qla2x00_mark_all_devices_lost()
4107 qlt_schedule_sess_for_deletion(fcport); in qla2x00_mark_all_devices_lost()
5169 fc_port_t *fcport, uint16_t *data) \
5177 e->u.logio.fcport = fcport; \
5182 fcport->flags |= FCF_ASYNC_ACTIVE; \
5239 void qla24xx_sched_upd_fcport(fc_port_t *fcport) in qla24xx_sched_upd_fcport() argument
5243 if (IS_SW_RESV_ADDR(fcport->d_id)) in qla24xx_sched_upd_fcport()
5246 spin_lock_irqsave(&fcport->vha->work_lock, flags); in qla24xx_sched_upd_fcport()
5247 if (fcport->disc_state == DSC_UPD_FCPORT) { in qla24xx_sched_upd_fcport()
5248 spin_unlock_irqrestore(&fcport->vha->work_lock, flags); in qla24xx_sched_upd_fcport()
5251 fcport->jiffies_at_registration = jiffies; in qla24xx_sched_upd_fcport()
5252 fcport->sec_since_registration = 0; in qla24xx_sched_upd_fcport()
5253 fcport->next_disc_state = DSC_DELETED; in qla24xx_sched_upd_fcport()
5254 qla2x00_set_fcport_disc_state(fcport, DSC_UPD_FCPORT); in qla24xx_sched_upd_fcport()
5255 spin_unlock_irqrestore(&fcport->vha->work_lock, flags); in qla24xx_sched_upd_fcport()
5257 queue_work(system_unbound_wq, &fcport->reg_work); in qla24xx_sched_upd_fcport()
5264 fc_port_t *fcport = NULL, *tfcp; in qla24xx_create_new_sess() local
5274 fcport = qla2x00_find_fcport_by_wwpn(vha, e->u.new_sess.port_name, 1); in qla24xx_create_new_sess()
5275 if (fcport) { in qla24xx_create_new_sess()
5276 fcport->d_id = e->u.new_sess.id; in qla24xx_create_new_sess()
5278 fcport->fw_login_state = DSC_LS_PLOGI_PEND; in qla24xx_create_new_sess()
5279 memcpy(fcport->node_name, in qla24xx_create_new_sess()
5282 qlt_plogi_ack_link(vha, pla, fcport, QLT_PLOGI_LINK_SAME_WWN); in qla24xx_create_new_sess()
5290 fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); in qla24xx_create_new_sess()
5291 if (fcport) { in qla24xx_create_new_sess()
5292 fcport->d_id = e->u.new_sess.id; in qla24xx_create_new_sess()
5293 fcport->flags |= FCF_FABRIC_DEVICE; in qla24xx_create_new_sess()
5294 fcport->fw_login_state = DSC_LS_PLOGI_PEND; in qla24xx_create_new_sess()
5295 fcport->tgt_short_link_down_cnt = 0; in qla24xx_create_new_sess()
5297 memcpy(fcport->port_name, e->u.new_sess.port_name, in qla24xx_create_new_sess()
5300 fcport->fc4_type = e->u.new_sess.fc4_type; in qla24xx_create_new_sess()
5301 if (NVME_PRIORITY(vha->hw, fcport)) in qla24xx_create_new_sess()
5302 fcport->do_prli_nvme = 1; in qla24xx_create_new_sess()
5304 fcport->do_prli_nvme = 0; in qla24xx_create_new_sess()
5307 fcport->dm_login_expire = jiffies + in qla24xx_create_new_sess()
5309 fcport->fc4_type = FS_FC4TYPE_FCP; in qla24xx_create_new_sess()
5310 fcport->n2n_flag = 1; in qla24xx_create_new_sess()
5312 fcport->fc4_type |= FS_FC4TYPE_NVME; in qla24xx_create_new_sess()
5340 list_add_tail(&fcport->list, &vha->vp_fcports); in qla24xx_create_new_sess()
5344 qlt_plogi_ack_link(vha, pla, fcport, in qla24xx_create_new_sess()
5351 if (fcport) { in qla24xx_create_new_sess()
5352 fcport->id_changed = 1; in qla24xx_create_new_sess()
5353 fcport->scan_state = QLA_FCPORT_FOUND; in qla24xx_create_new_sess()
5354 fcport->chip_reset = vha->hw->base_qpair->chip_reset; in qla24xx_create_new_sess()
5355 memcpy(fcport->node_name, e->u.new_sess.node_name, WWN_SIZE); in qla24xx_create_new_sess()
5361 fcport->fw_login_state = DSC_LS_PRLI_PEND; in qla24xx_create_new_sess()
5362 fcport->local = 0; in qla24xx_create_new_sess()
5363 fcport->loop_id = in qla24xx_create_new_sess()
5366 fcport->fw_login_state = DSC_LS_PRLI_PEND; in qla24xx_create_new_sess()
5372 fcport->conf_compl_supported = 1; in qla24xx_create_new_sess()
5375 fcport->port_type = FCT_INITIATOR; in qla24xx_create_new_sess()
5377 fcport->port_type = FCT_TARGET; in qla24xx_create_new_sess()
5386 if (tfcp && (tfcp != fcport)) { in qla24xx_create_new_sess()
5399 fcport->login_pause = 1; in qla24xx_create_new_sess()
5400 tfcp->conflict = fcport; in qla24xx_create_new_sess()
5403 fcport->login_pause = 1; in qla24xx_create_new_sess()
5404 tfcp->conflict = fcport; in qla24xx_create_new_sess()
5414 fcport->flags &= ~FCF_FABRIC_DEVICE; in qla24xx_create_new_sess()
5415 fcport->keep_nport_handle = 1; in qla24xx_create_new_sess()
5417 fcport->fc4_type = in qla24xx_create_new_sess()
5419 fcport->n2n_flag = 1; in qla24xx_create_new_sess()
5421 fcport->fw_login_state = 0; in qla24xx_create_new_sess()
5425 qla24xx_fcport_handle_login(vha, fcport); in qla24xx_create_new_sess()
5431 qla2x00_free_fcport(fcport); in qla24xx_create_new_sess()
5476 qla2x00_async_login(vha, e->u.logio.fcport, in qla2x00_do_work()
5480 rc = qla2x00_async_logout(vha, e->u.logio.fcport); in qla2x00_do_work()
5483 qla2x00_async_adisc(vha, e->u.logio.fcport, in qla2x00_do_work()
5502 qla24xx_async_gpdb(vha, e->u.fcport.fcport, in qla2x00_do_work()
5503 e->u.fcport.opt); in qla2x00_do_work()
5506 qla24xx_async_prli(vha, e->u.fcport.fcport); in qla2x00_do_work()
5509 qla24xx_async_gpsc(vha, e->u.fcport.fcport); in qla2x00_do_work()
5512 qla24xx_async_gnl(vha, e->u.fcport.fcport); in qla2x00_do_work()
5518 rc = qla2x00_async_prlo(vha, e->u.logio.fcport); in qla2x00_do_work()
5521 qla2x00_async_prlo_done(vha, e->u.logio.fcport, in qla2x00_do_work()
5535 qla24xx_async_gfpnid(vha, e->u.fcport.fcport); in qla2x00_do_work()
5541 qla_do_iidma_work(vha, e->u.fcport.fcport); in qla2x00_do_work()
5545 e->u.fcport.fcport, false); in qla2x00_do_work()
5587 fc_port_t *fcport; in qla2x00_relogin() local
5591 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qla2x00_relogin()
5596 if (atomic_read(&fcport->state) != FCS_ONLINE && in qla2x00_relogin()
5597 fcport->login_retry) { in qla2x00_relogin()
5598 if (fcport->scan_state != QLA_FCPORT_FOUND || in qla2x00_relogin()
5599 fcport->disc_state == DSC_LOGIN_AUTH_PEND || in qla2x00_relogin()
5600 fcport->disc_state == DSC_LOGIN_COMPLETE) in qla2x00_relogin()
5603 if (fcport->flags & (FCF_ASYNC_SENT|FCF_ASYNC_ACTIVE) || in qla2x00_relogin()
5604 fcport->disc_state == DSC_DELETE_PEND) { in qla2x00_relogin()
5609 ea.fcport = fcport; in qla2x00_relogin()
5615 fcport); in qla2x00_relogin()
5618 fcport->login_retry--; in qla2x00_relogin()
5621 fcport); in qla2x00_relogin()
5623 fcport->old_loop_id = in qla2x00_relogin()
5624 fcport->loop_id; in qla2x00_relogin()
5627 fcport->loop_id); in qla2x00_relogin()
5629 (vha, fcport); in qla2x00_relogin()
5636 fcport->login_retry, in qla2x00_relogin()
5637 fcport->loop_id); in qla2x00_relogin()
5639 fcport->login_retry = 0; in qla2x00_relogin()
5642 if (fcport->login_retry == 0 && in qla2x00_relogin()
5644 qla2x00_clear_loop_id(fcport); in qla2x00_relogin()
6986 &base_vha->hw->mr.fcport, in qla2x00_do_dpc()
7370 fc_port_t *fcport = NULL; in qla2x00_timer() local
7408 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qla2x00_timer()
7409 if (fcport->tgt_link_down_time < QLA2XX_MAX_LINK_DOWN_TIME) in qla2x00_timer()
7410 fcport->tgt_link_down_time++; in qla2x00_timer()
7450 sfcp = sp->fcport; in qla2x00_timer()
7696 fc_port_t *fcport; in qla_pci_error_cleanup() local
7736 list_for_each_entry(fcport, &vha->vp_fcports, list) in qla_pci_error_cleanup()
7737 fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); in qla_pci_error_cleanup()
7743 list_for_each_entry(fcport, &vp->vp_fcports, list) in qla_pci_error_cleanup()
7744 fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); in qla_pci_error_cleanup()