Lines Matching refs:fcport

742 	struct qla_hw_data *ha = sp->fcport->vha->hw;  in qla2xxx_qpair_sp_free_dma()
834 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; in qla2xxx_queuecommand() local
892 if (!fcport || fcport->deleted) { in qla2xxx_queuecommand()
897 if (atomic_read(&fcport->state) != FCS_ONLINE || fcport->deleted) { in qla2xxx_queuecommand()
898 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD || in qla2xxx_queuecommand()
902 atomic_read(&fcport->state), in qla2xxx_queuecommand()
914 if (fcport->retry_delay_timestamp == 0) { in qla2xxx_queuecommand()
916 } else if (time_after(jiffies, fcport->retry_delay_timestamp)) in qla2xxx_queuecommand()
917 fcport->retry_delay_timestamp = 0; in qla2xxx_queuecommand()
922 qla2xxx_init_sp(sp, vha, vha->hw->base_qpair, fcport); in qla2xxx_queuecommand()
958 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; in qla2xxx_mqueuecommand() local
981 if (!fcport || fcport->deleted) { in qla2xxx_mqueuecommand()
986 if (atomic_read(&fcport->state) != FCS_ONLINE || fcport->deleted) { in qla2xxx_mqueuecommand()
987 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD || in qla2xxx_mqueuecommand()
991 atomic_read(&fcport->state), in qla2xxx_mqueuecommand()
1003 if (fcport->retry_delay_timestamp == 0) { in qla2xxx_mqueuecommand()
1005 } else if (time_after(jiffies, fcport->retry_delay_timestamp)) in qla2xxx_mqueuecommand()
1006 fcport->retry_delay_timestamp = 0; in qla2xxx_mqueuecommand()
1011 qla2xxx_init_sp(sp, vha, qpair, fcport); in qla2xxx_mqueuecommand()
1131 struct fc_port *fcport; in test_fcport_count() local
1133 list_for_each_entry(fcport, &vha->vp_fcports, list) { in test_fcport_count()
1134 if (fcport->deleted != QLA_SESS_DELETED) { in test_fcport_count()
1274 if ((sp->fcport && sp->fcport->deleted) || !qpair) in qla2xxx_eh_abort()
1393 fc_port_t *fcport = (struct fc_port *) sdev->hostdata; in qla2xxx_eh_device_reset() local
1404 if (!fcport) { in qla2xxx_eh_device_reset()
1412 if (fcport->deleted) in qla2xxx_eh_device_reset()
1426 if (ha->isp_ops->lun_reset(fcport, sdev->lun, 1) in qla2xxx_eh_device_reset()
1462 fc_port_t *fcport = *(fc_port_t **)rport->dd_data; in qla2xxx_eh_target_reset() local
1472 if (!fcport) { in qla2xxx_eh_target_reset()
1480 if (fcport->deleted) in qla2xxx_eh_target_reset()
1494 if (ha->isp_ops->target_reset(fcport, 0, 0) != QLA_SUCCESS) { in qla2xxx_eh_target_reset()
3179 ha->mr.fcport.vha = base_vha; in qla2x00_probe_one()
3180 ha->mr.fcport.port_type = FCT_UNKNOWN; in qla2x00_probe_one()
3181 ha->mr.fcport.loop_id = FC_NO_LOOP_ID; in qla2x00_probe_one()
3182 qla2x00_set_fcport_state(&ha->mr.fcport, FCS_UNCONFIGURED); in qla2x00_probe_one()
3183 ha->mr.fcport.supported_classes = FC_COS_UNSPECIFIED; in qla2x00_probe_one()
3184 ha->mr.fcport.scan_state = 1; in qla2x00_probe_one()
3469 &base_vha->hw->mr.fcport, FXDISC_GET_CONFIG_INFO); in qla2x00_probe_one()
3496 &base_vha->hw->mr.fcport, FXDISC_GET_PORT_INFO); in qla2x00_probe_one()
3500 &base_vha->hw->mr.fcport, FXDISC_REG_HOST_INFO); in qla2x00_probe_one()
3945 fc_port_t *fcport, *tfcport; in qla2x00_free_fcports() local
3947 list_for_each_entry_safe(fcport, tfcport, &vha->vp_fcports, list) in qla2x00_free_fcports()
3948 qla2x00_free_fcport(fcport); in qla2x00_free_fcports()
3952 qla2x00_schedule_rport_del(struct scsi_qla_host *vha, fc_port_t *fcport) in qla2x00_schedule_rport_del() argument
3956 if (!fcport->rport) in qla2x00_schedule_rport_del()
3959 if (fcport->rport) { in qla2x00_schedule_rport_del()
3960 ql_dbg(ql_dbg_disc, fcport->vha, 0x2109, in qla2x00_schedule_rport_del()
3962 __func__, fcport->port_name, fcport->rport, in qla2x00_schedule_rport_del()
3963 fcport->rport->roles); in qla2x00_schedule_rport_del()
3964 fc_remote_port_delete(fcport->rport); in qla2x00_schedule_rport_del()
3978 void qla2x00_mark_device_lost(scsi_qla_host_t *vha, fc_port_t *fcport, in qla2x00_mark_device_lost() argument
3982 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); in qla2x00_mark_device_lost()
3983 qla2x00_schedule_rport_del(vha, fcport); in qla2x00_mark_device_lost()
3987 if (atomic_read(&fcport->state) == FCS_ONLINE && in qla2x00_mark_device_lost()
3988 vha->vp_idx == fcport->vha->vp_idx) { in qla2x00_mark_device_lost()
3989 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); in qla2x00_mark_device_lost()
3990 qla2x00_schedule_rport_del(vha, fcport); in qla2x00_mark_device_lost()
3997 if (atomic_read(&fcport->state) != FCS_DEVICE_DEAD) in qla2x00_mark_device_lost()
3998 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); in qla2x00_mark_device_lost()
4009 fc_port_t *fcport; in qla2x00_mark_all_devices_lost() local
4014 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qla2x00_mark_all_devices_lost()
4015 if (fcport->loop_id != FC_NO_LOOP_ID && in qla2x00_mark_all_devices_lost()
4016 (fcport->flags & FCF_FCP2_DEVICE) && in qla2x00_mark_all_devices_lost()
4017 fcport->port_type == FCT_TARGET && in qla2x00_mark_all_devices_lost()
4021 fcport->flags, fcport->port_type, in qla2x00_mark_all_devices_lost()
4022 fcport->d_id.b24, fcport->port_name); in qla2x00_mark_all_devices_lost()
4025 fcport->scan_state = 0; in qla2x00_mark_all_devices_lost()
4026 qlt_schedule_sess_for_deletion(fcport); in qla2x00_mark_all_devices_lost()
5081 fc_port_t *fcport, uint16_t *data) \
5089 e->u.logio.fcport = fcport; \
5094 fcport->flags |= FCF_ASYNC_ACTIVE; \
5151 void qla24xx_sched_upd_fcport(fc_port_t *fcport) in qla24xx_sched_upd_fcport() argument
5155 if (IS_SW_RESV_ADDR(fcport->d_id)) in qla24xx_sched_upd_fcport()
5158 spin_lock_irqsave(&fcport->vha->work_lock, flags); in qla24xx_sched_upd_fcport()
5159 if (fcport->disc_state == DSC_UPD_FCPORT) { in qla24xx_sched_upd_fcport()
5160 spin_unlock_irqrestore(&fcport->vha->work_lock, flags); in qla24xx_sched_upd_fcport()
5163 fcport->jiffies_at_registration = jiffies; in qla24xx_sched_upd_fcport()
5164 fcport->sec_since_registration = 0; in qla24xx_sched_upd_fcport()
5165 fcport->next_disc_state = DSC_DELETED; in qla24xx_sched_upd_fcport()
5166 qla2x00_set_fcport_disc_state(fcport, DSC_UPD_FCPORT); in qla24xx_sched_upd_fcport()
5167 spin_unlock_irqrestore(&fcport->vha->work_lock, flags); in qla24xx_sched_upd_fcport()
5169 queue_work(system_unbound_wq, &fcport->reg_work); in qla24xx_sched_upd_fcport()
5176 fc_port_t *fcport = NULL, *tfcp; in qla24xx_create_new_sess() local
5186 fcport = qla2x00_find_fcport_by_wwpn(vha, e->u.new_sess.port_name, 1); in qla24xx_create_new_sess()
5187 if (fcport) { in qla24xx_create_new_sess()
5188 fcport->d_id = e->u.new_sess.id; in qla24xx_create_new_sess()
5190 fcport->fw_login_state = DSC_LS_PLOGI_PEND; in qla24xx_create_new_sess()
5191 memcpy(fcport->node_name, in qla24xx_create_new_sess()
5194 qlt_plogi_ack_link(vha, pla, fcport, QLT_PLOGI_LINK_SAME_WWN); in qla24xx_create_new_sess()
5202 fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); in qla24xx_create_new_sess()
5203 if (fcport) { in qla24xx_create_new_sess()
5204 fcport->d_id = e->u.new_sess.id; in qla24xx_create_new_sess()
5205 fcport->flags |= FCF_FABRIC_DEVICE; in qla24xx_create_new_sess()
5206 fcport->fw_login_state = DSC_LS_PLOGI_PEND; in qla24xx_create_new_sess()
5207 fcport->tgt_short_link_down_cnt = 0; in qla24xx_create_new_sess()
5209 memcpy(fcport->port_name, e->u.new_sess.port_name, in qla24xx_create_new_sess()
5212 fcport->fc4_type = e->u.new_sess.fc4_type; in qla24xx_create_new_sess()
5213 if (NVME_PRIORITY(vha->hw, fcport)) in qla24xx_create_new_sess()
5214 fcport->do_prli_nvme = 1; in qla24xx_create_new_sess()
5216 fcport->do_prli_nvme = 0; in qla24xx_create_new_sess()
5219 fcport->dm_login_expire = jiffies + in qla24xx_create_new_sess()
5221 fcport->fc4_type = FS_FC4TYPE_FCP; in qla24xx_create_new_sess()
5222 fcport->n2n_flag = 1; in qla24xx_create_new_sess()
5224 fcport->fc4_type |= FS_FC4TYPE_NVME; in qla24xx_create_new_sess()
5252 list_add_tail(&fcport->list, &vha->vp_fcports); in qla24xx_create_new_sess()
5256 qlt_plogi_ack_link(vha, pla, fcport, in qla24xx_create_new_sess()
5263 if (fcport) { in qla24xx_create_new_sess()
5264 fcport->id_changed = 1; in qla24xx_create_new_sess()
5265 fcport->scan_state = QLA_FCPORT_FOUND; in qla24xx_create_new_sess()
5266 fcport->chip_reset = vha->hw->base_qpair->chip_reset; in qla24xx_create_new_sess()
5267 memcpy(fcport->node_name, e->u.new_sess.node_name, WWN_SIZE); in qla24xx_create_new_sess()
5273 fcport->fw_login_state = DSC_LS_PRLI_PEND; in qla24xx_create_new_sess()
5274 fcport->local = 0; in qla24xx_create_new_sess()
5275 fcport->loop_id = in qla24xx_create_new_sess()
5278 fcport->fw_login_state = DSC_LS_PRLI_PEND; in qla24xx_create_new_sess()
5284 fcport->conf_compl_supported = 1; in qla24xx_create_new_sess()
5287 fcport->port_type = FCT_INITIATOR; in qla24xx_create_new_sess()
5289 fcport->port_type = FCT_TARGET; in qla24xx_create_new_sess()
5298 if (tfcp && (tfcp != fcport)) { in qla24xx_create_new_sess()
5311 fcport->login_pause = 1; in qla24xx_create_new_sess()
5312 tfcp->conflict = fcport; in qla24xx_create_new_sess()
5315 fcport->login_pause = 1; in qla24xx_create_new_sess()
5316 tfcp->conflict = fcport; in qla24xx_create_new_sess()
5326 fcport->flags &= ~FCF_FABRIC_DEVICE; in qla24xx_create_new_sess()
5327 fcport->keep_nport_handle = 1; in qla24xx_create_new_sess()
5329 fcport->fc4_type = in qla24xx_create_new_sess()
5331 fcport->n2n_flag = 1; in qla24xx_create_new_sess()
5333 fcport->fw_login_state = 0; in qla24xx_create_new_sess()
5337 qla24xx_fcport_handle_login(vha, fcport); in qla24xx_create_new_sess()
5343 qla2x00_free_fcport(fcport); in qla24xx_create_new_sess()
5388 qla2x00_async_login(vha, e->u.logio.fcport, in qla2x00_do_work()
5392 rc = qla2x00_async_logout(vha, e->u.logio.fcport); in qla2x00_do_work()
5395 qla2x00_async_adisc(vha, e->u.logio.fcport, in qla2x00_do_work()
5417 qla24xx_async_gpdb(vha, e->u.fcport.fcport, in qla2x00_do_work()
5418 e->u.fcport.opt); in qla2x00_do_work()
5421 qla24xx_async_prli(vha, e->u.fcport.fcport); in qla2x00_do_work()
5424 qla24xx_async_gpsc(vha, e->u.fcport.fcport); in qla2x00_do_work()
5427 qla24xx_async_gnl(vha, e->u.fcport.fcport); in qla2x00_do_work()
5433 rc = qla2x00_async_prlo(vha, e->u.logio.fcport); in qla2x00_do_work()
5436 qla2x00_async_prlo_done(vha, e->u.logio.fcport, in qla2x00_do_work()
5450 qla24xx_async_gnnid(vha, e->u.fcport.fcport); in qla2x00_do_work()
5453 qla24xx_async_gfpnid(vha, e->u.fcport.fcport); in qla2x00_do_work()
5459 qla_do_iidma_work(vha, e->u.fcport.fcport); in qla2x00_do_work()
5463 e->u.fcport.fcport, false); in qla2x00_do_work()
5505 fc_port_t *fcport; in qla2x00_relogin() local
5509 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qla2x00_relogin()
5514 if (atomic_read(&fcport->state) != FCS_ONLINE && in qla2x00_relogin()
5515 fcport->login_retry) { in qla2x00_relogin()
5516 if (fcport->scan_state != QLA_FCPORT_FOUND || in qla2x00_relogin()
5517 fcport->disc_state == DSC_LOGIN_AUTH_PEND || in qla2x00_relogin()
5518 fcport->disc_state == DSC_LOGIN_COMPLETE) in qla2x00_relogin()
5521 if (fcport->flags & (FCF_ASYNC_SENT|FCF_ASYNC_ACTIVE) || in qla2x00_relogin()
5522 fcport->disc_state == DSC_DELETE_PEND) { in qla2x00_relogin()
5527 ea.fcport = fcport; in qla2x00_relogin()
5531 fcport->login_retry--; in qla2x00_relogin()
5534 fcport); in qla2x00_relogin()
5536 fcport->old_loop_id = in qla2x00_relogin()
5537 fcport->loop_id; in qla2x00_relogin()
5540 fcport->loop_id); in qla2x00_relogin()
5542 (vha, fcport); in qla2x00_relogin()
5549 fcport->login_retry, in qla2x00_relogin()
5550 fcport->loop_id); in qla2x00_relogin()
5552 fcport->login_retry = 0; in qla2x00_relogin()
5555 if (fcport->login_retry == 0 && in qla2x00_relogin()
5557 qla2x00_clear_loop_id(fcport); in qla2x00_relogin()
6899 &base_vha->hw->mr.fcport, in qla2x00_do_dpc()
7236 fc_port_t *fcport = NULL; in qla2x00_timer() local
7272 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qla2x00_timer()
7273 if (fcport->tgt_link_down_time < QLA2XX_MAX_LINK_DOWN_TIME) in qla2x00_timer()
7274 fcport->tgt_link_down_time++; in qla2x00_timer()
7314 sfcp = sp->fcport; in qla2x00_timer()
7560 fc_port_t *fcport; in qla_pci_error_cleanup() local
7600 list_for_each_entry(fcport, &vha->vp_fcports, list) in qla_pci_error_cleanup()
7601 fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); in qla_pci_error_cleanup()
7607 list_for_each_entry(fcport, &vp->vp_fcports, list) in qla_pci_error_cleanup()
7608 fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); in qla_pci_error_cleanup()