Lines Matching refs:nic_data

101 	struct efx_ef10_nic_data *nic_data = efx->nic_data;  in efx_ef10_init_datapath_caps()  local
117 nic_data->datapath_caps = in efx_ef10_init_datapath_caps()
120 if (!(nic_data->datapath_caps & in efx_ef10_init_datapath_caps()
127 if (!(nic_data->datapath_caps & in efx_ef10_init_datapath_caps()
172 struct efx_ef10_nic_data *nic_data; in efx_ef10_probe() local
186 nic_data = kzalloc(sizeof(*nic_data), GFP_KERNEL); in efx_ef10_probe()
187 if (!nic_data) in efx_ef10_probe()
189 efx->nic_data = nic_data; in efx_ef10_probe()
191 rc = efx_nic_alloc_buffer(efx, &nic_data->mcdi_buf, in efx_ef10_probe()
208 nic_data->warm_boot_count = rc; in efx_ef10_probe()
210 nic_data->rx_rss_context = EFX_EF10_RSS_CONTEXT_INVALID; in efx_ef10_probe()
257 nic_data->workaround_35388 = true; in efx_ef10_probe()
262 nic_data->workaround_35388 ? "en" : "dis"); in efx_ef10_probe()
275 efx_nic_free_buffer(efx, &nic_data->mcdi_buf); in efx_ef10_probe()
277 kfree(nic_data); in efx_ef10_probe()
278 efx->nic_data = NULL; in efx_ef10_probe()
302 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_free_piobufs() local
309 for (i = 0; i < nic_data->n_piobufs; i++) { in efx_ef10_free_piobufs()
311 nic_data->piobuf_handle[i]); in efx_ef10_free_piobufs()
317 nic_data->n_piobufs = 0; in efx_ef10_free_piobufs()
322 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_alloc_piobufs() local
339 nic_data->piobuf_handle[i] = in efx_ef10_alloc_piobufs()
343 nic_data->piobuf_handle[i]); in efx_ef10_alloc_piobufs()
346 nic_data->n_piobufs = i; in efx_ef10_alloc_piobufs()
354 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_link_piobufs() local
367 for (index = 0; index < nic_data->n_piobufs; ++index) { in efx_ef10_link_piobufs()
369 nic_data->piobuf_handle[index]); in efx_ef10_link_piobufs()
371 nic_data->pio_write_vi_base + index); in efx_ef10_link_piobufs()
378 nic_data->pio_write_vi_base + index, index, in efx_ef10_link_piobufs()
384 nic_data->pio_write_vi_base + index, index); in efx_ef10_link_piobufs()
405 if (tx_queue->queue == nic_data->pio_write_vi_base) { in efx_ef10_link_piobufs()
411 nic_data->piobuf_handle[index]); in efx_ef10_link_piobufs()
430 nic_data->pio_write_base + in efx_ef10_link_piobufs()
447 nic_data->pio_write_vi_base + index); in efx_ef10_link_piobufs()
475 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_remove() local
484 if (nic_data->wc_membase) in efx_ef10_remove()
485 iounmap(nic_data->wc_membase); in efx_ef10_remove()
490 if (!nic_data->must_restore_piobufs) in efx_ef10_remove()
494 efx_nic_free_buffer(efx, &nic_data->mcdi_buf); in efx_ef10_remove()
495 kfree(nic_data); in efx_ef10_remove()
503 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_alloc_vis() local
520 nic_data->vi_base = MCDI_DWORD(outbuf, ALLOC_VIS_OUT_VI_BASE); in efx_ef10_alloc_vis()
521 nic_data->n_allocated_vis = MCDI_DWORD(outbuf, ALLOC_VIS_OUT_VI_COUNT); in efx_ef10_alloc_vis()
530 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_dimension_resources() local
561 nic_data->n_piobufs = 0; in efx_ef10_dimension_resources()
576 if (nic_data->n_piobufs) { in efx_ef10_dimension_resources()
582 nic_data->n_piobufs) * in efx_ef10_dimension_resources()
585 max_vis = pio_write_vi_base + nic_data->n_piobufs; in efx_ef10_dimension_resources()
604 if (nic_data->n_piobufs && in efx_ef10_dimension_resources()
605 nic_data->n_allocated_vis < in efx_ef10_dimension_resources()
606 pio_write_vi_base + nic_data->n_piobufs) { in efx_ef10_dimension_resources()
609 nic_data->n_allocated_vis, nic_data->n_piobufs); in efx_ef10_dimension_resources()
626 nic_data->wc_membase = ioremap_wc(efx->membase_phys + in efx_ef10_dimension_resources()
629 if (!nic_data->wc_membase) { in efx_ef10_dimension_resources()
635 nic_data->pio_write_vi_base = pio_write_vi_base; in efx_ef10_dimension_resources()
636 nic_data->pio_write_base = in efx_ef10_dimension_resources()
637 nic_data->wc_membase + in efx_ef10_dimension_resources()
649 nic_data->wc_membase, wc_mem_map_size); in efx_ef10_dimension_resources()
656 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_init_nic() local
659 if (nic_data->must_check_datapath_caps) { in efx_ef10_init_nic()
663 nic_data->must_check_datapath_caps = false; in efx_ef10_init_nic()
666 if (nic_data->must_realloc_vis) { in efx_ef10_init_nic()
668 rc = efx_ef10_alloc_vis(efx, nic_data->n_allocated_vis, in efx_ef10_init_nic()
669 nic_data->n_allocated_vis); in efx_ef10_init_nic()
672 nic_data->must_realloc_vis = false; in efx_ef10_init_nic()
675 if (nic_data->must_restore_piobufs && nic_data->n_piobufs) { in efx_ef10_init_nic()
676 rc = efx_ef10_alloc_piobufs(efx, nic_data->n_piobufs); in efx_ef10_init_nic()
687 nic_data->must_restore_piobufs = false; in efx_ef10_init_nic()
696 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_reset_mc_allocations() local
699 nic_data->must_realloc_vis = true; in efx_ef10_reset_mc_allocations()
700 nic_data->must_restore_filters = true; in efx_ef10_reset_mc_allocations()
701 nic_data->must_restore_piobufs = true; in efx_ef10_reset_mc_allocations()
702 nic_data->rx_rss_context = EFX_EF10_RSS_CONTEXT_INVALID; in efx_ef10_reset_mc_allocations()
895 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_raw_stat_mask() local
902 if (nic_data->datapath_caps & in efx_ef10_raw_stat_mask()
932 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_try_update_nic_stats() local
935 u64 *stats = nic_data->stats; in efx_ef10_try_update_nic_stats()
941 nic_data = efx->nic_data; in efx_ef10_try_update_nic_stats()
970 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_update_stats() local
971 u64 *stats = nic_data->stats; in efx_ef10_update_stats()
1065 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_request() local
1066 u8 *pdu = nic_data->mcdi_buf.addr; in efx_ef10_mcdi_request()
1078 _efx_writed(efx, cpu_to_le32((u64)nic_data->mcdi_buf.dma_addr >> 32), in efx_ef10_mcdi_request()
1080 _efx_writed(efx, cpu_to_le32((u32)nic_data->mcdi_buf.dma_addr), in efx_ef10_mcdi_request()
1086 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_poll_response() local
1087 const efx_dword_t hdr = *(const efx_dword_t *)nic_data->mcdi_buf.addr; in efx_ef10_mcdi_poll_response()
1097 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_read_response() local
1098 const u8 *pdu = nic_data->mcdi_buf.addr; in efx_ef10_mcdi_read_response()
1105 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_poll_reboot() local
1118 if (rc == nic_data->warm_boot_count) in efx_ef10_mcdi_poll_reboot()
1121 nic_data->warm_boot_count = rc; in efx_ef10_mcdi_poll_reboot()
1127 nic_data->must_check_datapath_caps = true; in efx_ef10_mcdi_poll_reboot()
1132 nic_data->stats[EF10_STAT_rx_bad_bytes] = 0; in efx_ef10_mcdi_poll_reboot()
1458 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_rx_free_indir_table() local
1460 if (nic_data->rx_rss_context != EFX_EF10_RSS_CONTEXT_INVALID) in efx_ef10_rx_free_indir_table()
1461 efx_ef10_free_rss_context(efx, nic_data->rx_rss_context); in efx_ef10_rx_free_indir_table()
1462 nic_data->rx_rss_context = EFX_EF10_RSS_CONTEXT_INVALID; in efx_ef10_rx_free_indir_table()
1467 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_rx_push_rss_config() local
1472 if (nic_data->rx_rss_context == EFX_EF10_RSS_CONTEXT_INVALID) { in efx_ef10_rx_push_rss_config()
1473 rc = efx_ef10_alloc_rss_context(efx, &nic_data->rx_rss_context); in efx_ef10_rx_push_rss_config()
1478 rc = efx_ef10_populate_rss_table(efx, nic_data->rx_rss_context); in efx_ef10_rx_push_rss_config()
1659 struct efx_ef10_nic_data *nic_data; in efx_ef10_ev_init() local
1666 nic_data = efx->nic_data; in efx_ef10_ev_init()
1668 !!(nic_data->datapath_caps & in efx_ef10_ev_init()
1813 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_handle_rx_event() local
1831 if (!(nic_data->datapath_caps & in efx_ef10_handle_rx_event()
2121 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_fini_dmaq() local
2130 if (nic_data->must_realloc_vis) { in efx_ef10_fini_dmaq()
2240 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_push_prep() local
2309 spec->rss_context : nic_data->rx_rss_context); in efx_ef10_filter_push_prep()
3063 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_table_restore() local
3069 if (!nic_data->must_restore_filters) in efx_ef10_filter_table_restore()
3104 nic_data->must_restore_filters = false; in efx_ef10_filter_table_restore()