diff options
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib.h | 2 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_ib.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 13 |
4 files changed, 12 insertions, 9 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index bea960b8191f..4ea1c1ca85bc 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h | |||
@@ -257,7 +257,7 @@ void ipoib_mcast_send(struct net_device *dev, union ib_gid *mgid, | |||
257 | 257 | ||
258 | void ipoib_mcast_restart_task(void *dev_ptr); | 258 | void ipoib_mcast_restart_task(void *dev_ptr); |
259 | int ipoib_mcast_start_thread(struct net_device *dev); | 259 | int ipoib_mcast_start_thread(struct net_device *dev); |
260 | int ipoib_mcast_stop_thread(struct net_device *dev); | 260 | int ipoib_mcast_stop_thread(struct net_device *dev, int flush); |
261 | 261 | ||
262 | void ipoib_mcast_dev_down(struct net_device *dev); | 262 | void ipoib_mcast_dev_down(struct net_device *dev); |
263 | void ipoib_mcast_dev_flush(struct net_device *dev); | 263 | void ipoib_mcast_dev_flush(struct net_device *dev); |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index ef0e3894863c..f7440096b5ed 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c | |||
@@ -432,7 +432,7 @@ int ipoib_ib_dev_down(struct net_device *dev) | |||
432 | flush_workqueue(ipoib_workqueue); | 432 | flush_workqueue(ipoib_workqueue); |
433 | } | 433 | } |
434 | 434 | ||
435 | ipoib_mcast_stop_thread(dev); | 435 | ipoib_mcast_stop_thread(dev, 1); |
436 | 436 | ||
437 | /* | 437 | /* |
438 | * Flush the multicast groups first so we stop any multicast joins. The | 438 | * Flush the multicast groups first so we stop any multicast joins. The |
@@ -599,7 +599,7 @@ void ipoib_ib_dev_cleanup(struct net_device *dev) | |||
599 | 599 | ||
600 | ipoib_dbg(priv, "cleaning up ib_dev\n"); | 600 | ipoib_dbg(priv, "cleaning up ib_dev\n"); |
601 | 601 | ||
602 | ipoib_mcast_stop_thread(dev); | 602 | ipoib_mcast_stop_thread(dev, 1); |
603 | 603 | ||
604 | /* Delete the broadcast address and the local address */ | 604 | /* Delete the broadcast address and the local address */ |
605 | ipoib_mcast_dev_down(dev); | 605 | ipoib_mcast_dev_down(dev); |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 49d120d2b92c..704f48e0b6a7 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -1005,6 +1005,7 @@ debug_failed: | |||
1005 | 1005 | ||
1006 | register_failed: | 1006 | register_failed: |
1007 | ib_unregister_event_handler(&priv->event_handler); | 1007 | ib_unregister_event_handler(&priv->event_handler); |
1008 | flush_scheduled_work(); | ||
1008 | 1009 | ||
1009 | event_failed: | 1010 | event_failed: |
1010 | ipoib_dev_cleanup(priv->dev); | 1011 | ipoib_dev_cleanup(priv->dev); |
@@ -1057,6 +1058,7 @@ static void ipoib_remove_one(struct ib_device *device) | |||
1057 | 1058 | ||
1058 | list_for_each_entry_safe(priv, tmp, dev_list, list) { | 1059 | list_for_each_entry_safe(priv, tmp, dev_list, list) { |
1059 | ib_unregister_event_handler(&priv->event_handler); | 1060 | ib_unregister_event_handler(&priv->event_handler); |
1061 | flush_scheduled_work(); | ||
1060 | 1062 | ||
1061 | unregister_netdev(priv->dev); | 1063 | unregister_netdev(priv->dev); |
1062 | ipoib_dev_cleanup(priv->dev); | 1064 | ipoib_dev_cleanup(priv->dev); |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index aca7aea18a69..36ce29836bf2 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |||
@@ -145,7 +145,7 @@ static struct ipoib_mcast *ipoib_mcast_alloc(struct net_device *dev, | |||
145 | 145 | ||
146 | mcast->dev = dev; | 146 | mcast->dev = dev; |
147 | mcast->created = jiffies; | 147 | mcast->created = jiffies; |
148 | mcast->backoff = HZ; | 148 | mcast->backoff = 1; |
149 | mcast->logcount = 0; | 149 | mcast->logcount = 0; |
150 | 150 | ||
151 | INIT_LIST_HEAD(&mcast->list); | 151 | INIT_LIST_HEAD(&mcast->list); |
@@ -396,7 +396,7 @@ static void ipoib_mcast_join_complete(int status, | |||
396 | IPOIB_GID_ARG(mcast->mcmember.mgid), status); | 396 | IPOIB_GID_ARG(mcast->mcmember.mgid), status); |
397 | 397 | ||
398 | if (!status && !ipoib_mcast_join_finish(mcast, mcmember)) { | 398 | if (!status && !ipoib_mcast_join_finish(mcast, mcmember)) { |
399 | mcast->backoff = HZ; | 399 | mcast->backoff = 1; |
400 | down(&mcast_mutex); | 400 | down(&mcast_mutex); |
401 | if (test_bit(IPOIB_MCAST_RUN, &priv->flags)) | 401 | if (test_bit(IPOIB_MCAST_RUN, &priv->flags)) |
402 | queue_work(ipoib_workqueue, &priv->mcast_task); | 402 | queue_work(ipoib_workqueue, &priv->mcast_task); |
@@ -496,7 +496,7 @@ static void ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast, | |||
496 | if (test_bit(IPOIB_MCAST_RUN, &priv->flags)) | 496 | if (test_bit(IPOIB_MCAST_RUN, &priv->flags)) |
497 | queue_delayed_work(ipoib_workqueue, | 497 | queue_delayed_work(ipoib_workqueue, |
498 | &priv->mcast_task, | 498 | &priv->mcast_task, |
499 | mcast->backoff); | 499 | mcast->backoff * HZ); |
500 | up(&mcast_mutex); | 500 | up(&mcast_mutex); |
501 | } else | 501 | } else |
502 | mcast->query_id = ret; | 502 | mcast->query_id = ret; |
@@ -598,7 +598,7 @@ int ipoib_mcast_start_thread(struct net_device *dev) | |||
598 | return 0; | 598 | return 0; |
599 | } | 599 | } |
600 | 600 | ||
601 | int ipoib_mcast_stop_thread(struct net_device *dev) | 601 | int ipoib_mcast_stop_thread(struct net_device *dev, int flush) |
602 | { | 602 | { |
603 | struct ipoib_dev_priv *priv = netdev_priv(dev); | 603 | struct ipoib_dev_priv *priv = netdev_priv(dev); |
604 | struct ipoib_mcast *mcast; | 604 | struct ipoib_mcast *mcast; |
@@ -610,7 +610,8 @@ int ipoib_mcast_stop_thread(struct net_device *dev) | |||
610 | cancel_delayed_work(&priv->mcast_task); | 610 | cancel_delayed_work(&priv->mcast_task); |
611 | up(&mcast_mutex); | 611 | up(&mcast_mutex); |
612 | 612 | ||
613 | flush_workqueue(ipoib_workqueue); | 613 | if (flush) |
614 | flush_workqueue(ipoib_workqueue); | ||
614 | 615 | ||
615 | if (priv->broadcast && priv->broadcast->query) { | 616 | if (priv->broadcast && priv->broadcast->query) { |
616 | ib_sa_cancel_query(priv->broadcast->query_id, priv->broadcast->query); | 617 | ib_sa_cancel_query(priv->broadcast->query_id, priv->broadcast->query); |
@@ -832,7 +833,7 @@ void ipoib_mcast_restart_task(void *dev_ptr) | |||
832 | 833 | ||
833 | ipoib_dbg_mcast(priv, "restarting multicast task\n"); | 834 | ipoib_dbg_mcast(priv, "restarting multicast task\n"); |
834 | 835 | ||
835 | ipoib_mcast_stop_thread(dev); | 836 | ipoib_mcast_stop_thread(dev, 0); |
836 | 837 | ||
837 | spin_lock_irqsave(&priv->lock, flags); | 838 | spin_lock_irqsave(&priv->lock, flags); |
838 | 839 | ||