path: root/drivers/net/ethernet/qlogic/qede/qede_filter.c
diff options
authorShahed Shaikh <shahed.shaikh@cavium.com>2018-04-19 05:50:12 -0700
committerDavid S. Miller <davem@davemloft.net>2018-04-20 11:26:37 -0400
commit809c45a091d93e05c6e9b5d53bb3f1185273286b (patch)
treeefe5d01de83dbcaf6c4abb37ee7c8b47158bbbf9 /drivers/net/ethernet/qlogic/qede/qede_filter.c
parentqed* : use trust mode to allow VF to override forced MAC (diff)
qed* : Add new TLV to request PF to update MAC in bulletin board
There may be a need for VF driver to request PF to explicitly update its bulletin with a MAC address. e.g. When user assigns a MAC address to VF while VF is still down, and PF's bulletin board contains different MAC address, in this case, when VF's interface is brought up, it gets loaded with MAC address from bulletin board which is not desirable. To handle this corner case, we need a new TLV to request PF to update its bulletin board with suggested MAC. This request will be honored only for trusted VFs. 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/qede_filter.c')
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c
index 8094f035b705..43569b1839be 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_filter.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c
@@ -1160,6 +1160,10 @@ int qede_set_mac_addr(struct net_device *ndev, void *p)
if (edev->state != QEDE_STATE_OPEN) {
"The device is currently down\n");
+ /* Ask PF to explicitly update a copy in bulletin board */
+ if (IS_VF(edev) && edev->ops->req_bulletin_update_mac)
+ edev->ops->req_bulletin_update_mac(edev->cdev,
+ ndev->dev_addr);
goto out;