diff options
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/fw.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/fw.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c index 58a8e535d698..2c97901c6a6d 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw.c +++ b/drivers/net/ethernet/mellanox/mlx4/fw.c | |||
@@ -840,12 +840,16 @@ int mlx4_QUERY_PORT_wrapper(struct mlx4_dev *dev, int slave, | |||
840 | MLX4_CMD_NATIVE); | 840 | MLX4_CMD_NATIVE); |
841 | 841 | ||
842 | if (!err && dev->caps.function != slave) { | 842 | if (!err && dev->caps.function != slave) { |
843 | /* set slave default_mac address */ | ||
844 | MLX4_GET(def_mac, outbox->buf, QUERY_PORT_MAC_OFFSET); | ||
845 | def_mac += slave << 8; | ||
846 | /* if config MAC in DB use it */ | 843 | /* if config MAC in DB use it */ |
847 | if (priv->mfunc.master.vf_oper[slave].vport[vhcr->in_modifier].state.mac) | 844 | if (priv->mfunc.master.vf_oper[slave].vport[vhcr->in_modifier].state.mac) |
848 | def_mac = priv->mfunc.master.vf_oper[slave].vport[vhcr->in_modifier].state.mac; | 845 | def_mac = priv->mfunc.master.vf_oper[slave].vport[vhcr->in_modifier].state.mac; |
846 | else { | ||
847 | /* set slave default_mac address */ | ||
848 | MLX4_GET(def_mac, outbox->buf, QUERY_PORT_MAC_OFFSET); | ||
849 | def_mac += slave << 8; | ||
850 | priv->mfunc.master.vf_admin[slave].vport[vhcr->in_modifier].mac = def_mac; | ||
851 | } | ||
852 | |||
849 | MLX4_PUT(outbox->buf, def_mac, QUERY_PORT_MAC_OFFSET); | 853 | MLX4_PUT(outbox->buf, def_mac, QUERY_PORT_MAC_OFFSET); |
850 | 854 | ||
851 | /* get port type - currently only eth is enabled */ | 855 | /* get port type - currently only eth is enabled */ |