|
@@ -388,7 +388,7 @@ void ipoib_mcast_carrier_on_task(struct work_struct *work)
|
|
* the workqueue while holding the rtnl lock, so loop
|
|
* the workqueue while holding the rtnl lock, so loop
|
|
* on trylock until either we get the lock or we see
|
|
* on trylock until either we get the lock or we see
|
|
* FLAG_ADMIN_UP go away as that signals that we are bailing
|
|
* FLAG_ADMIN_UP go away as that signals that we are bailing
|
|
- * and can safely ignore the carrier on work
|
|
|
|
|
|
+ * and can safely ignore the carrier on work.
|
|
*/
|
|
*/
|
|
while (!rtnl_trylock()) {
|
|
while (!rtnl_trylock()) {
|
|
if (!test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags))
|
|
if (!test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags))
|
|
@@ -432,15 +432,14 @@ static int ipoib_mcast_join_complete(int status,
|
|
if (!status) {
|
|
if (!status) {
|
|
mcast->backoff = 1;
|
|
mcast->backoff = 1;
|
|
if (test_bit(IPOIB_MCAST_RUN, &priv->flags))
|
|
if (test_bit(IPOIB_MCAST_RUN, &priv->flags))
|
|
- queue_delayed_work(ipoib_workqueue,
|
|
|
|
- &priv->mcast_task, 0);
|
|
|
|
|
|
+ queue_delayed_work(priv->wq, &priv->mcast_task, 0);
|
|
|
|
|
|
/*
|
|
/*
|
|
- * Defer carrier on work to ipoib_workqueue to avoid a
|
|
|
|
|
|
+ * Defer carrier on work to priv->wq to avoid a
|
|
* deadlock on rtnl_lock here.
|
|
* deadlock on rtnl_lock here.
|
|
*/
|
|
*/
|
|
if (mcast == priv->broadcast)
|
|
if (mcast == priv->broadcast)
|
|
- queue_work(ipoib_workqueue, &priv->carrier_on_task);
|
|
|
|
|
|
+ queue_work(priv->wq, &priv->carrier_on_task);
|
|
} else {
|
|
} else {
|
|
if (mcast->logcount++ < 20) {
|
|
if (mcast->logcount++ < 20) {
|
|
if (status == -ETIMEDOUT || status == -EAGAIN) {
|
|
if (status == -ETIMEDOUT || status == -EAGAIN) {
|
|
@@ -465,7 +464,7 @@ out:
|
|
if (status == -ENETRESET)
|
|
if (status == -ENETRESET)
|
|
status = 0;
|
|
status = 0;
|
|
if (status && test_bit(IPOIB_MCAST_RUN, &priv->flags))
|
|
if (status && test_bit(IPOIB_MCAST_RUN, &priv->flags))
|
|
- queue_delayed_work(ipoib_workqueue, &priv->mcast_task,
|
|
|
|
|
|
+ queue_delayed_work(priv->wq, &priv->mcast_task,
|
|
mcast->backoff * HZ);
|
|
mcast->backoff * HZ);
|
|
spin_unlock_irq(&priv->lock);
|
|
spin_unlock_irq(&priv->lock);
|
|
mutex_unlock(&mcast_mutex);
|
|
mutex_unlock(&mcast_mutex);
|
|
@@ -535,8 +534,7 @@ static void ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast,
|
|
mcast->backoff = IPOIB_MAX_BACKOFF_SECONDS;
|
|
mcast->backoff = IPOIB_MAX_BACKOFF_SECONDS;
|
|
|
|
|
|
if (test_bit(IPOIB_MCAST_RUN, &priv->flags))
|
|
if (test_bit(IPOIB_MCAST_RUN, &priv->flags))
|
|
- queue_delayed_work(ipoib_workqueue,
|
|
|
|
- &priv->mcast_task,
|
|
|
|
|
|
+ queue_delayed_work(priv->wq, &priv->mcast_task,
|
|
mcast->backoff * HZ);
|
|
mcast->backoff * HZ);
|
|
}
|
|
}
|
|
mutex_unlock(&mcast_mutex);
|
|
mutex_unlock(&mcast_mutex);
|
|
@@ -576,8 +574,8 @@ void ipoib_mcast_join_task(struct work_struct *work)
|
|
ipoib_warn(priv, "failed to allocate broadcast group\n");
|
|
ipoib_warn(priv, "failed to allocate broadcast group\n");
|
|
mutex_lock(&mcast_mutex);
|
|
mutex_lock(&mcast_mutex);
|
|
if (test_bit(IPOIB_MCAST_RUN, &priv->flags))
|
|
if (test_bit(IPOIB_MCAST_RUN, &priv->flags))
|
|
- queue_delayed_work(ipoib_workqueue,
|
|
|
|
- &priv->mcast_task, HZ);
|
|
|
|
|
|
+ queue_delayed_work(priv->wq, &priv->mcast_task,
|
|
|
|
+ HZ);
|
|
mutex_unlock(&mcast_mutex);
|
|
mutex_unlock(&mcast_mutex);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -644,7 +642,7 @@ int ipoib_mcast_start_thread(struct net_device *dev)
|
|
|
|
|
|
mutex_lock(&mcast_mutex);
|
|
mutex_lock(&mcast_mutex);
|
|
if (!test_and_set_bit(IPOIB_MCAST_RUN, &priv->flags))
|
|
if (!test_and_set_bit(IPOIB_MCAST_RUN, &priv->flags))
|
|
- queue_delayed_work(ipoib_workqueue, &priv->mcast_task, 0);
|
|
|
|
|
|
+ queue_delayed_work(priv->wq, &priv->mcast_task, 0);
|
|
mutex_unlock(&mcast_mutex);
|
|
mutex_unlock(&mcast_mutex);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
@@ -662,7 +660,7 @@ int ipoib_mcast_stop_thread(struct net_device *dev, int flush)
|
|
mutex_unlock(&mcast_mutex);
|
|
mutex_unlock(&mcast_mutex);
|
|
|
|
|
|
if (flush)
|
|
if (flush)
|
|
- flush_workqueue(ipoib_workqueue);
|
|
|
|
|
|
+ flush_workqueue(priv->wq);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -729,7 +727,7 @@ void ipoib_mcast_send(struct net_device *dev, u8 *daddr, struct sk_buff *skb)
|
|
__ipoib_mcast_add(dev, mcast);
|
|
__ipoib_mcast_add(dev, mcast);
|
|
list_add_tail(&mcast->list, &priv->multicast_list);
|
|
list_add_tail(&mcast->list, &priv->multicast_list);
|
|
if (!test_and_set_bit(IPOIB_MCAST_RUN, &priv->flags))
|
|
if (!test_and_set_bit(IPOIB_MCAST_RUN, &priv->flags))
|
|
- queue_delayed_work(ipoib_workqueue, &priv->mcast_task, 0);
|
|
|
|
|
|
+ queue_delayed_work(priv->wq, &priv->mcast_task, 0);
|
|
}
|
|
}
|
|
|
|
|
|
if (!mcast->ah) {
|
|
if (!mcast->ah) {
|
|
@@ -944,7 +942,7 @@ void ipoib_mcast_restart_task(struct work_struct *work)
|
|
* completes. So do like the carrier on task and attempt to
|
|
* completes. So do like the carrier on task and attempt to
|
|
* take the rtnl lock, but if we can't before the ADMIN_UP flag
|
|
* take the rtnl lock, but if we can't before the ADMIN_UP flag
|
|
* goes away, then just return and know that the remove list will
|
|
* goes away, then just return and know that the remove list will
|
|
- * get flushed later by mcast_dev_flush.
|
|
|
|
|
|
+ * get flushed later by mcast_stop_thread.
|
|
*/
|
|
*/
|
|
while (!rtnl_trylock()) {
|
|
while (!rtnl_trylock()) {
|
|
if (!test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags))
|
|
if (!test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags))
|