Commit 5892eff9 authored by Eli Cohen's avatar Eli Cohen Committed by Roland Dreier

IPoIB: Remove priv->mcast_mutex

No need for a mutex around calls to ib_attach_mcast/ib_detach_mcast
since these operations are synchronized at the HW driver layer.
Signed-off-by: default avatarEli Cohen <eli@mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent c03d4731
...@@ -277,7 +277,6 @@ struct ipoib_dev_priv { ...@@ -277,7 +277,6 @@ struct ipoib_dev_priv {
unsigned long flags; unsigned long flags;
struct mutex mcast_mutex;
struct mutex vlan_mutex; struct mutex vlan_mutex;
struct rb_root path_tree; struct rb_root path_tree;
......
...@@ -1072,7 +1072,6 @@ static void ipoib_setup(struct net_device *dev) ...@@ -1072,7 +1072,6 @@ static void ipoib_setup(struct net_device *dev)
spin_lock_init(&priv->lock); spin_lock_init(&priv->lock);
spin_lock_init(&priv->tx_lock); spin_lock_init(&priv->tx_lock);
mutex_init(&priv->mcast_mutex);
mutex_init(&priv->vlan_mutex); mutex_init(&priv->vlan_mutex);
INIT_LIST_HEAD(&priv->path_list); INIT_LIST_HEAD(&priv->path_list);
......
...@@ -61,9 +61,7 @@ int ipoib_mcast_attach(struct net_device *dev, u16 mlid, union ib_gid *mgid) ...@@ -61,9 +61,7 @@ int ipoib_mcast_attach(struct net_device *dev, u16 mlid, union ib_gid *mgid)
} }
/* attach QP to multicast group */ /* attach QP to multicast group */
mutex_lock(&priv->mcast_mutex);
ret = ib_attach_mcast(priv->qp, mgid, mlid); ret = ib_attach_mcast(priv->qp, mgid, mlid);
mutex_unlock(&priv->mcast_mutex);
if (ret) if (ret)
ipoib_warn(priv, "failed to attach to multicast group, ret = %d\n", ret); ipoib_warn(priv, "failed to attach to multicast group, ret = %d\n", ret);
...@@ -77,9 +75,7 @@ int ipoib_mcast_detach(struct net_device *dev, u16 mlid, union ib_gid *mgid) ...@@ -77,9 +75,7 @@ int ipoib_mcast_detach(struct net_device *dev, u16 mlid, union ib_gid *mgid)
struct ipoib_dev_priv *priv = netdev_priv(dev); struct ipoib_dev_priv *priv = netdev_priv(dev);
int ret; int ret;
mutex_lock(&priv->mcast_mutex);
ret = ib_detach_mcast(priv->qp, mgid, mlid); ret = ib_detach_mcast(priv->qp, mgid, mlid);
mutex_unlock(&priv->mcast_mutex);
if (ret) if (ret)
ipoib_warn(priv, "ib_detach_mcast failed (result = %d)\n", ret); ipoib_warn(priv, "ib_detach_mcast failed (result = %d)\n", ret);
......
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