Lines Matching refs:fcport

766 	struct qla_hw_data *ha = sp->fcport->vha->hw;  in qla2xxx_qpair_sp_free_dma()
819 ql_dbg(ql_dbg_io, sp->fcport->vha, 0x3079, in qla2xxx_qpair_sp_compl()
840 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; in qla2xxx_queuecommand() local
900 if (!fcport) { in qla2xxx_queuecommand()
905 if (atomic_read(&fcport->state) != FCS_ONLINE) { in qla2xxx_queuecommand()
906 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD || in qla2xxx_queuecommand()
910 atomic_read(&fcport->state), in qla2xxx_queuecommand()
922 if (fcport->retry_delay_timestamp == 0) { in qla2xxx_queuecommand()
924 } else if (time_after(jiffies, fcport->retry_delay_timestamp)) in qla2xxx_queuecommand()
925 fcport->retry_delay_timestamp = 0; in qla2xxx_queuecommand()
929 sp = qla2x00_get_sp(vha, fcport, GFP_ATOMIC); in qla2xxx_queuecommand()
970 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; in qla2xxx_mqueuecommand() local
986 if (!fcport) { in qla2xxx_mqueuecommand()
991 if (atomic_read(&fcport->state) != FCS_ONLINE) { in qla2xxx_mqueuecommand()
992 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD || in qla2xxx_mqueuecommand()
996 atomic_read(&fcport->state), in qla2xxx_mqueuecommand()
1008 if (fcport->retry_delay_timestamp == 0) { in qla2xxx_mqueuecommand()
1010 } else if (time_after(jiffies, fcport->retry_delay_timestamp)) in qla2xxx_mqueuecommand()
1011 fcport->retry_delay_timestamp = 0; in qla2xxx_mqueuecommand()
1015 sp = qla2xxx_get_qpair_sp(qpair, fcport, GFP_ATOMIC); in qla2xxx_mqueuecommand()
1409 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; in __qla2xxx_eh_generic_reset() local
1412 if (!fcport) { in __qla2xxx_eh_generic_reset()
1431 if (do_reset(fcport, cmd->device->lun, cmd->request->cpu + 1) in __qla2xxx_eh_generic_reset()
1510 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; in qla2xxx_eh_bus_reset() local
1525 if (!fcport) { in qla2xxx_eh_bus_reset()
1667 struct fc_port *fcport; in qla2x00_loop_reset() local
1675 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qla2x00_loop_reset()
1676 if (fcport->port_type != FCT_TARGET) in qla2x00_loop_reset()
1679 ret = ha->isp_ops->target_reset(fcport, 0, 0); in qla2x00_loop_reset()
1683 "d_id=%x.\n", ret, fcport->d_id.b24); in qla2x00_loop_reset()
3059 ha->mr.fcport.vha = base_vha; in qla2x00_probe_one()
3060 ha->mr.fcport.port_type = FCT_UNKNOWN; in qla2x00_probe_one()
3061 ha->mr.fcport.loop_id = FC_NO_LOOP_ID; in qla2x00_probe_one()
3062 qla2x00_set_fcport_state(&ha->mr.fcport, FCS_UNCONFIGURED); in qla2x00_probe_one()
3063 ha->mr.fcport.supported_classes = FC_COS_UNSPECIFIED; in qla2x00_probe_one()
3064 ha->mr.fcport.scan_state = 1; in qla2x00_probe_one()
3334 &base_vha->hw->mr.fcport, FXDISC_GET_CONFIG_INFO); in qla2x00_probe_one()
3361 &base_vha->hw->mr.fcport, FXDISC_GET_PORT_INFO); in qla2x00_probe_one()
3365 &base_vha->hw->mr.fcport, FXDISC_REG_HOST_INFO); in qla2x00_probe_one()
3761 fc_port_t *fcport, *tfcport; in qla2x00_free_fcports() local
3763 list_for_each_entry_safe(fcport, tfcport, &vha->vp_fcports, list) { in qla2x00_free_fcports()
3764 list_del(&fcport->list); in qla2x00_free_fcports()
3765 qla2x00_clear_loop_id(fcport); in qla2x00_free_fcports()
3766 kfree(fcport); in qla2x00_free_fcports()
3771 qla2x00_schedule_rport_del(struct scsi_qla_host *vha, fc_port_t *fcport, in qla2x00_schedule_rport_del() argument
3778 if (!fcport->rport) in qla2x00_schedule_rport_del()
3781 rport = fcport->rport; in qla2x00_schedule_rport_del()
3785 fcport->drport = rport; in qla2x00_schedule_rport_del()
3793 ql_dbg(ql_dbg_disc, fcport->vha, 0x2109, in qla2x00_schedule_rport_del()
3795 __func__, fcport->port_name, rport, in qla2x00_schedule_rport_del()
3812 void qla2x00_mark_device_lost(scsi_qla_host_t *vha, fc_port_t *fcport, in qla2x00_mark_device_lost() argument
3816 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); in qla2x00_mark_device_lost()
3817 qla2x00_schedule_rport_del(vha, fcport, defer); in qla2x00_mark_device_lost()
3821 if (atomic_read(&fcport->state) == FCS_ONLINE && in qla2x00_mark_device_lost()
3822 vha->vp_idx == fcport->vha->vp_idx) { in qla2x00_mark_device_lost()
3823 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); in qla2x00_mark_device_lost()
3824 qla2x00_schedule_rport_del(vha, fcport, defer); in qla2x00_mark_device_lost()
3830 if (atomic_read(&fcport->state) != FCS_DEVICE_DEAD) in qla2x00_mark_device_lost()
3831 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); in qla2x00_mark_device_lost()
3855 fc_port_t *fcport; in qla2x00_mark_all_devices_lost() local
3860 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qla2x00_mark_all_devices_lost()
3861 fcport->scan_state = 0; in qla2x00_mark_all_devices_lost()
3862 qlt_schedule_sess_for_deletion(fcport); in qla2x00_mark_all_devices_lost()
3864 if (vha->vp_idx != 0 && vha->vp_idx != fcport->vha->vp_idx) in qla2x00_mark_all_devices_lost()
3871 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD) in qla2x00_mark_all_devices_lost()
3873 if (atomic_read(&fcport->state) == FCS_ONLINE) { in qla2x00_mark_all_devices_lost()
3874 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); in qla2x00_mark_all_devices_lost()
3876 qla2x00_schedule_rport_del(vha, fcport, defer); in qla2x00_mark_all_devices_lost()
3877 else if (vha->vp_idx == fcport->vha->vp_idx) in qla2x00_mark_all_devices_lost()
3878 qla2x00_schedule_rport_del(vha, fcport, defer); in qla2x00_mark_all_devices_lost()
4692 fc_port_t *fcport, uint16_t *data) \
4700 e->u.logio.fcport = fcport; \
4705 fcport->flags |= FCF_ASYNC_ACTIVE; \
4764 int qla24xx_post_upd_fcport_work(struct scsi_qla_host *vha, fc_port_t *fcport) in qla24xx_post_upd_fcport_work() argument
4772 e->u.fcport.fcport = fcport; in qla24xx_post_upd_fcport_work()
4780 fc_port_t *fcport = NULL, *tfcp; in qla24xx_create_new_sess() local
4790 fcport = qla2x00_find_fcport_by_wwpn(vha, e->u.new_sess.port_name, 1); in qla24xx_create_new_sess()
4791 if (fcport) { in qla24xx_create_new_sess()
4792 fcport->d_id = e->u.new_sess.id; in qla24xx_create_new_sess()
4794 fcport->fw_login_state = DSC_LS_PLOGI_PEND; in qla24xx_create_new_sess()
4795 memcpy(fcport->node_name, in qla24xx_create_new_sess()
4798 qlt_plogi_ack_link(vha, pla, fcport, QLT_PLOGI_LINK_SAME_WWN); in qla24xx_create_new_sess()
4806 fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); in qla24xx_create_new_sess()
4807 if (fcport) { in qla24xx_create_new_sess()
4808 fcport->d_id = e->u.new_sess.id; in qla24xx_create_new_sess()
4809 fcport->flags |= FCF_FABRIC_DEVICE; in qla24xx_create_new_sess()
4810 fcport->fw_login_state = DSC_LS_PLOGI_PEND; in qla24xx_create_new_sess()
4812 fcport->fc4_type = FC4_TYPE_FCP_SCSI; in qla24xx_create_new_sess()
4815 fcport->fc4_type = FC4_TYPE_OTHER; in qla24xx_create_new_sess()
4816 fcport->fc4f_nvme = FC4_TYPE_NVME; in qla24xx_create_new_sess()
4819 memcpy(fcport->port_name, e->u.new_sess.port_name, in qla24xx_create_new_sess()
4844 list_add_tail(&fcport->list, &vha->vp_fcports); in qla24xx_create_new_sess()
4848 qlt_plogi_ack_link(vha, pla, fcport, in qla24xx_create_new_sess()
4855 if (fcport) { in qla24xx_create_new_sess()
4856 fcport->id_changed = 1; in qla24xx_create_new_sess()
4857 fcport->scan_state = QLA_FCPORT_FOUND; in qla24xx_create_new_sess()
4858 memcpy(fcport->node_name, e->u.new_sess.node_name, WWN_SIZE); in qla24xx_create_new_sess()
4864 fcport->fw_login_state = DSC_LS_PRLI_PEND; in qla24xx_create_new_sess()
4865 fcport->local = 0; in qla24xx_create_new_sess()
4866 fcport->loop_id = in qla24xx_create_new_sess()
4869 fcport->fw_login_state = DSC_LS_PRLI_PEND; in qla24xx_create_new_sess()
4875 fcport->conf_compl_supported = 1; in qla24xx_create_new_sess()
4878 fcport->port_type = FCT_INITIATOR; in qla24xx_create_new_sess()
4880 fcport->port_type = FCT_TARGET; in qla24xx_create_new_sess()
4889 if (tfcp && (tfcp != fcport)) { in qla24xx_create_new_sess()
4902 fcport->login_pause = 1; in qla24xx_create_new_sess()
4903 tfcp->conflict = fcport; in qla24xx_create_new_sess()
4906 fcport->login_pause = 1; in qla24xx_create_new_sess()
4907 tfcp->conflict = fcport; in qla24xx_create_new_sess()
4918 fcport->flags &= ~FCF_FABRIC_DEVICE; in qla24xx_create_new_sess()
4922 fcport->fc4f_nvme = 1; in qla24xx_create_new_sess()
4923 fcport->n2n_flag = 1; in qla24xx_create_new_sess()
4925 fcport->fw_login_state = 0; in qla24xx_create_new_sess()
4930 qla24xx_fcport_handle_login(vha, fcport); in qla24xx_create_new_sess()
4936 qla2x00_free_fcport(fcport); in qla24xx_create_new_sess()
4979 qla2x00_async_login(vha, e->u.logio.fcport, in qla2x00_do_work()
4983 qla2x00_async_logout(vha, e->u.logio.fcport); in qla2x00_do_work()
4986 qla2x00_async_logout_done(vha, e->u.logio.fcport, in qla2x00_do_work()
4990 qla2x00_async_adisc(vha, e->u.logio.fcport, in qla2x00_do_work()
4994 qla2x00_async_adisc_done(vha, e->u.logio.fcport, in qla2x00_do_work()
5004 qla24xx_async_gidpn(vha, e->u.fcport.fcport); in qla2x00_do_work()
5019 qla24xx_async_gpdb(vha, e->u.fcport.fcport, in qla2x00_do_work()
5020 e->u.fcport.opt); in qla2x00_do_work()
5023 qla24xx_async_prli(vha, e->u.fcport.fcport); in qla2x00_do_work()
5026 qla24xx_async_gpsc(vha, e->u.fcport.fcport); in qla2x00_do_work()
5029 qla2x00_update_fcport(vha, e->u.fcport.fcport); in qla2x00_do_work()
5032 qla24xx_async_gnl(vha, e->u.fcport.fcport); in qla2x00_do_work()
5038 qla2x00_async_prlo(vha, e->u.logio.fcport); in qla2x00_do_work()
5041 qla2x00_async_prlo_done(vha, e->u.logio.fcport, in qla2x00_do_work()
5055 qla24xx_async_gnnid(vha, e->u.fcport.fcport); in qla2x00_do_work()
5058 qla24xx_async_gfpnid(vha, e->u.fcport.fcport); in qla2x00_do_work()
5064 qla_do_iidma_work(vha, e->u.fcport.fcport); in qla2x00_do_work()
5068 e->u.fcport.fcport, false); in qla2x00_do_work()
5098 fc_port_t *fcport; in qla2x00_relogin() local
5102 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qla2x00_relogin()
5107 if (atomic_read(&fcport->state) != FCS_ONLINE && in qla2x00_relogin()
5108 fcport->login_retry) { in qla2x00_relogin()
5109 if (fcport->scan_state != QLA_FCPORT_FOUND || in qla2x00_relogin()
5110 fcport->disc_state == DSC_LOGIN_COMPLETE) in qla2x00_relogin()
5113 if (fcport->flags & (FCF_ASYNC_SENT|FCF_ASYNC_ACTIVE) || in qla2x00_relogin()
5114 fcport->disc_state == DSC_DELETE_PEND) { in qla2x00_relogin()
5120 ea.fcport = fcport; in qla2x00_relogin()
5124 fcport->login_retry--; in qla2x00_relogin()
5127 fcport); in qla2x00_relogin()
5129 fcport->old_loop_id = in qla2x00_relogin()
5130 fcport->loop_id; in qla2x00_relogin()
5133 fcport->loop_id); in qla2x00_relogin()
5135 (vha, fcport); in qla2x00_relogin()
5142 fcport->login_retry, in qla2x00_relogin()
5143 fcport->loop_id); in qla2x00_relogin()
5145 fcport->login_retry = 0; in qla2x00_relogin()
5148 if (fcport->login_retry == 0 && in qla2x00_relogin()
5150 qla2x00_clear_loop_id(fcport); in qla2x00_relogin()
6026 &base_vha->hw->mr.fcport, in qla2x00_do_dpc()
6347 sfcp = sp->fcport; in qla2x00_timer()