Lines Matching refs:nic_data

194 	struct efx_ef10_nic_data *nic_data = efx->nic_data;  in efx_ef10_get_pf_index()  local
205 nic_data->pf_index = MCDI_DWORD(outbuf, GET_FUNCTION_INFO_OUT_PF); in efx_ef10_get_pf_index()
213 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_get_vf_index() local
224 nic_data->vf_index = MCDI_DWORD(outbuf, GET_FUNCTION_INFO_OUT_VF); in efx_ef10_get_vf_index()
232 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_init_datapath_caps() local
248 nic_data->datapath_caps = in efx_ef10_init_datapath_caps()
252 nic_data->datapath_caps2 = MCDI_DWORD(outbuf, in efx_ef10_init_datapath_caps()
254 nic_data->piobuf_size = MCDI_WORD(outbuf, in efx_ef10_init_datapath_caps()
257 nic_data->datapath_caps2 = 0; in efx_ef10_init_datapath_caps()
258 nic_data->piobuf_size = ER_DZ_TX_PIOBUF_SIZE; in efx_ef10_init_datapath_caps()
263 nic_data->rx_dpcpu_fw_id = in efx_ef10_init_datapath_caps()
265 nic_data->tx_dpcpu_fw_id = in efx_ef10_init_datapath_caps()
268 if (!(nic_data->datapath_caps & in efx_ef10_init_datapath_caps()
324 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_read_licensed_features() local
335 nic_data->licensed_features = MCDI_QWORD(outbuf, in efx_ef10_read_licensed_features()
354 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_get_timer_workarounds() local
359 nic_data->workaround_35388 = false; in efx_ef10_get_timer_workarounds()
360 nic_data->workaround_61265 = false; in efx_ef10_get_timer_workarounds()
370 nic_data->workaround_61265 = true; in efx_ef10_get_timer_workarounds()
373 nic_data->workaround_35388 = true; in efx_ef10_get_timer_workarounds()
382 nic_data->workaround_35388 = true; in efx_ef10_get_timer_workarounds()
390 nic_data->workaround_35388 ? "en" : "dis"); in efx_ef10_get_timer_workarounds()
393 nic_data->workaround_61265 ? "en" : "dis"); in efx_ef10_get_timer_workarounds()
536 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_find_vlan() local
539 WARN_ON(!mutex_is_locked(&nic_data->vlan_lock)); in efx_ef10_find_vlan()
541 list_for_each_entry(vlan, &nic_data->vlan_list, list) { in efx_ef10_find_vlan()
551 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_add_vlan() local
555 mutex_lock(&nic_data->vlan_lock); in efx_ef10_add_vlan()
577 list_add_tail(&vlan->list, &nic_data->vlan_list); in efx_ef10_add_vlan()
590 mutex_unlock(&nic_data->vlan_lock); in efx_ef10_add_vlan()
598 mutex_unlock(&nic_data->vlan_lock); in efx_ef10_add_vlan()
605 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_del_vlan_internal() local
607 WARN_ON(!mutex_is_locked(&nic_data->vlan_lock)); in efx_ef10_del_vlan_internal()
621 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_del_vlan() local
632 mutex_lock(&nic_data->vlan_lock); in efx_ef10_del_vlan()
643 mutex_unlock(&nic_data->vlan_lock); in efx_ef10_del_vlan()
650 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_cleanup_vlans() local
653 mutex_lock(&nic_data->vlan_lock); in efx_ef10_cleanup_vlans()
654 list_for_each_entry_safe(vlan, next_vlan, &nic_data->vlan_list, list) in efx_ef10_cleanup_vlans()
656 mutex_unlock(&nic_data->vlan_lock); in efx_ef10_cleanup_vlans()
665 struct efx_ef10_nic_data *nic_data; in efx_ef10_probe() local
668 nic_data = kzalloc(sizeof(*nic_data), GFP_KERNEL); in efx_ef10_probe()
669 if (!nic_data) in efx_ef10_probe()
671 efx->nic_data = nic_data; in efx_ef10_probe()
676 rc = efx_nic_alloc_buffer(efx, &nic_data->mcdi_buf, in efx_ef10_probe()
693 nic_data->warm_boot_count = rc; in efx_ef10_probe()
697 nic_data->vport_id = EVB_PORT_ID_ASSIGNED; in efx_ef10_probe()
710 mutex_init(&nic_data->udp_tunnels_lock); in efx_ef10_probe()
758 if (nic_data->datapath_caps & in efx_ef10_probe()
786 efx_pf->type->get_mac_address(efx_pf, nic_data->port_id); in efx_ef10_probe()
789 ether_addr_copy(nic_data->port_id, efx->net_dev->perm_addr); in efx_ef10_probe()
791 INIT_LIST_HEAD(&nic_data->vlan_list); in efx_ef10_probe()
792 mutex_init(&nic_data->vlan_lock); in efx_ef10_probe()
812 mutex_destroy(&nic_data->vlan_lock); in efx_ef10_probe()
822 mutex_lock(&nic_data->udp_tunnels_lock); in efx_ef10_probe()
823 memset(nic_data->udp_tunnels, 0, sizeof(nic_data->udp_tunnels)); in efx_ef10_probe()
825 mutex_unlock(&nic_data->udp_tunnels_lock); in efx_ef10_probe()
826 mutex_destroy(&nic_data->udp_tunnels_lock); in efx_ef10_probe()
830 efx_nic_free_buffer(efx, &nic_data->mcdi_buf); in efx_ef10_probe()
832 kfree(nic_data); in efx_ef10_probe()
833 efx->nic_data = NULL; in efx_ef10_probe()
857 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_free_piobufs() local
864 for (i = 0; i < nic_data->n_piobufs; i++) { in efx_ef10_free_piobufs()
866 nic_data->piobuf_handle[i]); in efx_ef10_free_piobufs()
872 nic_data->n_piobufs = 0; in efx_ef10_free_piobufs()
877 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_alloc_piobufs() local
901 nic_data->piobuf_handle[i] = in efx_ef10_alloc_piobufs()
905 nic_data->piobuf_handle[i]); in efx_ef10_alloc_piobufs()
908 nic_data->n_piobufs = i; in efx_ef10_alloc_piobufs()
916 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_link_piobufs() local
927 for (index = 0; index < nic_data->n_piobufs; ++index) { in efx_ef10_link_piobufs()
929 nic_data->piobuf_handle[index]); in efx_ef10_link_piobufs()
931 nic_data->pio_write_vi_base + index); in efx_ef10_link_piobufs()
938 nic_data->pio_write_vi_base + index, index, in efx_ef10_link_piobufs()
944 nic_data->pio_write_vi_base + index, index); in efx_ef10_link_piobufs()
962 index = offset / nic_data->piobuf_size; in efx_ef10_link_piobufs()
963 offset = offset % nic_data->piobuf_size; in efx_ef10_link_piobufs()
970 if (tx_queue->queue == nic_data->pio_write_vi_base) { in efx_ef10_link_piobufs()
976 nic_data->piobuf_handle[index]); in efx_ef10_link_piobufs()
995 nic_data->pio_write_base + in efx_ef10_link_piobufs()
1016 nic_data->pio_write_vi_base + index); in efx_ef10_link_piobufs()
1059 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_remove() local
1072 nic_data_pf = efx_pf->nic_data; in efx_ef10_remove()
1073 vf = nic_data_pf->vf + nic_data->vf_index; in efx_ef10_remove()
1082 mutex_destroy(&nic_data->vlan_lock); in efx_ef10_remove()
1090 if (nic_data->wc_membase) in efx_ef10_remove()
1091 iounmap(nic_data->wc_membase); in efx_ef10_remove()
1096 if (!nic_data->must_restore_piobufs) in efx_ef10_remove()
1104 memset(nic_data->udp_tunnels, 0, sizeof(nic_data->udp_tunnels)); in efx_ef10_remove()
1105 mutex_lock(&nic_data->udp_tunnels_lock); in efx_ef10_remove()
1107 mutex_unlock(&nic_data->udp_tunnels_lock); in efx_ef10_remove()
1109 mutex_destroy(&nic_data->udp_tunnels_lock); in efx_ef10_remove()
1112 efx_nic_free_buffer(efx, &nic_data->mcdi_buf); in efx_ef10_remove()
1113 kfree(nic_data); in efx_ef10_remove()
1125 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_vadaptor_query() local
1131 if (nic_data->datapath_caps & in efx_ef10_vadaptor_query()
1215 struct efx_ef10_nic_data *nic_data_pf = efx_pf->nic_data; in efx_ef10_probe_vf()
1237 struct efx_ef10_nic_data *nic_data_p = efx_pf->nic_data; in efx_ef10_probe_vf()
1238 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_probe_vf() local
1240 nic_data_p->vf[nic_data->vf_index].efx = efx; in efx_ef10_probe_vf()
1241 nic_data_p->vf[nic_data->vf_index].pci_dev = in efx_ef10_probe_vf()
1266 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_alloc_vis() local
1283 nic_data->vi_base = MCDI_DWORD(outbuf, ALLOC_VIS_OUT_VI_BASE); in efx_ef10_alloc_vis()
1284 nic_data->n_allocated_vis = MCDI_DWORD(outbuf, ALLOC_VIS_OUT_VI_COUNT); in efx_ef10_alloc_vis()
1293 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_dimension_resources() local
1313 nic_data->piobuf_size / efx_piobuf_size * EF10_TX_PIOBUF_COUNT >= in efx_ef10_dimension_resources()
1317 nic_data->piobuf_size / efx_piobuf_size); in efx_ef10_dimension_resources()
1334 nic_data->n_piobufs = 0; in efx_ef10_dimension_resources()
1349 if (nic_data->n_piobufs) { in efx_ef10_dimension_resources()
1355 nic_data->n_piobufs) * in efx_ef10_dimension_resources()
1358 max_vis = pio_write_vi_base + nic_data->n_piobufs; in efx_ef10_dimension_resources()
1374 if (nic_data->n_allocated_vis < channel_vis) { in efx_ef10_dimension_resources()
1383 efx->max_channels = nic_data->n_allocated_vis; in efx_ef10_dimension_resources()
1385 nic_data->n_allocated_vis / EFX_TXQ_TYPES; in efx_ef10_dimension_resources()
1394 if (nic_data->n_piobufs && in efx_ef10_dimension_resources()
1395 nic_data->n_allocated_vis < in efx_ef10_dimension_resources()
1396 pio_write_vi_base + nic_data->n_piobufs) { in efx_ef10_dimension_resources()
1399 nic_data->n_allocated_vis, nic_data->n_piobufs); in efx_ef10_dimension_resources()
1416 nic_data->wc_membase = ioremap_wc(efx->membase_phys + in efx_ef10_dimension_resources()
1419 if (!nic_data->wc_membase) { in efx_ef10_dimension_resources()
1425 nic_data->pio_write_vi_base = pio_write_vi_base; in efx_ef10_dimension_resources()
1426 nic_data->pio_write_base = in efx_ef10_dimension_resources()
1427 nic_data->wc_membase + in efx_ef10_dimension_resources()
1439 nic_data->wc_membase, wc_mem_map_size); in efx_ef10_dimension_resources()
1446 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_init_nic() local
1449 if (nic_data->must_check_datapath_caps) { in efx_ef10_init_nic()
1453 nic_data->must_check_datapath_caps = false; in efx_ef10_init_nic()
1456 if (nic_data->must_realloc_vis) { in efx_ef10_init_nic()
1458 rc = efx_ef10_alloc_vis(efx, nic_data->n_allocated_vis, in efx_ef10_init_nic()
1459 nic_data->n_allocated_vis); in efx_ef10_init_nic()
1462 nic_data->must_realloc_vis = false; in efx_ef10_init_nic()
1465 if (nic_data->must_restore_piobufs && nic_data->n_piobufs) { in efx_ef10_init_nic()
1466 rc = efx_ef10_alloc_piobufs(efx, nic_data->n_piobufs); in efx_ef10_init_nic()
1483 nic_data->must_restore_piobufs = false; in efx_ef10_init_nic()
1495 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_reset_mc_allocations() local
1501 nic_data->must_realloc_vis = true; in efx_ef10_reset_mc_allocations()
1502 nic_data->must_restore_rss_contexts = true; in efx_ef10_reset_mc_allocations()
1503 nic_data->must_restore_filters = true; in efx_ef10_reset_mc_allocations()
1504 nic_data->must_restore_piobufs = true; in efx_ef10_reset_mc_allocations()
1509 nic_data->must_probe_vswitching = true; in efx_ef10_reset_mc_allocations()
1510 nic_data->vport_id = EVB_PORT_ID_ASSIGNED; in efx_ef10_reset_mc_allocations()
1512 if (nic_data->vf) in efx_ef10_reset_mc_allocations()
1514 nic_data->vf[i].vport_id = 0; in efx_ef10_reset_mc_allocations()
1800 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_raw_stat_mask() local
1809 if (nic_data->datapath_caps2 & in efx_ef10_raw_stat_mask()
1816 if (nic_data->datapath_caps & in efx_ef10_raw_stat_mask()
1825 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_get_stat_mask() local
1831 if (nic_data->datapath_caps & in efx_ef10_get_stat_mask()
1847 (nic_data->datapath_caps2 & in efx_ef10_get_stat_mask()
1876 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_update_stats_common() local
1877 u64 *stats = nic_data->stats; in efx_ef10_update_stats_common()
1894 if (nic_data->datapath_caps & in efx_ef10_update_stats_common()
1943 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_try_update_nic_stats_pf() local
1946 u64 *stats = nic_data->stats; in efx_ef10_try_update_nic_stats_pf()
1997 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_try_update_nic_stats_vf() local
2000 u64 *stats = nic_data->stats; in efx_ef10_try_update_nic_stats_vf()
2147 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_request() local
2148 u8 *pdu = nic_data->mcdi_buf.addr; in efx_ef10_mcdi_request()
2160 _efx_writed(efx, cpu_to_le32((u64)nic_data->mcdi_buf.dma_addr >> 32), in efx_ef10_mcdi_request()
2162 _efx_writed(efx, cpu_to_le32((u32)nic_data->mcdi_buf.dma_addr), in efx_ef10_mcdi_request()
2168 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_poll_response() local
2169 const efx_dword_t hdr = *(const efx_dword_t *)nic_data->mcdi_buf.addr; in efx_ef10_mcdi_poll_response()
2179 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_read_response() local
2180 const u8 *pdu = nic_data->mcdi_buf.addr; in efx_ef10_mcdi_read_response()
2187 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_reboot_detected() local
2193 nic_data->must_check_datapath_caps = true; in efx_ef10_mcdi_reboot_detected()
2198 nic_data->stats[EF10_STAT_port_rx_bad_bytes] = 0; in efx_ef10_mcdi_reboot_detected()
2203 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_mcdi_poll_reboot() local
2216 if (rc == nic_data->warm_boot_count) in efx_ef10_mcdi_poll_reboot()
2219 nic_data->warm_boot_count = rc; in efx_ef10_mcdi_poll_reboot()
2397 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_tso_versions() local
2400 if (nic_data->datapath_caps & in efx_ef10_tso_versions()
2403 if (nic_data->datapath_caps2 & in efx_ef10_tso_versions()
2417 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_tx_init() local
2429 if (!(nic_data->licensed_features & in efx_ef10_tx_init()
2442 if (csum_offload && (nic_data->datapath_caps2 & in efx_ef10_tx_init()
2455 MCDI_SET_DWORD(inbuf, INIT_TXQ_IN_PORT_ID, nic_data->vport_id); in efx_ef10_tx_init()
2517 } else if (nic_data->datapath_caps & in efx_ef10_tx_init()
2727 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_alloc_rss_context() local
2745 if (nic_data->datapath_caps & in efx_ef10_alloc_rss_context()
2750 nic_data->vport_id); in efx_ef10_alloc_rss_context()
2767 if (nic_data->datapath_caps & in efx_ef10_alloc_rss_context()
2836 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_rx_push_shared_rss_config() local
2843 nic_data->rx_rss_context_exclusive = false; in efx_ef10_rx_push_shared_rss_config()
2853 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_rx_push_exclusive_rss_config() local
2857 !nic_data->rx_rss_context_exclusive) { in efx_ef10_rx_push_exclusive_rss_config()
2874 nic_data->rx_rss_context_exclusive = true; in efx_ef10_rx_push_exclusive_rss_config()
2988 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_rx_restore_rss_contexts() local
2994 if (!nic_data->must_restore_rss_contexts) in efx_ef10_rx_restore_rss_contexts()
3010 nic_data->must_restore_rss_contexts = false; in efx_ef10_rx_restore_rss_contexts()
3091 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_rx_init() local
3110 MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_PORT_ID, nic_data->vport_id); in efx_ef10_rx_init()
3270 struct efx_ef10_nic_data *nic_data; in efx_ef10_ev_init() local
3277 nic_data = efx->nic_data; in efx_ef10_ev_init()
3294 if (nic_data->datapath_caps2 & in efx_ef10_ev_init()
3305 bool cut_thru = !(nic_data->datapath_caps & in efx_ef10_ev_init()
3342 nic_data->workaround_26807 = false; in efx_ef10_ev_init()
3347 nic_data->workaround_26807 = in efx_ef10_ev_init()
3351 !nic_data->workaround_26807) { in efx_ef10_ev_init()
3373 nic_data->warm_boot_count = rc; in efx_ef10_ev_init()
3377 nic_data->workaround_26807 = true; in efx_ef10_ev_init()
3541 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_handle_rx_event() local
3558 nic_data->datapath_caps & in efx_ef10_handle_rx_event()
3577 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_handle_rx_event() local
3595 if (!(nic_data->datapath_caps & in efx_ef10_handle_rx_event()
3960 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_fini_dmaq() local
3969 if (nic_data->must_realloc_vis) { in efx_ef10_fini_dmaq()
4155 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_push_prep() local
4179 MCDI_SET_DWORD(inbuf, FILTER_OP_IN_PORT_ID, nic_data->vport_id); in efx_ef10_filter_push_prep()
4296 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_insert_locked() local
4425 if (rc == -EINVAL && nic_data->must_realloc_vis) in efx_ef10_filter_insert_locked()
4962 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_table_probe() local
4982 if (nic_data->datapath_caps & in efx_ef10_filter_table_probe()
5014 list_for_each_entry(vlan, &nic_data->vlan_list, list) { in efx_ef10_filter_table_probe()
5036 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_table_restore() local
5048 if (!nic_data->must_restore_filters) in efx_ef10_filter_table_restore()
5126 nic_data->must_restore_filters = false; in efx_ef10_filter_table_restore()
5355 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_insert_def() local
5372 if (nic_data->datapath_caps & in efx_ef10_filter_insert_def()
5439 if (!nic_data->workaround_26807 && !encap_type) { in efx_ef10_filter_insert_def()
5532 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_vport_set_mac_address() local
5537 if (is_zero_ether_addr(nic_data->vport_mac)) in efx_ef10_vport_set_mac_address()
5546 rc = efx_ef10_vadaptor_free(efx, nic_data->vport_id); in efx_ef10_vport_set_mac_address()
5550 ether_addr_copy(mac_old, nic_data->vport_mac); in efx_ef10_vport_set_mac_address()
5551 rc = efx_ef10_vport_del_mac(efx, nic_data->vport_id, in efx_ef10_vport_set_mac_address()
5552 nic_data->vport_mac); in efx_ef10_vport_set_mac_address()
5556 rc = efx_ef10_vport_add_mac(efx, nic_data->vport_id, in efx_ef10_vport_set_mac_address()
5559 ether_addr_copy(nic_data->vport_mac, efx->net_dev->dev_addr); in efx_ef10_vport_set_mac_address()
5561 rc2 = efx_ef10_vport_add_mac(efx, nic_data->vport_id, mac_old); in efx_ef10_vport_set_mac_address()
5564 eth_zero_addr(nic_data->vport_mac); in efx_ef10_vport_set_mac_address()
5570 rc2 = efx_ef10_vadaptor_alloc(efx, nic_data->vport_id); in efx_ef10_vport_set_mac_address()
5603 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_filter_vlan_sync_rx_mode() local
5646 if (nic_data->workaround_26807 && in efx_ef10_filter_vlan_sync_rx_mode()
5650 if (nic_data->workaround_26807) { in efx_ef10_filter_vlan_sync_rx_mode()
5682 if (nic_data->workaround_26807) in efx_ef10_filter_vlan_sync_rx_mode()
5849 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_set_mac_address() local
5863 nic_data->vport_id); in efx_ef10_set_mac_address()
5886 nic_data->vf_index, in efx_ef10_set_mac_address()
5890 struct efx_ef10_nic_data *nic_data = efx_pf->nic_data; in efx_ef10_set_mac_address() local
5897 struct ef10_vf *vf = nic_data->vf + i; in efx_ef10_set_mac_address()
6277 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_get_phys_port_id() local
6279 if (!is_valid_ether_addr(nic_data->port_id)) in efx_ef10_get_phys_port_id()
6283 memcpy(ppid->id, nic_data->port_id, ppid->id_len); in efx_ef10_get_phys_port_id()
6311 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_set_udp_tnl_ports() local
6321 WARN_ON(!mutex_is_locked(&nic_data->udp_tunnels_lock)); in efx_ef10_set_udp_tnl_ports()
6323 nic_data->udp_tunnels_dirty = false; in efx_ef10_set_udp_tnl_ports()
6325 if (!(nic_data->datapath_caps & in efx_ef10_set_udp_tnl_ports()
6331 BUILD_BUG_ON(ARRAY_SIZE(nic_data->udp_tunnels) > in efx_ef10_set_udp_tnl_ports()
6334 for (i = 0; i < ARRAY_SIZE(nic_data->udp_tunnels); ++i) { in efx_ef10_set_udp_tnl_ports()
6335 if (nic_data->udp_tunnels[i].count && in efx_ef10_set_udp_tnl_ports()
6336 nic_data->udp_tunnels[i].port) { in efx_ef10_set_udp_tnl_ports()
6341 ntohs(nic_data->udp_tunnels[i].port), in efx_ef10_set_udp_tnl_ports()
6343 nic_data->udp_tunnels[i].type); in efx_ef10_set_udp_tnl_ports()
6371 nic_data->udp_tunnels_dirty = true; in efx_ef10_set_udp_tnl_ports()
6407 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_udp_tnl_push_ports() local
6410 mutex_lock(&nic_data->udp_tunnels_lock); in efx_ef10_udp_tnl_push_ports()
6411 if (nic_data->udp_tunnels_dirty) { in efx_ef10_udp_tnl_push_ports()
6418 mutex_unlock(&nic_data->udp_tunnels_lock); in efx_ef10_udp_tnl_push_ports()
6425 struct efx_ef10_nic_data *nic_data = efx->nic_data; in __efx_ef10_udp_tnl_lookup_port() local
6428 for (i = 0; i < ARRAY_SIZE(nic_data->udp_tunnels); ++i) { in __efx_ef10_udp_tnl_lookup_port()
6429 if (!nic_data->udp_tunnels[i].count) in __efx_ef10_udp_tnl_lookup_port()
6431 if (nic_data->udp_tunnels[i].port == port) in __efx_ef10_udp_tnl_lookup_port()
6432 return &nic_data->udp_tunnels[i]; in __efx_ef10_udp_tnl_lookup_port()
6440 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_udp_tnl_add_port() local
6446 if (!(nic_data->datapath_caps & in efx_ef10_udp_tnl_add_port()
6454 mutex_lock(&nic_data->udp_tunnels_lock); in efx_ef10_udp_tnl_add_port()
6479 for (i = 0; i < ARRAY_SIZE(nic_data->udp_tunnels); ++i) in efx_ef10_udp_tnl_add_port()
6480 if (!nic_data->udp_tunnels[i].count) { in efx_ef10_udp_tnl_add_port()
6481 nic_data->udp_tunnels[i] = tnl; in efx_ef10_udp_tnl_add_port()
6482 nic_data->udp_tunnels[i].count = 1; in efx_ef10_udp_tnl_add_port()
6494 mutex_unlock(&nic_data->udp_tunnels_lock); in efx_ef10_udp_tnl_add_port()
6505 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_udp_tnl_has_port() local
6507 if (!(nic_data->datapath_caps & in efx_ef10_udp_tnl_has_port()
6511 if (nic_data->udp_tunnels_dirty) in efx_ef10_udp_tnl_has_port()
6523 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_udp_tnl_del_port() local
6528 if (!(nic_data->datapath_caps & in efx_ef10_udp_tnl_del_port()
6536 mutex_lock(&nic_data->udp_tunnels_lock); in efx_ef10_udp_tnl_del_port()
6565 mutex_unlock(&nic_data->udp_tunnels_lock); in efx_ef10_udp_tnl_del_port()