Lines Matching refs:nic_data
21 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_evb_port_assign() local
25 EVB_PORT_ASSIGN_IN_PF, nic_data->pf_index, in efx_ef10_evb_port_assign()
117 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_sriov_free_vf_vports() local
120 if (!nic_data->vf) in efx_ef10_sriov_free_vf_vports()
124 struct ef10_vf *vf = nic_data->vf + i; in efx_ef10_sriov_free_vf_vports()
152 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_sriov_free_vf_vswitching() local
155 kfree(nic_data->vf); in efx_ef10_sriov_free_vf_vswitching()
156 nic_data->vf = NULL; in efx_ef10_sriov_free_vf_vswitching()
162 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_sriov_assign_vf_vport() local
163 struct ef10_vf *vf = nic_data->vf + vf_i; in efx_ef10_sriov_assign_vf_vport()
166 if (WARN_ON_ONCE(!nic_data->vf)) in efx_ef10_sriov_assign_vf_vport()
191 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_sriov_alloc_vf_vswitching() local
195 nic_data->vf = kcalloc(efx->vf_count, sizeof(struct ef10_vf), in efx_ef10_sriov_alloc_vf_vswitching()
197 if (!nic_data->vf) in efx_ef10_sriov_alloc_vf_vswitching()
201 random_ether_addr(nic_data->vf[i].mac); in efx_ef10_sriov_alloc_vf_vswitching()
202 nic_data->vf[i].efx = NULL; in efx_ef10_sriov_alloc_vf_vswitching()
203 nic_data->vf[i].vlan = EFX_EF10_NO_VLAN; in efx_ef10_sriov_alloc_vf_vswitching()
213 kfree(nic_data->vf); in efx_ef10_sriov_alloc_vf_vswitching()
214 nic_data->vf = NULL; in efx_ef10_sriov_alloc_vf_vswitching()
240 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_vswitching_probe_pf() local
246 efx_ef10_vadaptor_alloc(efx, nic_data->vport_id); in efx_ef10_vswitching_probe_pf()
257 EFX_EF10_NO_VLAN, &nic_data->vport_id); in efx_ef10_vswitching_probe_pf()
261 rc = efx_ef10_vport_add_mac(efx, nic_data->vport_id, net_dev->dev_addr); in efx_ef10_vswitching_probe_pf()
264 ether_addr_copy(nic_data->vport_mac, net_dev->dev_addr); in efx_ef10_vswitching_probe_pf()
266 rc = efx_ef10_vadaptor_alloc(efx, nic_data->vport_id); in efx_ef10_vswitching_probe_pf()
272 efx_ef10_vport_del_mac(efx, nic_data->vport_id, nic_data->vport_mac); in efx_ef10_vswitching_probe_pf()
273 eth_zero_addr(nic_data->vport_mac); in efx_ef10_vswitching_probe_pf()
275 efx_ef10_vport_free(efx, nic_data->vport_id); in efx_ef10_vswitching_probe_pf()
276 nic_data->vport_id = EVB_PORT_ID_ASSIGNED; in efx_ef10_vswitching_probe_pf()
285 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_vswitching_probe_vf() local
287 return efx_ef10_vadaptor_alloc(efx, nic_data->vport_id); in efx_ef10_vswitching_probe_vf()
292 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_vswitching_restore_pf() local
295 if (!nic_data->must_probe_vswitching) in efx_ef10_vswitching_restore_pf()
306 nic_data->must_probe_vswitching = false; in efx_ef10_vswitching_restore_pf()
313 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_vswitching_restore_vf() local
316 if (!nic_data->must_probe_vswitching) in efx_ef10_vswitching_restore_vf()
323 nic_data->must_probe_vswitching = false; in efx_ef10_vswitching_restore_vf()
329 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_vswitching_remove_pf() local
333 efx_ef10_vadaptor_free(efx, nic_data->vport_id); in efx_ef10_vswitching_remove_pf()
335 if (nic_data->vport_id == EVB_PORT_ID_ASSIGNED) in efx_ef10_vswitching_remove_pf()
338 if (!is_zero_ether_addr(nic_data->vport_mac)) { in efx_ef10_vswitching_remove_pf()
339 efx_ef10_vport_del_mac(efx, nic_data->vport_id, in efx_ef10_vswitching_remove_pf()
341 eth_zero_addr(nic_data->vport_mac); in efx_ef10_vswitching_remove_pf()
343 efx_ef10_vport_free(efx, nic_data->vport_id); in efx_ef10_vswitching_remove_pf()
344 nic_data->vport_id = EVB_PORT_ID_ASSIGNED; in efx_ef10_vswitching_remove_pf()
348 efx_ef10_vswitch_free(efx, nic_data->vport_id); in efx_ef10_vswitching_remove_pf()
417 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_sriov_fini() local
421 if (!nic_data->vf) { in efx_ef10_sriov_fini()
430 struct efx_nic *vf_efx = nic_data->vf[i].efx; in efx_ef10_sriov_fini()
463 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_sriov_set_vf_mac() local
467 if (!nic_data->vf) in efx_ef10_sriov_set_vf_mac()
472 vf = nic_data->vf + vf_i; in efx_ef10_sriov_set_vf_mac()
537 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_sriov_set_vf_vlan() local
547 vf = nic_data->vf + vf_i; in efx_ef10_sriov_set_vf_vlan()
674 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_sriov_set_vf_link_state() local
684 nic_data->pf_index, in efx_ef10_sriov_set_vf_link_state()
697 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_sriov_get_vf_config() local
705 if (!nic_data->vf) in efx_ef10_sriov_get_vf_config()
708 vf = nic_data->vf + vf_i; in efx_ef10_sriov_get_vf_config()
719 nic_data->pf_index, in efx_ef10_sriov_get_vf_config()
737 struct efx_ef10_nic_data *nic_data = efx->nic_data; in efx_ef10_sriov_get_phys_port_id() local
739 if (!is_valid_ether_addr(nic_data->port_id)) in efx_ef10_sriov_get_phys_port_id()
743 memcpy(ppid->id, nic_data->port_id, ppid->id_len); in efx_ef10_sriov_get_phys_port_id()