Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21945
b: refs/heads/master
c: 9acf6a8
h: refs/heads/master
i:
  21943: bf1967d
v: v3
  • Loading branch information
Michael S. Tsirkin authored and Roland Dreier committed Mar 20, 2006
1 parent 646b76c commit 9362411
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 54d07e2a1ead2f093ce054cda2e0f5ec163c650c
refs/heads/master: 9acf6a8570dcfc9f55724b8b71099fc8768e8c26
15 changes: 12 additions & 3 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,11 @@ static void ipoib_mcast_join_complete(int status,
if (mcast->backoff > IPOIB_MAX_BACKOFF_SECONDS)
mcast->backoff = IPOIB_MAX_BACKOFF_SECONDS;

mutex_lock(&mcast_mutex);

spin_lock_irq(&priv->lock);
mcast->query = NULL;

mutex_lock(&mcast_mutex);
if (test_bit(IPOIB_MCAST_RUN, &priv->flags)) {
if (status == -ETIMEDOUT)
queue_work(ipoib_workqueue, &priv->mcast_task);
Expand All @@ -448,6 +450,7 @@ static void ipoib_mcast_join_complete(int status,
mcast->backoff * HZ);
} else
complete(&mcast->done);
spin_unlock_irq(&priv->lock);
mutex_unlock(&mcast_mutex);

return;
Expand Down Expand Up @@ -635,21 +638,27 @@ int ipoib_mcast_stop_thread(struct net_device *dev, int flush)
if (flush)
flush_workqueue(ipoib_workqueue);

spin_lock_irq(&priv->lock);
if (priv->broadcast && priv->broadcast->query) {
ib_sa_cancel_query(priv->broadcast->query_id, priv->broadcast->query);
priv->broadcast->query = NULL;
spin_unlock_irq(&priv->lock);
ipoib_dbg_mcast(priv, "waiting for bcast\n");
wait_for_completion(&priv->broadcast->done);
}
} else
spin_unlock_irq(&priv->lock);

list_for_each_entry(mcast, &priv->multicast_list, list) {
spin_lock_irq(&priv->lock);
if (mcast->query) {
ib_sa_cancel_query(mcast->query_id, mcast->query);
mcast->query = NULL;
spin_unlock_irq(&priv->lock);
ipoib_dbg_mcast(priv, "waiting for MGID " IPOIB_GID_FMT "\n",
IPOIB_GID_ARG(mcast->mcmember.mgid));
wait_for_completion(&mcast->done);
}
} else
spin_unlock_irq(&priv->lock);
}

return 0;
Expand Down

0 comments on commit 9362411

Please sign in to comment.