projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c48b22d
)
bnx2x: Zero VFs starting MACs
author
Ariel Elior
<
[email protected]
>
Mon, 27 May 2013 04:08:26 +0000
(
04:08
+0000)
committer
David S. Miller
<
[email protected]
>
Tue, 28 May 2013 04:41:49 +0000
(21:41 -0700)
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: Ariel Elior <
[email protected]
>
Signed-off-by: Yuval Mintz <
[email protected]
>
Signed-off-by: Eilon Greenstein <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 7ed9cdfa115ee10c1d4817e064e5acf680eecd55..80982c38ae69d8e4ce6043095fc96e79d76877c1 100644
(file)
--- a/
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@
-11406,7
+11406,7
@@
static int bnx2x_init_bp(struct bnx2x *bp)
if (rc)
return rc;
} else {
-
random_ether
_addr(bp->dev->dev_addr);
+
eth_zero
_addr(bp->dev->dev_addr);
}
bnx2x_set_modes_bitmap(bp);
@@
-11865,6
+11865,10
@@
static int bnx2x_validate_addr(struct net_device *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)) {
BNX2X_ERR("Non-valid Ethernet address\n");
return -EADDRNOTAVAIL;