aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
diff options
context:
space:
mode:
authorEyal Perry <eyalpe@mellanox.com>2014-07-22 15:44:09 +0300
committerDavid S. Miller <davem@davemloft.net>2014-07-22 19:53:13 -0700
commitb94901f3ede8fa5ea334f59bf947eba7d0cb24f3 (patch)
tree0e29fb4c6f76ab5ed465bdc4f4144d29f7ec5183 /drivers/net/ethernet/mellanox/mlx4/en_netdev.c
parentnet: mvpp2: Simplify BM pool buffers freeing (diff)
downloadlinux-dev-b94901f3ede8fa5ea334f59bf947eba7d0cb24f3.tar.xz
linux-dev-b94901f3ede8fa5ea334f59bf947eba7d0cb24f3.zip
net/mlx4_en: current_mac isn't updated in port up
When port is down dev_addr is changed (e.g. by bonding) but current_mac is not touched. When port is up again, hash_mac is updated to dev_addr, but current_mac isn't. This leads to inconsistency between current_mac and mac_hash. Because of that, mlx4_en_replace_mac() fails to find current_mac in mac_hash. Fix is to reset current_mac to dev_addr when port is up - as we do for mac_hash. Signed-off-by: Eyal Perry <eyalpe@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_netdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 887cf01d831d..82708bd5c339 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -644,6 +644,7 @@ static int mlx4_en_get_qp(struct mlx4_en_priv *priv)
goto alloc_err;
}
memcpy(entry->mac, priv->dev->dev_addr, sizeof(entry->mac));
+ memcpy(priv->current_mac, entry->mac, sizeof(priv->current_mac));
entry->reg_id = reg_id;
hlist_add_head_rcu(&entry->hlist,