]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
i40e: Stop the VF device after setting its MAC address
authorGreg Rose <gregory.v.rose@intel.com>
Wed, 4 Jun 2014 01:23:13 +0000 (01:23 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 25 Jun 2014 01:15:46 +0000 (18:15 -0700)
If the host VMM administrator has changed the VF device's MAC address then
the i40e driver needs to halt the VF device so that the administrator will
be forced to reload the VF driver.  This will cause the VF driver to start
using the newly assigned MAC address.  This brings the i40e driver into
conformance with operational characteristics of other Intel SR-IOV
featured drivers.

Change-ID: Ic7242cceb8287dd2cb72fb1f3166a032a28bf88a
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

index f5b9d20625736b5dc451ac32dc25cc38d7a0d99c..d2dabae5b40c6fce107221ae29d7cb7992ef1c0b 100644 (file)
@@ -2077,6 +2077,8 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)
        }
        ether_addr_copy(vf->default_lan_addr.addr, mac);
        vf->pf_set_mac = true;
+       /* Force the VF driver stop so it has to reload with new MAC address */
+       i40e_vc_disable_vf(pf, vf);
        dev_info(&pf->pdev->dev, "Reload the VF driver to make this change effective.\n");
        ret = 0;