aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/siena_sriov.c
diff options
context:
space:
mode:
authorShradha Shah <sshah@solarflare.com>2015-05-20 11:09:30 +0100
committerDavid S. Miller <davem@davemloft.net>2015-05-21 18:43:53 -0400
commitcfc77c2fbadf5b806fea2e35738c7437fc62f522 (patch)
treec4d96fa883fb33f07b9ecfb844bb8dc4ad030112 /drivers/net/ethernet/sfc/siena_sriov.c
parentsfc: Store vf_index in nic_data for Ef10. (diff)
downloadlinux-dev-cfc77c2fbadf5b806fea2e35738c7437fc62f522.tar.xz
linux-dev-cfc77c2fbadf5b806fea2e35738c7437fc62f522.zip
sfc: save old MAC address in case sriov_mac_address_changed fails
Otherwise the PF and VF can disagree on the VF's MAC address and this leads to strange behaviour, up to and including kernel panics. Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/siena_sriov.c')
-rw-r--r--drivers/net/ethernet/sfc/siena_sriov.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/siena_sriov.c b/drivers/net/ethernet/sfc/siena_sriov.c
index 2a5f352a2dc0..da7b94f34604 100644
--- a/drivers/net/ethernet/sfc/siena_sriov.c
+++ b/drivers/net/ethernet/sfc/siena_sriov.c
@@ -1476,16 +1476,18 @@ void efx_siena_sriov_flr(struct efx_nic *efx, unsigned vf_i)
vf->evq0_count = 0;
}
-void efx_siena_sriov_mac_address_changed(struct efx_nic *efx)
+int efx_siena_sriov_mac_address_changed(struct efx_nic *efx)
{
struct siena_nic_data *nic_data = efx->nic_data;
struct vfdi_status *vfdi_status = nic_data->vfdi_status.addr;
if (!efx->vf_init_count)
- return;
+ return 0;
ether_addr_copy(vfdi_status->peers[0].mac_addr,
efx->net_dev->dev_addr);
queue_work(vfdi_workqueue, &nic_data->peer_work);
+
+ return 0;
}
void efx_siena_sriov_tx_flush_done(struct efx_nic *efx, efx_qword_t *event)