|
@@ -491,6 +491,9 @@ static int ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast)
|
|
|
!test_bit(IPOIB_FLAG_OPER_UP, &priv->flags))
|
|
|
return -EINVAL;
|
|
|
|
|
|
+ init_completion(&mcast->done);
|
|
|
+ set_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags);
|
|
|
+
|
|
|
ipoib_dbg_mcast(priv, "joining MGID %pI6\n", mcast->mcmember.mgid.raw);
|
|
|
|
|
|
rec.mgid = mcast->mcmember.mgid;
|
|
@@ -649,8 +652,6 @@ void ipoib_mcast_join_task(struct work_struct *work)
|
|
|
if (mcast->backoff == 1 ||
|
|
|
time_after_eq(jiffies, mcast->delay_until)) {
|
|
|
/* Found the next unjoined group */
|
|
|
- init_completion(&mcast->done);
|
|
|
- set_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags);
|
|
|
if (ipoib_mcast_join(dev, mcast)) {
|
|
|
spin_unlock_irq(&priv->lock);
|
|
|
return;
|
|
@@ -670,11 +671,9 @@ out:
|
|
|
queue_delayed_work(priv->wq, &priv->mcast_task,
|
|
|
delay_until - jiffies);
|
|
|
}
|
|
|
- if (mcast) {
|
|
|
- init_completion(&mcast->done);
|
|
|
- set_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags);
|
|
|
+ if (mcast)
|
|
|
ipoib_mcast_join(dev, mcast);
|
|
|
- }
|
|
|
+
|
|
|
spin_unlock_irq(&priv->lock);
|
|
|
}
|
|
|
|