summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbevf/vf.c
diff options
context:
space:
mode:
authorGreg Rose <gregory.v.rose@intel.com>2013-02-13 03:02:05 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-03-28 01:13:46 -0700
commite1941a74338d8c655c92b058e72acc141fd9e813 (patch)
tree9fb99154d87a7411e814c8ba96cab3171e21e986 /drivers/net/ethernet/intel/ixgbevf/vf.c
parent35055928c7b1d078ddde656357db3093f383d846 (diff)
downloadlinux-e1941a74338d8c655c92b058e72acc141fd9e813.tar.gz
linux-e1941a74338d8c655c92b058e72acc141fd9e813.tar.bz2
linux-e1941a74338d8c655c92b058e72acc141fd9e813.zip
ixgbevf: Adjust to handle unassigned MAC address from PF
If the administrator has not assigned a MAC address to the VF via the PF then handle it gracefully by generating a temporary MAC address. This ensures that we always know when we have a random address and udev won't get upset about it. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> CC: Andy Gospodarek <andy@greyhouse.net> CC: Stefan Assmann <sassmann@kpanic.de> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbevf/vf.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/vf.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.c b/drivers/net/ethernet/intel/ixgbevf/vf.c
index 0c94557b53df..387b52635bc0 100644
--- a/drivers/net/ethernet/intel/ixgbevf/vf.c
+++ b/drivers/net/ethernet/intel/ixgbevf/vf.c
@@ -109,7 +109,12 @@ static s32 ixgbevf_reset_hw_vf(struct ixgbe_hw *hw)
if (ret_val)
return ret_val;
- if (msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK))
+ /* New versions of the PF may NACK the reset return message
+ * to indicate that no MAC address has yet been assigned for
+ * the VF.
+ */
+ if (msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK) &&
+ msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_NACK))
return IXGBE_ERR_INVALID_MAC_ADDR;
memcpy(hw->mac.perm_addr, addr, ETH_ALEN);