Lines Matching refs:lport

270 	struct fc_lport *lport = exch->lp;  in qedf_flogi_resp()  local
271 struct qedf_ctx *qedf = lport_priv(lport); in qedf_flogi_resp()
302 fc_lport_flogi_resp(seq, fp, lport); in qedf_flogi_resp()
305 static struct fc_seq *qedf_elsct_send(struct fc_lport *lport, u32 did, in qedf_elsct_send() argument
312 struct qedf_ctx *qedf = lport_priv(lport); in qedf_elsct_send()
325 return fc_elsct_send(lport, did, fp, op, qedf_flogi_resp, in qedf_elsct_send()
329 return fc_elsct_send(lport, did, fp, op, resp, arg, timeout); in qedf_elsct_send()
334 struct fc_lport *lport; in qedf_send_flogi() local
337 lport = qedf->lport; in qedf_send_flogi()
339 if (!lport->tt.elsct_send) { in qedf_send_flogi()
344 fp = fc_frame_alloc(lport, sizeof(struct fc_els_flogi)); in qedf_send_flogi()
352 lport->tt.elsct_send(lport, FC_FID_FLOGI, fp, in qedf_send_flogi()
353 ELS_FLOGI, qedf_flogi_resp, lport, lport->r_a_tov); in qedf_send_flogi()
369 struct fc_lport *lport = qedf->lport; in qedf_link_recovery() local
427 qedf->lport->r_a_tov); in qedf_link_recovery()
437 mutex_lock(&lport->disc.disc_mutex); in qedf_link_recovery()
438 list_for_each_entry_rcu(rdata, &lport->disc.rports, peers) { in qedf_link_recovery()
444 mutex_unlock(&lport->disc.disc_mutex); in qedf_link_recovery()
451 struct fc_lport *lport = qedf->lport; in qedf_update_link_speed() local
453 lport->link_speed = FC_PORTSPEED_UNKNOWN; in qedf_update_link_speed()
454 lport->link_supported_speeds = FC_PORTSPEED_UNKNOWN; in qedf_update_link_speed()
459 lport->link_speed = FC_PORTSPEED_10GBIT; in qedf_update_link_speed()
462 lport->link_speed = FC_PORTSPEED_25GBIT; in qedf_update_link_speed()
465 lport->link_speed = FC_PORTSPEED_40GBIT; in qedf_update_link_speed()
468 lport->link_speed = FC_PORTSPEED_50GBIT; in qedf_update_link_speed()
471 lport->link_speed = FC_PORTSPEED_100GBIT; in qedf_update_link_speed()
474 lport->link_speed = FC_PORTSPEED_20GBIT; in qedf_update_link_speed()
477 lport->link_speed = FC_PORTSPEED_UNKNOWN; in qedf_update_link_speed()
497 lport->link_supported_speeds |= FC_PORTSPEED_10GBIT; in qedf_update_link_speed()
505 lport->link_supported_speeds |= FC_PORTSPEED_25GBIT; in qedf_update_link_speed()
514 lport->link_supported_speeds |= FC_PORTSPEED_40GBIT; in qedf_update_link_speed()
522 lport->link_supported_speeds |= FC_PORTSPEED_50GBIT; in qedf_update_link_speed()
531 lport->link_supported_speeds |= FC_PORTSPEED_100GBIT; in qedf_update_link_speed()
537 lport->link_supported_speeds |= FC_PORTSPEED_20GBIT; in qedf_update_link_speed()
539 if (lport->host && lport->host->shost_data) in qedf_update_link_speed()
540 fc_host_supported_speeds(lport->host) = in qedf_update_link_speed()
541 lport->link_supported_speeds; in qedf_update_link_speed()
718 struct fc_lport *lport; in qedf_eh_abort() local
730 lport = shost_priv(sc_cmd->device->host); in qedf_eh_abort()
731 qedf = (struct qedf_ctx *)lport_priv(lport); in qedf_eh_abort()
798 if (lport->state != LPORT_ST_READY || !(lport->link_up)) { in qedf_eh_abort()
908 void qedf_ctx_soft_reset(struct fc_lport *lport) in qedf_ctx_soft_reset() argument
913 if (lport->vport) { in qedf_ctx_soft_reset()
918 qedf = lport_priv(lport); in qedf_ctx_soft_reset()
956 struct fc_lport *lport; in qedf_eh_host_reset() local
959 lport = shost_priv(sc_cmd->device->host); in qedf_eh_host_reset()
960 qedf = lport_priv(lport); in qedf_eh_host_reset()
968 qedf_ctx_soft_reset(lport); in qedf_eh_host_reset()
1056 static int qedf_xmit(struct fc_lport *lport, struct fc_frame *fp) in qedf_xmit() argument
1076 qedf = (struct qedf_ctx *)lport_priv(lport); in qedf_xmit()
1082 if (lport->vport) in qedf_xmit()
1083 base_lport = shost_priv(vport_to_shost(lport->vport)); in qedf_xmit()
1085 base_lport = lport; in qedf_xmit()
1107 rdata = fc_rport_lookup(lport, ntoh24(fh->fh_d_id)); in qedf_xmit()
1109 rdata->retries = lport->max_rport_retry_count; in qedf_xmit()
1134 if (fcoe_ctlr_els_send(&qedf->ctlr, lport, skb)) in qedf_xmit()
1217 stats = per_cpu_ptr(lport->stats, get_cpu()); in qedf_xmit()
1226 fr_dev(fp) = lport; in qedf_xmit()
1345 conn_info.e_d_tov_timer_val = qedf->lport->e_d_tov; in qedf_offload_connection()
1358 port_id = fc_host_port_id(qedf->lport->host); in qedf_offload_connection()
1453 static void qedf_rport_event_handler(struct fc_lport *lport, in qedf_rport_event_handler() argument
1457 struct qedf_ctx *qedf = lport_priv(lport); in qedf_rport_event_handler()
1623 static void qedf_abort_io(struct fc_lport *lport) in qedf_abort_io() argument
1628 static void qedf_fcp_cleanup(struct fc_lport *lport) in qedf_fcp_cleanup() argument
1656 struct fc_lport *lport = qedf->lport; in qedf_setup_fdmi() local
1665 lport->fdmi_enabled = 1; in qedf_setup_fdmi()
1679 snprintf(fc_host_serial_number(lport->host), in qedf_setup_fdmi()
1685 snprintf(fc_host_serial_number(lport->host), in qedf_setup_fdmi()
1688 snprintf(fc_host_manufacturer(lport->host), in qedf_setup_fdmi()
1692 snprintf(fc_host_model(lport->host), in qedf_setup_fdmi()
1695 snprintf(fc_host_model_description(lport->host), in qedf_setup_fdmi()
1701 snprintf(fc_host_model(lport->host), in qedf_setup_fdmi()
1704 snprintf(fc_host_model_description(lport->host), in qedf_setup_fdmi()
1709 snprintf(fc_host_hardware_version(lport->host), in qedf_setup_fdmi()
1712 snprintf(fc_host_driver_version(lport->host), in qedf_setup_fdmi()
1715 snprintf(fc_host_firmware_version(lport->host), in qedf_setup_fdmi()
1720 snprintf(fc_host_vendor_identifier(lport->host), in qedf_setup_fdmi()
1727 struct fc_lport *lport = qedf->lport; in qedf_lport_setup() local
1729 lport->link_up = 0; in qedf_lport_setup()
1730 lport->max_retry_count = QEDF_FLOGI_RETRY_CNT; in qedf_lport_setup()
1731 lport->max_rport_retry_count = QEDF_RPORT_RETRY_CNT; in qedf_lport_setup()
1732 lport->service_params = (FCP_SPPF_INIT_FCN | FCP_SPPF_RD_XRDY_DIS | in qedf_lport_setup()
1734 lport->boot_time = jiffies; in qedf_lport_setup()
1735 lport->e_d_tov = 2 * 1000; in qedf_lport_setup()
1736 lport->r_a_tov = 10 * 1000; in qedf_lport_setup()
1739 lport->does_npiv = 1; in qedf_lport_setup()
1740 fc_host_max_npiv_vports(lport->host) = QEDF_MAX_NPIV; in qedf_lport_setup()
1742 fc_set_wwnn(lport, qedf->wwnn); in qedf_lport_setup()
1743 fc_set_wwpn(lport, qedf->wwpn); in qedf_lport_setup()
1745 if (fcoe_libfc_config(lport, &qedf->ctlr, &qedf_lport_template, 0)) { in qedf_lport_setup()
1752 fc_exch_mgr_alloc(lport, FC_CLASS_3, FCOE_PARAMS_NUM_TASKS, in qedf_lport_setup()
1755 if (fc_lport_init_stats(lport)) in qedf_lport_setup()
1759 fc_lport_config(lport); in qedf_lport_setup()
1762 fc_set_mfs(lport, QEDF_MFS); in qedf_lport_setup()
1763 fc_host_maxframe_size(lport->host) = lport->mfs; in qedf_lport_setup()
1766 fc_host_dev_loss_tmo(lport->host) = qedf_dev_loss_tmo; in qedf_lport_setup()
1770 snprintf(fc_host_symbolic_name(lport->host), 256, in qedf_lport_setup()
1774 snprintf(fc_host_symbolic_name(lport->host), 256, in qedf_lport_setup()
1787 struct fc_lport *lport) in qedf_vport_libfc_config() argument
1789 lport->link_up = 0; in qedf_vport_libfc_config()
1790 lport->qfull = 0; in qedf_vport_libfc_config()
1791 lport->max_retry_count = QEDF_FLOGI_RETRY_CNT; in qedf_vport_libfc_config()
1792 lport->max_rport_retry_count = QEDF_RPORT_RETRY_CNT; in qedf_vport_libfc_config()
1793 lport->service_params = (FCP_SPPF_INIT_FCN | FCP_SPPF_RD_XRDY_DIS | in qedf_vport_libfc_config()
1795 lport->boot_time = jiffies; in qedf_vport_libfc_config()
1796 lport->e_d_tov = 2 * 1000; in qedf_vport_libfc_config()
1797 lport->r_a_tov = 10 * 1000; in qedf_vport_libfc_config()
1798 lport->does_npiv = 1; /* Temporary until we add NPIV support */ in qedf_vport_libfc_config()
1801 if (fc_lport_init_stats(lport)) in qedf_vport_libfc_config()
1805 fc_lport_config(lport); in qedf_vport_libfc_config()
1808 lport->crc_offload = 0; in qedf_vport_libfc_config()
1809 lport->seq_offload = 0; in qedf_vport_libfc_config()
1810 lport->lro_enabled = 0; in qedf_vport_libfc_config()
1811 lport->lro_xid = 0; in qedf_vport_libfc_config()
1812 lport->lso_max = 0; in qedf_vport_libfc_config()
1858 vport_qedf->lport = vn_port; in qedf_vport_create()
1982 struct fc_lport *lport = vport->dd_data; in qedf_vport_disable() local
1986 fc_fabric_logoff(lport); in qedf_vport_disable()
1988 lport->boot_time = jiffies; in qedf_vport_disable()
1989 fc_fabric_login(lport); in qedf_vport_disable()
1990 fc_vport_setlink(lport); in qedf_vport_disable()
2003 struct fc_host_attrs *fc_host = shost_to_fc_host(qedf->lport->host); in qedf_wait_for_vport_destroy()
2023 struct fc_lport *lport = shost_priv(shost); in qedf_fcoe_reset() local
2025 qedf_ctx_soft_reset(lport); in qedf_fcoe_reset()
2031 struct fc_lport *lport = shost_priv(shost); in qedf_get_host_port_id() local
2033 fc_host_port_id(shost) = lport->port_id; in qedf_get_host_port_id()
2040 struct fc_lport *lport = shost_priv(shost); in qedf_fc_get_host_stats() local
2041 struct qedf_ctx *qedf = lport_priv(lport); in qedf_fc_get_host_stats()
2047 if (lport->vport) in qedf_fc_get_host_stats()
2441 struct fc_lport *lport; in qedf_recv_frame() local
2452 lport = qedf->lport; in qedf_recv_frame()
2453 if (lport == NULL || lport->state == LPORT_ST_DISABLED) { in qedf_recv_frame()
2472 fr_dev(fp) = lport; in qedf_recv_frame()
2535 vn_port = fc_vport_id_lookup(lport, ntoh24(fh->fh_d_id)); in qedf_recv_frame()
2542 if (lport->port_id != ntoh24(fh->fh_d_id) && !vn_port) { in qedf_recv_frame()
2545 lport->port_id, ntoh24(fh->fh_d_id)); in qedf_recv_frame()
2584 fc_exch_recv(lport, fp); in qedf_recv_frame()
2681 fc_exch_recv(io_work->qedf->lport, io_work->fp); in qedf_fp_io_handler()
3263 struct fc_lport *lport; in __qedf_probe() local
3285 lport = libfc_host_alloc(&qedf_host_template, in __qedf_probe()
3288 if (!lport) { in __qedf_probe()
3294 fc_disc_init(lport); in __qedf_probe()
3297 qedf = lport_priv(lport); in __qedf_probe()
3299 qedf->lport = lport; in __qedf_probe()
3300 qedf->ctlr.lp = lport; in __qedf_probe()
3303 qedf->dbg_ctx.host_no = lport->host->host_no; in __qedf_probe()
3324 lport = qedf->lport; in __qedf_probe()
3329 host = lport->host; in __qedf_probe()
3342 qedf->lport->host->host_no); in __qedf_probe()
3595 sprintf(host_buf, "qedf_%u_timer", qedf->lport->host->host_no); in __qedf_probe()
3608 qedf->lport->host->host_no); in __qedf_probe()
3657 fc_fabric_login(lport); in __qedf_probe()
3669 fc_remove_host(qedf->lport->host); in __qedf_probe()
3670 scsi_remove_host(qedf->lport->host); in __qedf_probe()
3686 scsi_host_put(lport->host); in __qedf_probe()
3729 fc_fabric_logoff(qedf->lport); in __qedf_remove()
3766 fc_lport_destroy(qedf->lport); in __qedf_remove()
3767 fc_remove_host(qedf->lport->host); in __qedf_remove()
3768 scsi_remove_host(qedf->lport->host); in __qedf_remove()
3774 fc_exch_mgr_free(qedf->lport); in __qedf_remove()
3775 fc_lport_free_stats(qedf->lport); in __qedf_remove()
3819 scsi_host_put(qedf->lport->host); in __qedf_remove()
3886 struct fc_lport *lport; in qedf_get_protocol_tlv_data() local
3901 lport = qedf->lport; in qedf_get_protocol_tlv_data()
3902 host = lport->host; in qedf_get_protocol_tlv_data()
3912 fcoe->ra_tov = lport->r_a_tov; in qedf_get_protocol_tlv_data()
3915 fcoe->ed_tov = lport->e_d_tov; in qedf_get_protocol_tlv_data()
3931 if (lport->link_up) in qedf_get_protocol_tlv_data()
3982 qedf_ctx_soft_reset(qedf->lport); in qedf_stag_change_work()