Lines Matching refs:fcport
732 struct qla_hw_data *ha = sp->fcport->vha->hw; in qla2xxx_qpair_sp_free_dma()
824 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; in qla2xxx_queuecommand() local
882 if (!fcport) { in qla2xxx_queuecommand()
887 if (atomic_read(&fcport->state) != FCS_ONLINE || fcport->deleted) { in qla2xxx_queuecommand()
888 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD || in qla2xxx_queuecommand()
892 atomic_read(&fcport->state), in qla2xxx_queuecommand()
904 if (fcport->retry_delay_timestamp == 0) { in qla2xxx_queuecommand()
906 } else if (time_after(jiffies, fcport->retry_delay_timestamp)) in qla2xxx_queuecommand()
907 fcport->retry_delay_timestamp = 0; in qla2xxx_queuecommand()
912 qla2xxx_init_sp(sp, vha, vha->hw->base_qpair, fcport); in qla2xxx_queuecommand()
948 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; in qla2xxx_mqueuecommand() local
964 if (!fcport) { in qla2xxx_mqueuecommand()
969 if (atomic_read(&fcport->state) != FCS_ONLINE || fcport->deleted) { in qla2xxx_mqueuecommand()
970 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD || in qla2xxx_mqueuecommand()
974 atomic_read(&fcport->state), in qla2xxx_mqueuecommand()
986 if (fcport->retry_delay_timestamp == 0) { in qla2xxx_mqueuecommand()
988 } else if (time_after(jiffies, fcport->retry_delay_timestamp)) in qla2xxx_mqueuecommand()
989 fcport->retry_delay_timestamp = 0; in qla2xxx_mqueuecommand()
994 qla2xxx_init_sp(sp, vha, qpair, fcport); in qla2xxx_mqueuecommand()
1267 if ((sp->fcport && sp->fcport->deleted) || !qpair) in qla2xxx_eh_abort()
1385 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; in __qla2xxx_eh_generic_reset() local
1388 if (!fcport) { in __qla2xxx_eh_generic_reset()
1396 if (fcport->deleted) in __qla2xxx_eh_generic_reset()
1410 if (do_reset(fcport, cmd->device->lun, 1) in __qla2xxx_eh_generic_reset()
1489 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; in qla2xxx_eh_bus_reset() local
1504 if (!fcport) { in qla2xxx_eh_bus_reset()
3115 ha->mr.fcport.vha = base_vha; in qla2x00_probe_one()
3116 ha->mr.fcport.port_type = FCT_UNKNOWN; in qla2x00_probe_one()
3117 ha->mr.fcport.loop_id = FC_NO_LOOP_ID; in qla2x00_probe_one()
3118 qla2x00_set_fcport_state(&ha->mr.fcport, FCS_UNCONFIGURED); in qla2x00_probe_one()
3119 ha->mr.fcport.supported_classes = FC_COS_UNSPECIFIED; in qla2x00_probe_one()
3120 ha->mr.fcport.scan_state = 1; in qla2x00_probe_one()
3396 &base_vha->hw->mr.fcport, FXDISC_GET_CONFIG_INFO); in qla2x00_probe_one()
3423 &base_vha->hw->mr.fcport, FXDISC_GET_PORT_INFO); in qla2x00_probe_one()
3427 &base_vha->hw->mr.fcport, FXDISC_REG_HOST_INFO); in qla2x00_probe_one()
3865 fc_port_t *fcport, *tfcport; in qla2x00_free_fcports() local
3867 list_for_each_entry_safe(fcport, tfcport, &vha->vp_fcports, list) in qla2x00_free_fcports()
3868 qla2x00_free_fcport(fcport); in qla2x00_free_fcports()
3872 qla2x00_schedule_rport_del(struct scsi_qla_host *vha, fc_port_t *fcport) in qla2x00_schedule_rport_del() argument
3876 if (!fcport->rport) in qla2x00_schedule_rport_del()
3879 if (fcport->rport) { in qla2x00_schedule_rport_del()
3880 ql_dbg(ql_dbg_disc, fcport->vha, 0x2109, in qla2x00_schedule_rport_del()
3882 __func__, fcport->port_name, fcport->rport, in qla2x00_schedule_rport_del()
3883 fcport->rport->roles); in qla2x00_schedule_rport_del()
3884 fc_remote_port_delete(fcport->rport); in qla2x00_schedule_rport_del()
3898 void qla2x00_mark_device_lost(scsi_qla_host_t *vha, fc_port_t *fcport, in qla2x00_mark_device_lost() argument
3902 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); in qla2x00_mark_device_lost()
3903 qla2x00_schedule_rport_del(vha, fcport); in qla2x00_mark_device_lost()
3907 if (atomic_read(&fcport->state) == FCS_ONLINE && in qla2x00_mark_device_lost()
3908 vha->vp_idx == fcport->vha->vp_idx) { in qla2x00_mark_device_lost()
3909 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); in qla2x00_mark_device_lost()
3910 qla2x00_schedule_rport_del(vha, fcport); in qla2x00_mark_device_lost()
3916 if (atomic_read(&fcport->state) != FCS_DEVICE_DEAD) in qla2x00_mark_device_lost()
3917 qla2x00_set_fcport_state(fcport, FCS_DEVICE_LOST); in qla2x00_mark_device_lost()
3928 fc_port_t *fcport; in qla2x00_mark_all_devices_lost() local
3933 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qla2x00_mark_all_devices_lost()
3934 if (fcport->loop_id != FC_NO_LOOP_ID && in qla2x00_mark_all_devices_lost()
3935 (fcport->flags & FCF_FCP2_DEVICE) && in qla2x00_mark_all_devices_lost()
3936 fcport->port_type == FCT_TARGET && in qla2x00_mark_all_devices_lost()
3940 fcport->flags, fcport->port_type, in qla2x00_mark_all_devices_lost()
3941 fcport->d_id.b24, fcport->port_name); in qla2x00_mark_all_devices_lost()
3944 fcport->scan_state = 0; in qla2x00_mark_all_devices_lost()
3945 qlt_schedule_sess_for_deletion(fcport); in qla2x00_mark_all_devices_lost()
4954 fc_port_t *fcport, uint16_t *data) \
4962 e->u.logio.fcport = fcport; \
4967 fcport->flags |= FCF_ASYNC_ACTIVE; \
5024 void qla24xx_sched_upd_fcport(fc_port_t *fcport) in qla24xx_sched_upd_fcport() argument
5028 if (IS_SW_RESV_ADDR(fcport->d_id)) in qla24xx_sched_upd_fcport()
5031 spin_lock_irqsave(&fcport->vha->work_lock, flags); in qla24xx_sched_upd_fcport()
5032 if (fcport->disc_state == DSC_UPD_FCPORT) { in qla24xx_sched_upd_fcport()
5033 spin_unlock_irqrestore(&fcport->vha->work_lock, flags); in qla24xx_sched_upd_fcport()
5036 fcport->jiffies_at_registration = jiffies; in qla24xx_sched_upd_fcport()
5037 fcport->sec_since_registration = 0; in qla24xx_sched_upd_fcport()
5038 fcport->next_disc_state = DSC_DELETED; in qla24xx_sched_upd_fcport()
5039 qla2x00_set_fcport_disc_state(fcport, DSC_UPD_FCPORT); in qla24xx_sched_upd_fcport()
5040 spin_unlock_irqrestore(&fcport->vha->work_lock, flags); in qla24xx_sched_upd_fcport()
5042 queue_work(system_unbound_wq, &fcport->reg_work); in qla24xx_sched_upd_fcport()
5049 fc_port_t *fcport = NULL, *tfcp; in qla24xx_create_new_sess() local
5059 fcport = qla2x00_find_fcport_by_wwpn(vha, e->u.new_sess.port_name, 1); in qla24xx_create_new_sess()
5060 if (fcport) { in qla24xx_create_new_sess()
5061 fcport->d_id = e->u.new_sess.id; in qla24xx_create_new_sess()
5063 fcport->fw_login_state = DSC_LS_PLOGI_PEND; in qla24xx_create_new_sess()
5064 memcpy(fcport->node_name, in qla24xx_create_new_sess()
5067 qlt_plogi_ack_link(vha, pla, fcport, QLT_PLOGI_LINK_SAME_WWN); in qla24xx_create_new_sess()
5075 fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); in qla24xx_create_new_sess()
5076 if (fcport) { in qla24xx_create_new_sess()
5077 fcport->d_id = e->u.new_sess.id; in qla24xx_create_new_sess()
5078 fcport->flags |= FCF_FABRIC_DEVICE; in qla24xx_create_new_sess()
5079 fcport->fw_login_state = DSC_LS_PLOGI_PEND; in qla24xx_create_new_sess()
5081 memcpy(fcport->port_name, e->u.new_sess.port_name, in qla24xx_create_new_sess()
5084 fcport->fc4_type = e->u.new_sess.fc4_type; in qla24xx_create_new_sess()
5086 fcport->dm_login_expire = jiffies + in qla24xx_create_new_sess()
5088 fcport->fc4_type = FS_FC4TYPE_FCP; in qla24xx_create_new_sess()
5089 fcport->n2n_flag = 1; in qla24xx_create_new_sess()
5091 fcport->fc4_type |= FS_FC4TYPE_NVME; in qla24xx_create_new_sess()
5119 list_add_tail(&fcport->list, &vha->vp_fcports); in qla24xx_create_new_sess()
5123 qlt_plogi_ack_link(vha, pla, fcport, in qla24xx_create_new_sess()
5130 if (fcport) { in qla24xx_create_new_sess()
5131 fcport->id_changed = 1; in qla24xx_create_new_sess()
5132 fcport->scan_state = QLA_FCPORT_FOUND; in qla24xx_create_new_sess()
5133 fcport->chip_reset = vha->hw->base_qpair->chip_reset; in qla24xx_create_new_sess()
5134 memcpy(fcport->node_name, e->u.new_sess.node_name, WWN_SIZE); in qla24xx_create_new_sess()
5140 fcport->fw_login_state = DSC_LS_PRLI_PEND; in qla24xx_create_new_sess()
5141 fcport->local = 0; in qla24xx_create_new_sess()
5142 fcport->loop_id = in qla24xx_create_new_sess()
5145 fcport->fw_login_state = DSC_LS_PRLI_PEND; in qla24xx_create_new_sess()
5151 fcport->conf_compl_supported = 1; in qla24xx_create_new_sess()
5154 fcport->port_type = FCT_INITIATOR; in qla24xx_create_new_sess()
5156 fcport->port_type = FCT_TARGET; in qla24xx_create_new_sess()
5165 if (tfcp && (tfcp != fcport)) { in qla24xx_create_new_sess()
5178 fcport->login_pause = 1; in qla24xx_create_new_sess()
5179 tfcp->conflict = fcport; in qla24xx_create_new_sess()
5182 fcport->login_pause = 1; in qla24xx_create_new_sess()
5183 tfcp->conflict = fcport; in qla24xx_create_new_sess()
5193 fcport->flags &= ~FCF_FABRIC_DEVICE; in qla24xx_create_new_sess()
5194 fcport->keep_nport_handle = 1; in qla24xx_create_new_sess()
5196 fcport->fc4_type = in qla24xx_create_new_sess()
5198 fcport->n2n_flag = 1; in qla24xx_create_new_sess()
5200 fcport->fw_login_state = 0; in qla24xx_create_new_sess()
5204 qla24xx_fcport_handle_login(vha, fcport); in qla24xx_create_new_sess()
5210 qla2x00_free_fcport(fcport); in qla24xx_create_new_sess()
5255 qla2x00_async_login(vha, e->u.logio.fcport, in qla2x00_do_work()
5259 rc = qla2x00_async_logout(vha, e->u.logio.fcport); in qla2x00_do_work()
5262 qla2x00_async_adisc(vha, e->u.logio.fcport, in qla2x00_do_work()
5284 qla24xx_async_gpdb(vha, e->u.fcport.fcport, in qla2x00_do_work()
5285 e->u.fcport.opt); in qla2x00_do_work()
5288 qla24xx_async_prli(vha, e->u.fcport.fcport); in qla2x00_do_work()
5291 qla24xx_async_gpsc(vha, e->u.fcport.fcport); in qla2x00_do_work()
5294 qla24xx_async_gnl(vha, e->u.fcport.fcport); in qla2x00_do_work()
5300 rc = qla2x00_async_prlo(vha, e->u.logio.fcport); in qla2x00_do_work()
5303 qla2x00_async_prlo_done(vha, e->u.logio.fcport, in qla2x00_do_work()
5317 qla24xx_async_gnnid(vha, e->u.fcport.fcport); in qla2x00_do_work()
5320 qla24xx_async_gfpnid(vha, e->u.fcport.fcport); in qla2x00_do_work()
5326 qla_do_iidma_work(vha, e->u.fcport.fcport); in qla2x00_do_work()
5330 e->u.fcport.fcport, false); in qla2x00_do_work()
5369 fc_port_t *fcport; in qla2x00_relogin() local
5373 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qla2x00_relogin()
5378 if (atomic_read(&fcport->state) != FCS_ONLINE && in qla2x00_relogin()
5379 fcport->login_retry) { in qla2x00_relogin()
5380 if (fcport->scan_state != QLA_FCPORT_FOUND || in qla2x00_relogin()
5381 fcport->disc_state == DSC_LOGIN_COMPLETE) in qla2x00_relogin()
5384 if (fcport->flags & (FCF_ASYNC_SENT|FCF_ASYNC_ACTIVE) || in qla2x00_relogin()
5385 fcport->disc_state == DSC_DELETE_PEND) { in qla2x00_relogin()
5390 ea.fcport = fcport; in qla2x00_relogin()
5396 fcport); in qla2x00_relogin()
5399 fcport->login_retry--; in qla2x00_relogin()
5402 fcport); in qla2x00_relogin()
5404 fcport->old_loop_id = in qla2x00_relogin()
5405 fcport->loop_id; in qla2x00_relogin()
5408 fcport->loop_id); in qla2x00_relogin()
5410 (vha, fcport); in qla2x00_relogin()
5417 fcport->login_retry, in qla2x00_relogin()
5418 fcport->loop_id); in qla2x00_relogin()
5420 fcport->login_retry = 0; in qla2x00_relogin()
5423 if (fcport->login_retry == 0 && in qla2x00_relogin()
5425 qla2x00_clear_loop_id(fcport); in qla2x00_relogin()
6769 &base_vha->hw->mr.fcport, in qla2x00_do_dpc()
7128 sfcp = sp->fcport; in qla2x00_timer()
7369 fc_port_t *fcport; in qla_pci_error_cleanup() local
7419 list_for_each_entry(fcport, &vha->vp_fcports, list) in qla_pci_error_cleanup()
7420 fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); in qla_pci_error_cleanup()
7426 list_for_each_entry(fcport, &vp->vp_fcports, list) in qla_pci_error_cleanup()
7427 fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); in qla_pci_error_cleanup()