Lines Matching refs:nic_data
119 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_get_pf_index() local
130 nic_data->pf_index = MCDI_DWORD(outbuf, GET_FUNCTION_INFO_OUT_PF); in efx_ef10_get_pf_index()
138 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_get_vf_index() local
149 nic_data->vf_index = MCDI_DWORD(outbuf, GET_FUNCTION_INFO_OUT_VF); in efx_ef10_get_vf_index()
157 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_init_datapath_caps() local
173 nic_data->datapath_caps = in efx_ef10_init_datapath_caps()
178 nic_data->rx_dpcpu_fw_id = in efx_ef10_init_datapath_caps()
180 nic_data->tx_dpcpu_fw_id = in efx_ef10_init_datapath_caps()
183 if (!(nic_data->datapath_caps & in efx_ef10_init_datapath_caps()
190 if (!(nic_data->datapath_caps & in efx_ef10_init_datapath_caps()
291 struct efx_ef10_nic_data *nic_data; in efx_ef10_probe() local
306 nic_data = kzalloc(sizeof(*nic_data), GFP_KERNEL); in efx_ef10_probe()
307 if (!nic_data) in efx_ef10_probe()
309 efx->nic_data = nic_data; in efx_ef10_probe()
314 rc = efx_nic_alloc_buffer(efx, &nic_data->mcdi_buf, in efx_ef10_probe()
331 nic_data->warm_boot_count = rc; in efx_ef10_probe()
333 nic_data->rx_rss_context = EFX_EF10_RSS_CONTEXT_INVALID; in efx_ef10_probe()
335 nic_data->vport_id = EVB_PORT_ID_ASSIGNED; in efx_ef10_probe()
399 nic_data->workaround_35388 = true; in efx_ef10_probe()
406 nic_data->workaround_35388 = enabled & in efx_ef10_probe()
413 nic_data->workaround_35388 ? "en" : "dis"); in efx_ef10_probe()
426 efx_pf->type->get_mac_address(efx_pf, nic_data->port_id); in efx_ef10_probe()
429 ether_addr_copy(nic_data->port_id, efx->net_dev->perm_addr); in efx_ef10_probe()
440 efx_nic_free_buffer(efx, &nic_data->mcdi_buf); in efx_ef10_probe()
442 kfree(nic_data); in efx_ef10_probe()
443 efx->nic_data = NULL; in efx_ef10_probe()
467 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_free_piobufs() local
474 for (i = 0; i < nic_data->n_piobufs; i++) { in efx_ef10_free_piobufs()
476 nic_data->piobuf_handle[i]); in efx_ef10_free_piobufs()
482 nic_data->n_piobufs = 0; in efx_ef10_free_piobufs()
487 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_alloc_piobufs() local
504 nic_data->piobuf_handle[i] = in efx_ef10_alloc_piobufs()
508 nic_data->piobuf_handle[i]); in efx_ef10_alloc_piobufs()
511 nic_data->n_piobufs = i; in efx_ef10_alloc_piobufs()
519 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_link_piobufs() local
534 for (index = 0; index < nic_data->n_piobufs; ++index) { in efx_ef10_link_piobufs()
536 nic_data->piobuf_handle[index]); in efx_ef10_link_piobufs()
538 nic_data->pio_write_vi_base + index); in efx_ef10_link_piobufs()
545 nic_data->pio_write_vi_base + index, index, in efx_ef10_link_piobufs()
551 nic_data->pio_write_vi_base + index, index); in efx_ef10_link_piobufs()
572 if (tx_queue->queue == nic_data->pio_write_vi_base) { in efx_ef10_link_piobufs()
578 nic_data->piobuf_handle[index]); in efx_ef10_link_piobufs()
597 nic_data->pio_write_base + in efx_ef10_link_piobufs()
614 nic_data->pio_write_vi_base + index); in efx_ef10_link_piobufs()
657 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_remove() local
670 nic_data_pf = efx_pf->nic_data; in efx_ef10_remove()
671 vf = nic_data_pf->vf + nic_data->vf_index; in efx_ef10_remove()
685 if (nic_data->wc_membase) in efx_ef10_remove()
686 iounmap(nic_data->wc_membase); in efx_ef10_remove()
691 if (!nic_data->must_restore_piobufs) in efx_ef10_remove()
698 efx_nic_free_buffer(efx, &nic_data->mcdi_buf); in efx_ef10_remove()
699 kfree(nic_data); in efx_ef10_remove()
762 struct efx_ef10_nic_data *nic_data_pf = efx_pf->nic_data; in efx_ef10_probe_vf()
784 struct efx_ef10_nic_data *nic_data_p = efx_pf->nic_data; in efx_ef10_probe_vf()
785 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_probe_vf() local
787 nic_data_p->vf[nic_data->vf_index].efx = efx; in efx_ef10_probe_vf()
788 nic_data_p->vf[nic_data->vf_index].pci_dev = in efx_ef10_probe_vf()
813 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_alloc_vis() local
830 nic_data->vi_base = MCDI_DWORD(outbuf, ALLOC_VIS_OUT_VI_BASE); in efx_ef10_alloc_vis()
831 nic_data->n_allocated_vis = MCDI_DWORD(outbuf, ALLOC_VIS_OUT_VI_COUNT); in efx_ef10_alloc_vis()
840 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_dimension_resources() local
873 nic_data->n_piobufs = 0; in efx_ef10_dimension_resources()
888 if (nic_data->n_piobufs) { in efx_ef10_dimension_resources()
894 nic_data->n_piobufs) * in efx_ef10_dimension_resources()
897 max_vis = pio_write_vi_base + nic_data->n_piobufs; in efx_ef10_dimension_resources()
913 if (nic_data->n_allocated_vis < channel_vis) { in efx_ef10_dimension_resources()
922 efx->max_channels = nic_data->n_allocated_vis; in efx_ef10_dimension_resources()
924 nic_data->n_allocated_vis / EFX_TXQ_TYPES; in efx_ef10_dimension_resources()
933 if (nic_data->n_piobufs && in efx_ef10_dimension_resources()
934 nic_data->n_allocated_vis < in efx_ef10_dimension_resources()
935 pio_write_vi_base + nic_data->n_piobufs) { in efx_ef10_dimension_resources()
938 nic_data->n_allocated_vis, nic_data->n_piobufs); in efx_ef10_dimension_resources()
955 nic_data->wc_membase = ioremap_wc(efx->membase_phys + in efx_ef10_dimension_resources()
958 if (!nic_data->wc_membase) { in efx_ef10_dimension_resources()
964 nic_data->pio_write_vi_base = pio_write_vi_base; in efx_ef10_dimension_resources()
965 nic_data->pio_write_base = in efx_ef10_dimension_resources()
966 nic_data->wc_membase + in efx_ef10_dimension_resources()
978 nic_data->wc_membase, wc_mem_map_size); in efx_ef10_dimension_resources()
985 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_init_nic() local
988 if (nic_data->must_check_datapath_caps) { in efx_ef10_init_nic()
992 nic_data->must_check_datapath_caps = false; in efx_ef10_init_nic()
995 if (nic_data->must_realloc_vis) { in efx_ef10_init_nic()
997 rc = efx_ef10_alloc_vis(efx, nic_data->n_allocated_vis, in efx_ef10_init_nic()
998 nic_data->n_allocated_vis); in efx_ef10_init_nic()
1001 nic_data->must_realloc_vis = false; in efx_ef10_init_nic()
1004 if (nic_data->must_restore_piobufs && nic_data->n_piobufs) { in efx_ef10_init_nic()
1005 rc = efx_ef10_alloc_piobufs(efx, nic_data->n_piobufs); in efx_ef10_init_nic()
1016 nic_data->must_restore_piobufs = false; in efx_ef10_init_nic()
1027 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_reset_mc_allocations() local
1033 nic_data->must_realloc_vis = true; in efx_ef10_reset_mc_allocations()
1034 nic_data->must_restore_filters = true; in efx_ef10_reset_mc_allocations()
1035 nic_data->must_restore_piobufs = true; in efx_ef10_reset_mc_allocations()
1037 nic_data->rx_rss_context = EFX_EF10_RSS_CONTEXT_INVALID; in efx_ef10_reset_mc_allocations()
1040 nic_data->must_probe_vswitching = true; in efx_ef10_reset_mc_allocations()
1041 nic_data->vport_id = EVB_PORT_ID_ASSIGNED; in efx_ef10_reset_mc_allocations()
1043 if (nic_data->vf) in efx_ef10_reset_mc_allocations()
1045 nic_data->vf[i].vport_id = 0; in efx_ef10_reset_mc_allocations()
1272 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_raw_stat_mask() local
1283 if (nic_data->datapath_caps & in efx_ef10_raw_stat_mask()
1292 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_get_stat_mask() local
1298 if (nic_data->datapath_caps & in efx_ef10_get_stat_mask()
1330 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_update_stats_common() local
1331 u64 *stats = nic_data->stats; in efx_ef10_update_stats_common()
1348 if (nic_data->datapath_caps & in efx_ef10_update_stats_common()
1397 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_try_update_nic_stats_pf() local
1400 u64 *stats = nic_data->stats; in efx_ef10_try_update_nic_stats_pf()
1406 nic_data = efx->nic_data; in efx_ef10_try_update_nic_stats_pf()
1452 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_try_update_nic_stats_vf() local
1455 u64 *stats = nic_data->stats; in efx_ef10_try_update_nic_stats_vf()
1585 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_request() local
1586 u8 *pdu = nic_data->mcdi_buf.addr; in efx_ef10_mcdi_request()
1598 _efx_writed(efx, cpu_to_le32((u64)nic_data->mcdi_buf.dma_addr >> 32), in efx_ef10_mcdi_request()
1600 _efx_writed(efx, cpu_to_le32((u32)nic_data->mcdi_buf.dma_addr), in efx_ef10_mcdi_request()
1606 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_poll_response() local
1607 const efx_dword_t hdr = *(const efx_dword_t *)nic_data->mcdi_buf.addr; in efx_ef10_mcdi_poll_response()
1617 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_read_response() local
1618 const u8 *pdu = nic_data->mcdi_buf.addr; in efx_ef10_mcdi_read_response()
1625 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_reboot_detected() local
1631 nic_data->must_check_datapath_caps = true; in efx_ef10_mcdi_reboot_detected()
1636 nic_data->stats[EF10_STAT_port_rx_bad_bytes] = 0; in efx_ef10_mcdi_reboot_detected()
1641 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_poll_reboot() local
1654 if (rc == nic_data->warm_boot_count) in efx_ef10_mcdi_poll_reboot()
1657 nic_data->warm_boot_count = rc; in efx_ef10_mcdi_poll_reboot()
1765 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_tx_init() local
1781 MCDI_SET_DWORD(inbuf, INIT_TXQ_IN_PORT_ID, nic_data->vport_id); in efx_ef10_tx_init()
1915 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_alloc_rss_context() local
1934 nic_data->vport_id); in efx_ef10_alloc_rss_context()
2003 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_rx_free_indir_table() local
2005 if (nic_data->rx_rss_context != EFX_EF10_RSS_CONTEXT_INVALID) in efx_ef10_rx_free_indir_table()
2006 efx_ef10_free_rss_context(efx, nic_data->rx_rss_context); in efx_ef10_rx_free_indir_table()
2007 nic_data->rx_rss_context = EFX_EF10_RSS_CONTEXT_INVALID; in efx_ef10_rx_free_indir_table()
2014 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_rx_push_shared_rss_config() local
2021 nic_data->rx_rss_context = new_rx_rss_context; in efx_ef10_rx_push_shared_rss_config()
2022 nic_data->rx_rss_context_exclusive = false; in efx_ef10_rx_push_shared_rss_config()
2030 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_rx_push_exclusive_rss_config() local
2034 if (nic_data->rx_rss_context == EFX_EF10_RSS_CONTEXT_INVALID || in efx_ef10_rx_push_exclusive_rss_config()
2035 !nic_data->rx_rss_context_exclusive) { in efx_ef10_rx_push_exclusive_rss_config()
2043 new_rx_rss_context = nic_data->rx_rss_context; in efx_ef10_rx_push_exclusive_rss_config()
2051 if (nic_data->rx_rss_context != new_rx_rss_context) in efx_ef10_rx_push_exclusive_rss_config()
2053 nic_data->rx_rss_context = new_rx_rss_context; in efx_ef10_rx_push_exclusive_rss_config()
2054 nic_data->rx_rss_context_exclusive = true; in efx_ef10_rx_push_exclusive_rss_config()
2061 if (new_rx_rss_context != nic_data->rx_rss_context) in efx_ef10_rx_push_exclusive_rss_config()
2116 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_vf_rx_push_rss_config() local
2120 if (nic_data->rx_rss_context != EFX_EF10_RSS_CONTEXT_INVALID) in efx_ef10_vf_rx_push_rss_config()
2141 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_rx_init() local
2160 MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_PORT_ID, nic_data->vport_id); in efx_ef10_rx_init()
2320 struct efx_ef10_nic_data *nic_data; in efx_ef10_ev_init() local
2328 nic_data = efx->nic_data; in efx_ef10_ev_init()
2330 !!(nic_data->datapath_caps & in efx_ef10_ev_init()
2373 nic_data->workaround_26807 = false; in efx_ef10_ev_init()
2378 nic_data->workaround_26807 = in efx_ef10_ev_init()
2382 !nic_data->workaround_26807) { in efx_ef10_ev_init()
2395 ++nic_data->warm_boot_count; in efx_ef10_ev_init()
2397 nic_data->workaround_26807 = true; in efx_ef10_ev_init()
2497 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_handle_rx_event() local
2515 if (!(nic_data->datapath_caps & in efx_ef10_handle_rx_event()
2805 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_fini_dmaq() local
2814 if (nic_data->must_realloc_vis) { in efx_ef10_fini_dmaq()
2924 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_push_prep() local
2975 MCDI_SET_DWORD(inbuf, FILTER_OP_IN_PORT_ID, nic_data->vport_id); in efx_ef10_filter_push_prep()
2994 spec->rss_context : nic_data->rx_rss_context); in efx_ef10_filter_push_prep()
3769 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_table_restore() local
3777 if (!nic_data->must_restore_filters) in efx_ef10_filter_table_restore()
3815 nic_data->must_restore_filters = false; in efx_ef10_filter_table_restore()
4018 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_insert_def() local
4040 if (!nic_data->workaround_26807) { in efx_ef10_filter_insert_def()
4096 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_vport_set_mac_address() local
4101 if (is_zero_ether_addr(nic_data->vport_mac)) in efx_ef10_vport_set_mac_address()
4110 rc = efx_ef10_vadaptor_free(efx, nic_data->vport_id); in efx_ef10_vport_set_mac_address()
4114 ether_addr_copy(mac_old, nic_data->vport_mac); in efx_ef10_vport_set_mac_address()
4115 rc = efx_ef10_vport_del_mac(efx, nic_data->vport_id, in efx_ef10_vport_set_mac_address()
4116 nic_data->vport_mac); in efx_ef10_vport_set_mac_address()
4120 rc = efx_ef10_vport_add_mac(efx, nic_data->vport_id, in efx_ef10_vport_set_mac_address()
4123 ether_addr_copy(nic_data->vport_mac, efx->net_dev->dev_addr); in efx_ef10_vport_set_mac_address()
4125 rc2 = efx_ef10_vport_add_mac(efx, nic_data->vport_id, mac_old); in efx_ef10_vport_set_mac_address()
4128 eth_zero_addr(nic_data->vport_mac); in efx_ef10_vport_set_mac_address()
4134 rc2 = efx_ef10_vadaptor_alloc(efx, nic_data->vport_id); in efx_ef10_vport_set_mac_address()
4166 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_sync_rx_mode() local
4203 if (nic_data->workaround_26807 && efx->mc_promisc != mc_promisc) in efx_ef10_filter_sync_rx_mode()
4206 if (nic_data->workaround_26807) { in efx_ef10_filter_sync_rx_mode()
4230 if (nic_data->workaround_26807) in efx_ef10_filter_sync_rx_mode()
4244 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_set_mac_address() local
4256 nic_data->vport_id); in efx_ef10_set_mac_address()
4277 nic_data->vf_index, in efx_ef10_set_mac_address()
4281 struct efx_ef10_nic_data *nic_data = efx_pf->nic_data; in efx_ef10_set_mac_address() local
4288 struct ef10_vf *vf = nic_data->vf + i; in efx_ef10_set_mac_address()