ixgbevf: fix MAC address changes through ixgbevf_set_mac()
authorEmil Tantilov <emil.s.tantilov@intel.com>
Mon, 14 May 2018 18:16:16 +0000 (11:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Aug 2018 05:50:33 +0000 (07:50 +0200)
[ Upstream commit 6e7d0ba1e59b1a306761a731e67634c0f2efea2a ]

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 <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c

index 90ecc4b0646210bc9daba9ac15eb47e1b4574b32..90be4385bf368c446c020289008f7800de738f78 100644 (file)
@@ -3737,6 +3737,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;