Lines Matching refs:lport

271 	struct fc_lport *lport = exch->lp;  in qedf_flogi_resp()  local
272 struct qedf_ctx *qedf = lport_priv(lport); in qedf_flogi_resp()
303 fc_lport_flogi_resp(seq, fp, lport); in qedf_flogi_resp()
306 static struct fc_seq *qedf_elsct_send(struct fc_lport *lport, u32 did, in qedf_elsct_send() argument
313 struct qedf_ctx *qedf = lport_priv(lport); in qedf_elsct_send()
326 return fc_elsct_send(lport, did, fp, op, qedf_flogi_resp, in qedf_elsct_send()
330 return fc_elsct_send(lport, did, fp, op, resp, arg, timeout); in qedf_elsct_send()
335 struct fc_lport *lport; in qedf_send_flogi() local
338 lport = qedf->lport; in qedf_send_flogi()
340 if (!lport->tt.elsct_send) { in qedf_send_flogi()
345 fp = fc_frame_alloc(lport, sizeof(struct fc_els_flogi)); in qedf_send_flogi()
353 lport->tt.elsct_send(lport, FC_FID_FLOGI, fp, in qedf_send_flogi()
354 ELS_FLOGI, qedf_flogi_resp, lport, lport->r_a_tov); in qedf_send_flogi()
370 struct fc_lport *lport = qedf->lport; in qedf_link_recovery() local
428 qedf->lport->r_a_tov); in qedf_link_recovery()
438 mutex_lock(&lport->disc.disc_mutex); in qedf_link_recovery()
439 list_for_each_entry_rcu(rdata, &lport->disc.rports, peers) { in qedf_link_recovery()
445 mutex_unlock(&lport->disc.disc_mutex); in qedf_link_recovery()
452 struct fc_lport *lport = qedf->lport; in qedf_update_link_speed() local
454 lport->link_speed = FC_PORTSPEED_UNKNOWN; in qedf_update_link_speed()
455 lport->link_supported_speeds = FC_PORTSPEED_UNKNOWN; in qedf_update_link_speed()
460 lport->link_speed = FC_PORTSPEED_10GBIT; in qedf_update_link_speed()
463 lport->link_speed = FC_PORTSPEED_25GBIT; in qedf_update_link_speed()
466 lport->link_speed = FC_PORTSPEED_40GBIT; in qedf_update_link_speed()
469 lport->link_speed = FC_PORTSPEED_50GBIT; in qedf_update_link_speed()
472 lport->link_speed = FC_PORTSPEED_100GBIT; in qedf_update_link_speed()
475 lport->link_speed = FC_PORTSPEED_20GBIT; in qedf_update_link_speed()
478 lport->link_speed = FC_PORTSPEED_UNKNOWN; in qedf_update_link_speed()
498 lport->link_supported_speeds |= FC_PORTSPEED_10GBIT; in qedf_update_link_speed()
506 lport->link_supported_speeds |= FC_PORTSPEED_25GBIT; in qedf_update_link_speed()
515 lport->link_supported_speeds |= FC_PORTSPEED_40GBIT; in qedf_update_link_speed()
523 lport->link_supported_speeds |= FC_PORTSPEED_50GBIT; in qedf_update_link_speed()
532 lport->link_supported_speeds |= FC_PORTSPEED_100GBIT; in qedf_update_link_speed()
538 lport->link_supported_speeds |= FC_PORTSPEED_20GBIT; in qedf_update_link_speed()
540 if (lport->host && lport->host->shost_data) in qedf_update_link_speed()
541 fc_host_supported_speeds(lport->host) = in qedf_update_link_speed()
542 lport->link_supported_speeds; in qedf_update_link_speed()
719 struct fc_lport *lport; in qedf_eh_abort() local
731 lport = shost_priv(sc_cmd->device->host); in qedf_eh_abort()
732 qedf = (struct qedf_ctx *)lport_priv(lport); in qedf_eh_abort()
799 if (lport->state != LPORT_ST_READY || !(lport->link_up)) { in qedf_eh_abort()
909 void qedf_ctx_soft_reset(struct fc_lport *lport) in qedf_ctx_soft_reset() argument
914 if (lport->vport) { in qedf_ctx_soft_reset()
919 qedf = lport_priv(lport); in qedf_ctx_soft_reset()
957 struct fc_lport *lport; in qedf_eh_host_reset() local
960 lport = shost_priv(sc_cmd->device->host); in qedf_eh_host_reset()
961 qedf = lport_priv(lport); in qedf_eh_host_reset()
969 qedf_ctx_soft_reset(lport); in qedf_eh_host_reset()
1058 static int qedf_xmit(struct fc_lport *lport, struct fc_frame *fp) in qedf_xmit() argument
1077 qedf = (struct qedf_ctx *)lport_priv(lport); in qedf_xmit()
1083 if (lport->vport) in qedf_xmit()
1084 base_lport = shost_priv(vport_to_shost(lport->vport)); in qedf_xmit()
1086 base_lport = lport; in qedf_xmit()
1108 rdata = fc_rport_lookup(lport, ntoh24(fh->fh_d_id)); in qedf_xmit()
1110 rdata->retries = lport->max_rport_retry_count; in qedf_xmit()
1135 if (fcoe_ctlr_els_send(&qedf->ctlr, lport, skb)) in qedf_xmit()
1218 this_cpu_inc(lport->stats->TxFrames); in qedf_xmit()
1219 this_cpu_add(lport->stats->TxWords, wlen); in qedf_xmit()
1225 fr_dev(fp) = lport; in qedf_xmit()
1344 conn_info.e_d_tov_timer_val = qedf->lport->e_d_tov; in qedf_offload_connection()
1357 port_id = fc_host_port_id(qedf->lport->host); in qedf_offload_connection()
1454 static void qedf_rport_event_handler(struct fc_lport *lport, in qedf_rport_event_handler() argument
1458 struct qedf_ctx *qedf = lport_priv(lport); in qedf_rport_event_handler()
1624 static void qedf_abort_io(struct fc_lport *lport) in qedf_abort_io() argument
1629 static void qedf_fcp_cleanup(struct fc_lport *lport) in qedf_fcp_cleanup() argument
1657 struct fc_lport *lport = qedf->lport; in qedf_setup_fdmi() local
1666 lport->fdmi_enabled = 1; in qedf_setup_fdmi()
1680 snprintf(fc_host_serial_number(lport->host), in qedf_setup_fdmi()
1686 snprintf(fc_host_serial_number(lport->host), in qedf_setup_fdmi()
1689 snprintf(fc_host_manufacturer(lport->host), in qedf_setup_fdmi()
1693 snprintf(fc_host_model(lport->host), in qedf_setup_fdmi()
1696 snprintf(fc_host_model_description(lport->host), in qedf_setup_fdmi()
1702 snprintf(fc_host_model(lport->host), in qedf_setup_fdmi()
1705 snprintf(fc_host_model_description(lport->host), in qedf_setup_fdmi()
1710 snprintf(fc_host_hardware_version(lport->host), in qedf_setup_fdmi()
1713 snprintf(fc_host_driver_version(lport->host), in qedf_setup_fdmi()
1716 snprintf(fc_host_firmware_version(lport->host), in qedf_setup_fdmi()
1721 snprintf(fc_host_vendor_identifier(lport->host), in qedf_setup_fdmi()
1728 struct fc_lport *lport = qedf->lport; in qedf_lport_setup() local
1730 lport->link_up = 0; in qedf_lport_setup()
1731 lport->max_retry_count = QEDF_FLOGI_RETRY_CNT; in qedf_lport_setup()
1732 lport->max_rport_retry_count = QEDF_RPORT_RETRY_CNT; in qedf_lport_setup()
1733 lport->service_params = (FCP_SPPF_INIT_FCN | FCP_SPPF_RD_XRDY_DIS | in qedf_lport_setup()
1735 lport->boot_time = jiffies; in qedf_lport_setup()
1736 lport->e_d_tov = 2 * 1000; in qedf_lport_setup()
1737 lport->r_a_tov = 10 * 1000; in qedf_lport_setup()
1740 lport->does_npiv = 1; in qedf_lport_setup()
1741 fc_host_max_npiv_vports(lport->host) = QEDF_MAX_NPIV; in qedf_lport_setup()
1743 fc_set_wwnn(lport, qedf->wwnn); in qedf_lport_setup()
1744 fc_set_wwpn(lport, qedf->wwpn); in qedf_lport_setup()
1746 if (fcoe_libfc_config(lport, &qedf->ctlr, &qedf_lport_template, 0)) { in qedf_lport_setup()
1753 fc_exch_mgr_alloc(lport, FC_CLASS_3, FCOE_PARAMS_NUM_TASKS, in qedf_lport_setup()
1756 if (fc_lport_init_stats(lport)) in qedf_lport_setup()
1760 fc_lport_config(lport); in qedf_lport_setup()
1763 fc_set_mfs(lport, QEDF_MFS); in qedf_lport_setup()
1764 fc_host_maxframe_size(lport->host) = lport->mfs; in qedf_lport_setup()
1767 fc_host_dev_loss_tmo(lport->host) = qedf_dev_loss_tmo; in qedf_lport_setup()
1771 snprintf(fc_host_symbolic_name(lport->host), 256, in qedf_lport_setup()
1775 snprintf(fc_host_symbolic_name(lport->host), 256, in qedf_lport_setup()
1788 struct fc_lport *lport) in qedf_vport_libfc_config() argument
1790 lport->link_up = 0; in qedf_vport_libfc_config()
1791 lport->qfull = 0; in qedf_vport_libfc_config()
1792 lport->max_retry_count = QEDF_FLOGI_RETRY_CNT; in qedf_vport_libfc_config()
1793 lport->max_rport_retry_count = QEDF_RPORT_RETRY_CNT; in qedf_vport_libfc_config()
1794 lport->service_params = (FCP_SPPF_INIT_FCN | FCP_SPPF_RD_XRDY_DIS | in qedf_vport_libfc_config()
1796 lport->boot_time = jiffies; in qedf_vport_libfc_config()
1797 lport->e_d_tov = 2 * 1000; in qedf_vport_libfc_config()
1798 lport->r_a_tov = 10 * 1000; in qedf_vport_libfc_config()
1799 lport->does_npiv = 1; /* Temporary until we add NPIV support */ in qedf_vport_libfc_config()
1802 if (fc_lport_init_stats(lport)) in qedf_vport_libfc_config()
1806 fc_lport_config(lport); in qedf_vport_libfc_config()
1809 lport->crc_offload = 0; in qedf_vport_libfc_config()
1810 lport->seq_offload = 0; in qedf_vport_libfc_config()
1811 lport->lro_enabled = 0; in qedf_vport_libfc_config()
1812 lport->lro_xid = 0; in qedf_vport_libfc_config()
1813 lport->lso_max = 0; in qedf_vport_libfc_config()
1859 vport_qedf->lport = vn_port; in qedf_vport_create()
2005 struct fc_lport *lport = vport->dd_data; in qedf_vport_disable() local
2009 fc_fabric_logoff(lport); in qedf_vport_disable()
2011 lport->boot_time = jiffies; in qedf_vport_disable()
2012 fc_fabric_login(lport); in qedf_vport_disable()
2013 fc_vport_setlink(lport); in qedf_vport_disable()
2026 struct fc_host_attrs *fc_host = shost_to_fc_host(qedf->lport->host); in qedf_wait_for_vport_destroy()
2046 struct fc_lport *lport = shost_priv(shost); in qedf_fcoe_reset() local
2048 qedf_ctx_soft_reset(lport); in qedf_fcoe_reset()
2054 struct fc_lport *lport = shost_priv(shost); in qedf_get_host_port_id() local
2056 fc_host_port_id(shost) = lport->port_id; in qedf_get_host_port_id()
2063 struct fc_lport *lport = shost_priv(shost); in qedf_fc_get_host_stats() local
2064 struct qedf_ctx *qedf = lport_priv(lport); in qedf_fc_get_host_stats()
2070 if (lport->vport) in qedf_fc_get_host_stats()
2462 struct fc_lport *lport; in qedf_recv_frame() local
2473 lport = qedf->lport; in qedf_recv_frame()
2474 if (lport == NULL || lport->state == LPORT_ST_DISABLED) { in qedf_recv_frame()
2493 fr_dev(fp) = lport; in qedf_recv_frame()
2556 vn_port = fc_vport_id_lookup(lport, ntoh24(fh->fh_d_id)); in qedf_recv_frame()
2563 if (lport->port_id != ntoh24(fh->fh_d_id) && !vn_port) { in qedf_recv_frame()
2566 lport->port_id, ntoh24(fh->fh_d_id)); in qedf_recv_frame()
2605 fc_exch_recv(lport, fp); in qedf_recv_frame()
2702 fc_exch_recv(io_work->qedf->lport, io_work->fp); in qedf_fp_io_handler()
3286 struct fc_lport *lport; in __qedf_probe() local
3308 lport = libfc_host_alloc(&qedf_host_template, in __qedf_probe()
3311 if (!lport) { in __qedf_probe()
3317 fc_disc_init(lport); in __qedf_probe()
3320 qedf = lport_priv(lport); in __qedf_probe()
3322 qedf->lport = lport; in __qedf_probe()
3323 qedf->ctlr.lp = lport; in __qedf_probe()
3326 qedf->dbg_ctx.host_no = lport->host->host_no; in __qedf_probe()
3347 lport = qedf->lport; in __qedf_probe()
3352 host = lport->host; in __qedf_probe()
3365 qedf->lport->host->host_no); in __qedf_probe()
3618 sprintf(host_buf, "qedf_%u_timer", qedf->lport->host->host_no); in __qedf_probe()
3631 qedf->lport->host->host_no); in __qedf_probe()
3680 fc_fabric_login(lport); in __qedf_probe()
3692 fc_remove_host(qedf->lport->host); in __qedf_probe()
3693 scsi_remove_host(qedf->lport->host); in __qedf_probe()
3709 scsi_host_put(lport->host); in __qedf_probe()
3747 fc_fabric_logoff(qedf->lport); in __qedf_remove()
3784 fc_lport_destroy(qedf->lport); in __qedf_remove()
3785 fc_remove_host(qedf->lport->host); in __qedf_remove()
3786 scsi_remove_host(qedf->lport->host); in __qedf_remove()
3792 fc_exch_mgr_free(qedf->lport); in __qedf_remove()
3793 fc_lport_free_stats(qedf->lport); in __qedf_remove()
3837 scsi_host_put(qedf->lport->host); in __qedf_remove()
3904 struct fc_lport *lport; in qedf_get_protocol_tlv_data() local
3919 lport = qedf->lport; in qedf_get_protocol_tlv_data()
3920 host = lport->host; in qedf_get_protocol_tlv_data()
3930 fcoe->ra_tov = lport->r_a_tov; in qedf_get_protocol_tlv_data()
3933 fcoe->ed_tov = lport->e_d_tov; in qedf_get_protocol_tlv_data()
3949 if (lport->link_up) in qedf_get_protocol_tlv_data()
4002 qedf_ctx_soft_reset(qedf->lport); in qedf_stag_change_work()