aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib_ib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_ib.c')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_ib.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 86bcdd72a107..a1f5a05f2f36 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -416,6 +416,7 @@ int ipoib_ib_dev_open(struct net_device *dev)
416 ret = ipoib_ib_post_receives(dev); 416 ret = ipoib_ib_post_receives(dev);
417 if (ret) { 417 if (ret) {
418 ipoib_warn(priv, "ipoib_ib_post_receives returned %d\n", ret); 418 ipoib_warn(priv, "ipoib_ib_post_receives returned %d\n", ret);
419 ipoib_ib_dev_stop(dev);
419 return -1; 420 return -1;
420 } 421 }
421 422
@@ -434,7 +435,7 @@ int ipoib_ib_dev_up(struct net_device *dev)
434 return ipoib_mcast_start_thread(dev); 435 return ipoib_mcast_start_thread(dev);
435} 436}
436 437
437int ipoib_ib_dev_down(struct net_device *dev) 438int ipoib_ib_dev_down(struct net_device *dev, int flush)
438{ 439{
439 struct ipoib_dev_priv *priv = netdev_priv(dev); 440 struct ipoib_dev_priv *priv = netdev_priv(dev);
440 441
@@ -449,10 +450,11 @@ int ipoib_ib_dev_down(struct net_device *dev)
449 set_bit(IPOIB_PKEY_STOP, &priv->flags); 450 set_bit(IPOIB_PKEY_STOP, &priv->flags);
450 cancel_delayed_work(&priv->pkey_task); 451 cancel_delayed_work(&priv->pkey_task);
451 mutex_unlock(&pkey_mutex); 452 mutex_unlock(&pkey_mutex);
452 flush_workqueue(ipoib_workqueue); 453 if (flush)
454 flush_workqueue(ipoib_workqueue);
453 } 455 }
454 456
455 ipoib_mcast_stop_thread(dev, 1); 457 ipoib_mcast_stop_thread(dev, flush);
456 ipoib_mcast_dev_flush(dev); 458 ipoib_mcast_dev_flush(dev);
457 459
458 ipoib_flush_paths(dev); 460 ipoib_flush_paths(dev);
@@ -590,7 +592,7 @@ void ipoib_ib_dev_flush(void *_dev)
590 592
591 ipoib_dbg(priv, "flushing\n"); 593 ipoib_dbg(priv, "flushing\n");
592 594
593 ipoib_ib_dev_down(dev); 595 ipoib_ib_dev_down(dev, 0);
594 596
595 /* 597 /*
596 * The device could have been brought down between the start and when 598 * The device could have been brought down between the start and when