Commit e09b74d0 authored by Ariel Elior's avatar Ariel Elior Committed by David S. Miller

bnx2x: Zero VFs starting MACs

Hypervisor/Supervisor should set the VF's MAC prior to its load;
Using a randomly generated MAC as a default is a bad practice.
Signed-off-by: default avatarAriel Elior <ariele@broadcom.com>
Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c48b22da
...@@ -11406,7 +11406,7 @@ static int bnx2x_init_bp(struct bnx2x *bp) ...@@ -11406,7 +11406,7 @@ static int bnx2x_init_bp(struct bnx2x *bp)
if (rc) if (rc)
return rc; return rc;
} else { } else {
random_ether_addr(bp->dev->dev_addr); eth_zero_addr(bp->dev->dev_addr);
} }
bnx2x_set_modes_bitmap(bp); bnx2x_set_modes_bitmap(bp);
...@@ -11865,6 +11865,10 @@ static int bnx2x_validate_addr(struct net_device *dev) ...@@ -11865,6 +11865,10 @@ static int bnx2x_validate_addr(struct net_device *dev)
{ {
struct bnx2x *bp = netdev_priv(dev); struct bnx2x *bp = netdev_priv(dev);
/* query the bulletin board for mac address configured by the PF */
if (IS_VF(bp))
bnx2x_sample_bulletin(bp);
if (!bnx2x_is_valid_ether_addr(bp, dev->dev_addr)) { if (!bnx2x_is_valid_ether_addr(bp, dev->dev_addr)) {
BNX2X_ERR("Non-valid Ethernet address\n"); BNX2X_ERR("Non-valid Ethernet address\n");
return -EADDRNOTAVAIL; return -EADDRNOTAVAIL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment