summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/ef10.c
diff options
context:
space:
mode:
authorShradha Shah2015-05-06 01:58:54 +0200
committerDavid S. Miller2015-05-09 22:16:48 +0200
commit7b8c7b54f0070edb207add4777e68e4e79d7c3fe (patch)
tree7241e5767bf3c3e0b512400dbe1c12f2669bfb8f /drivers/net/ethernet/sfc/ef10.c
parentsfc: create vports for VFs and assign random MAC addresses (diff)
downloadkernel-qcow2-linux-7b8c7b54f0070edb207add4777e68e4e79d7c3fe.tar.gz
kernel-qcow2-linux-7b8c7b54f0070edb207add4777e68e4e79d7c3fe.tar.xz
kernel-qcow2-linux-7b8c7b54f0070edb207add4777e68e4e79d7c3fe.zip
sfc: manually allocate and free vadaptors
To be able to use MC_CMD_VADAPTOR_SET_MAC, vadaptors must be manually allocated and freed as automatic vadaptors will disappear when their reference_count reaches zero, which must happen before the MAC address is changed. Vadaptors are allocated and freed in the vswitching_probe/remove functions for PFs and VFs, and this means that vadaptors are restored correctly following an MC reboot or other reset when required. Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/ef10.c')
-rw-r--r--drivers/net/ethernet/sfc/ef10.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index ae98e423e426..0dff8123da04 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -3760,9 +3760,9 @@ const struct efx_nic_type efx_hunt_a0_vf_nic_type = {
.ptp_write_host_time = efx_ef10_ptp_write_host_time_vf,
.ptp_set_ts_config = efx_ef10_ptp_set_ts_config_vf,
#ifdef CONFIG_SFC_SRIOV
- .vswitching_probe = efx_port_dummy_op_int,
- .vswitching_restore = efx_port_dummy_op_int,
- .vswitching_remove = efx_port_dummy_op_void,
+ .vswitching_probe = efx_ef10_vswitching_probe_vf,
+ .vswitching_restore = efx_ef10_vswitching_restore_vf,
+ .vswitching_remove = efx_ef10_vswitching_remove_vf,
#endif
.revision = EFX_REV_HUNT_A0,
.max_dma_mask = DMA_BIT_MASK(ESF_DZ_TX_KER_BUF_ADDR_WIDTH),
@@ -3876,9 +3876,9 @@ const struct efx_nic_type efx_hunt_a0_nic_type = {
.sriov_set_vf_vlan = efx_ef10_sriov_set_vf_vlan,
.sriov_set_vf_spoofchk = efx_ef10_sriov_set_vf_spoofchk,
.sriov_get_vf_config = efx_ef10_sriov_get_vf_config,
- .vswitching_probe = efx_ef10_vswitching_probe,
- .vswitching_restore = efx_ef10_vswitching_restore,
- .vswitching_remove = efx_ef10_vswitching_remove,
+ .vswitching_probe = efx_ef10_vswitching_probe_pf,
+ .vswitching_restore = efx_ef10_vswitching_restore_pf,
+ .vswitching_remove = efx_ef10_vswitching_remove_pf,
#endif
.revision = EFX_REV_HUNT_A0,