Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376686
b: refs/heads/master
c: c418253
h: refs/heads/master
v: v3
  • Loading branch information
Or Gerlitz authored and David S. Miller committed Jun 4, 2013
1 parent 5787074 commit 71d16e5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ef96f7d46ad86625237da8a35e812bdf7896e640
refs/heads/master: c418253f12c0a95c7cd894953644c7488899c9fd
10 changes: 7 additions & 3 deletions trunk/drivers/net/ethernet/mellanox/mlx4/fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,12 +840,16 @@ int mlx4_QUERY_PORT_wrapper(struct mlx4_dev *dev, int slave,
MLX4_CMD_NATIVE);

if (!err && dev->caps.function != slave) {
/* set slave default_mac address */
MLX4_GET(def_mac, outbox->buf, QUERY_PORT_MAC_OFFSET);
def_mac += slave << 8;
/* if config MAC in DB use it */
if (priv->mfunc.master.vf_oper[slave].vport[vhcr->in_modifier].state.mac)
def_mac = priv->mfunc.master.vf_oper[slave].vport[vhcr->in_modifier].state.mac;
else {
/* set slave default_mac address */
MLX4_GET(def_mac, outbox->buf, QUERY_PORT_MAC_OFFSET);
def_mac += slave << 8;
priv->mfunc.master.vf_admin[slave].vport[vhcr->in_modifier].mac = def_mac;
}

MLX4_PUT(outbox->buf, def_mac, QUERY_PORT_MAC_OFFSET);

/* get port type - currently only eth is enabled */
Expand Down

0 comments on commit 71d16e5

Please sign in to comment.