diff options
author | Shahed Shaikh <shahed.shaikh@cavium.com> | 2018-04-19 15:50:11 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-20 18:26:36 +0300 |
commit | 7425d8220f8d0c2127aec75677f652a26f86bc95 (patch) | |
tree | 05e5d7538d1c6d21ee312574d8307a5f7bddd47a /drivers/net/ethernet/qlogic/qede | |
parent | 2ed021255b8a1351209d9407bcae41f5ff6657c7 (diff) | |
download | linux-7425d8220f8d0c2127aec75677f652a26f86bc95.tar.xz |
qed* : use trust mode to allow VF to override forced MAC
As per existing behavior, when PF sets a MAC address for a VF
(also called as forced MAC), VF is not allowed to change its
MAC address afterwards.
This puts the limitation on few use cases such as bonding of VFs,
where bonding driver asks VF to change its MAC address.
This patch uses a VF trust mode to allow VF to change its MAC address
in spite PF has set a forced MAC for that VF.
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qede')
-rw-r--r-- | drivers/net/ethernet/qlogic/qede/qede_filter.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index 6687e04d1558..8094f035b705 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -550,8 +550,7 @@ void qede_force_mac(void *dev, u8 *mac, bool forced) __qede_lock(edev); - /* MAC hints take effect only if we haven't set one already */ - if (is_valid_ether_addr(edev->ndev->dev_addr) && !forced) { + if (!is_valid_ether_addr(mac)) { __qede_unlock(edev); return; } |