diff options
author | Shradha Shah <sshah@solarflare.com> | 2015-05-20 11:09:46 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-21 18:43:53 -0400 |
commit | f1122a345b96713eb6e059121c592b3c0612f5be (patch) | |
tree | de9fd299b51ba63e90b0fde1ec664e4f1eea7d53 /drivers/net/ethernet/sfc/ef10_sriov.c | |
parent | cfc77c2fbadf5b806fea2e35738c7437fc62f522 (diff) | |
download | lwn-f1122a345b96713eb6e059121c592b3c0612f5be.tar.gz lwn-f1122a345b96713eb6e059121c592b3c0612f5be.zip |
sfc: Store the efx_nic struct of the current VF in the VF data struct
Initialised in efx_probe_vf and removal is dealt with in
efx_ef10_remove.
vf->efx is needed in future patches to change the MAC address
of the VF via the parent PF, while the driver is bound to the
VF.
Example: ip link set dev vf NUM mac LLADDR
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_sriov.c')
-rw-r--r-- | drivers/net/ethernet/sfc/ef10_sriov.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/ef10_sriov.c b/drivers/net/ethernet/sfc/ef10_sriov.c index 1b93acf2d28d..6208dd76bc2b 100644 --- a/drivers/net/ethernet/sfc/ef10_sriov.c +++ b/drivers/net/ethernet/sfc/ef10_sriov.c @@ -160,6 +160,8 @@ static void efx_ef10_sriov_free_vf_vports(struct efx_nic *efx) efx_ef10_vport_free(efx, vf->vport_id); vf->vport_id = 0; } + + vf->efx = NULL; } } @@ -215,6 +217,7 @@ static int efx_ef10_sriov_alloc_vf_vswitching(struct efx_nic *efx) for (i = 0; i < efx->vf_count; i++) { random_ether_addr(nic_data->vf[i].mac); + nic_data->vf[i].efx = NULL; rc = efx_ef10_sriov_assign_vf_vport(efx, i); if (rc) |