From: Emil Tantilov Date: Mon, 14 May 2018 18:16:16 +0000 (-0700) Subject: ixgbevf: fix MAC address changes through ixgbevf_set_mac() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6e7d0ba1e59b1a306761a731e67634c0f2efea2a;p=linux.git ixgbevf: fix MAC address changes through ixgbevf_set_mac() Set hw->mac.perm_addr in ixgbevf_set_mac() in order to avoid losing the custom MAC on reset. This can happen in the following case: >ip link set $vf address $mac >ethtool -r $vf Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index 9a939dcaf727e..083041129539b 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c @@ -4164,6 +4164,7 @@ static int ixgbevf_set_mac(struct net_device *netdev, void *p) return -EPERM; ether_addr_copy(hw->mac.addr, addr->sa_data); + ether_addr_copy(hw->mac.perm_addr, addr->sa_data); ether_addr_copy(netdev->dev_addr, addr->sa_data); return 0;