Commit dbd501a8 authored by Eugenia Emantayev's avatar Eugenia Emantayev Committed by David S. Miller

net/mlx4_en: Use the correct netif lock on ndo_set_rx_mode

The device multicast list is protected by netif_addr_lock_bh in the networking core, we should
use this locking practice in mlx4_en too.
Signed-off-by: default avatarEugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
Reviewed-by: default avatarYevgeny Petrilin <yevgenyp@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent db0e7cba
...@@ -767,9 +767,9 @@ static void mlx4_en_do_set_multicast(struct work_struct *work) ...@@ -767,9 +767,9 @@ static void mlx4_en_do_set_multicast(struct work_struct *work)
/* Update multicast list - we cache all addresses so they won't /* Update multicast list - we cache all addresses so they won't
* change while HW is updated holding the command semaphor */ * change while HW is updated holding the command semaphor */
netif_tx_lock_bh(dev); netif_addr_lock_bh(dev);
mlx4_en_cache_mclist(dev); mlx4_en_cache_mclist(dev);
netif_tx_unlock_bh(dev); netif_addr_unlock_bh(dev);
list_for_each_entry(mclist, &priv->mc_list, list) { list_for_each_entry(mclist, &priv->mc_list, list) {
mcast_addr = mlx4_en_mac_to_u64(mclist->addr); mcast_addr = mlx4_en_mac_to_u64(mclist->addr);
mlx4_SET_MCAST_FLTR(mdev->dev, priv->port, mlx4_SET_MCAST_FLTR(mdev->dev, priv->port,
......
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