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.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 660967871191..fe65abb5150c 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -664,7 +664,7 @@ static void ipoib_ib_tx_timer_func(unsigned long ctx)
664 drain_tx_cq((struct net_device *)ctx); 664 drain_tx_cq((struct net_device *)ctx);
665} 665}
666 666
667int ipoib_ib_dev_open(struct net_device *dev, int flush) 667int ipoib_ib_dev_open(struct net_device *dev)
668{ 668{
669 struct ipoib_dev_priv *priv = netdev_priv(dev); 669 struct ipoib_dev_priv *priv = netdev_priv(dev);
670 int ret; 670 int ret;
@@ -706,7 +706,7 @@ int ipoib_ib_dev_open(struct net_device *dev, int flush)
706dev_stop: 706dev_stop:
707 if (!test_and_set_bit(IPOIB_FLAG_INITIALIZED, &priv->flags)) 707 if (!test_and_set_bit(IPOIB_FLAG_INITIALIZED, &priv->flags))
708 napi_enable(&priv->napi); 708 napi_enable(&priv->napi);
709 ipoib_ib_dev_stop(dev, flush); 709 ipoib_ib_dev_stop(dev);
710 return -1; 710 return -1;
711} 711}
712 712
@@ -738,7 +738,7 @@ int ipoib_ib_dev_up(struct net_device *dev)
738 return ipoib_mcast_start_thread(dev); 738 return ipoib_mcast_start_thread(dev);
739} 739}
740 740
741int ipoib_ib_dev_down(struct net_device *dev, int flush) 741int ipoib_ib_dev_down(struct net_device *dev)
742{ 742{
743 struct ipoib_dev_priv *priv = netdev_priv(dev); 743 struct ipoib_dev_priv *priv = netdev_priv(dev);
744 744
@@ -807,7 +807,7 @@ void ipoib_drain_cq(struct net_device *dev)
807 local_bh_enable(); 807 local_bh_enable();
808} 808}
809 809
810int ipoib_ib_dev_stop(struct net_device *dev, int flush) 810int ipoib_ib_dev_stop(struct net_device *dev)
811{ 811{
812 struct ipoib_dev_priv *priv = netdev_priv(dev); 812 struct ipoib_dev_priv *priv = netdev_priv(dev);
813 struct ib_qp_attr qp_attr; 813 struct ib_qp_attr qp_attr;
@@ -880,8 +880,7 @@ timeout:
880 /* Wait for all AHs to be reaped */ 880 /* Wait for all AHs to be reaped */
881 set_bit(IPOIB_STOP_REAPER, &priv->flags); 881 set_bit(IPOIB_STOP_REAPER, &priv->flags);
882 cancel_delayed_work(&priv->ah_reap_task); 882 cancel_delayed_work(&priv->ah_reap_task);
883 if (flush) 883 flush_workqueue(priv->wq);
884 flush_workqueue(priv->wq);
885 884
886 begin = jiffies; 885 begin = jiffies;
887 886
@@ -918,7 +917,7 @@ int ipoib_ib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
918 (unsigned long) dev); 917 (unsigned long) dev);
919 918
920 if (dev->flags & IFF_UP) { 919 if (dev->flags & IFF_UP) {
921 if (ipoib_ib_dev_open(dev, 1)) { 920 if (ipoib_ib_dev_open(dev)) {
922 ipoib_transport_dev_cleanup(dev); 921 ipoib_transport_dev_cleanup(dev);
923 return -ENODEV; 922 return -ENODEV;
924 } 923 }
@@ -1040,12 +1039,12 @@ static void __ipoib_ib_dev_flush(struct ipoib_dev_priv *priv,
1040 } 1039 }
1041 1040
1042 if (level >= IPOIB_FLUSH_NORMAL) 1041 if (level >= IPOIB_FLUSH_NORMAL)
1043 ipoib_ib_dev_down(dev, 0); 1042 ipoib_ib_dev_down(dev);
1044 1043
1045 if (level == IPOIB_FLUSH_HEAVY) { 1044 if (level == IPOIB_FLUSH_HEAVY) {
1046 if (test_bit(IPOIB_FLAG_INITIALIZED, &priv->flags)) 1045 if (test_bit(IPOIB_FLAG_INITIALIZED, &priv->flags))
1047 ipoib_ib_dev_stop(dev, 0); 1046 ipoib_ib_dev_stop(dev);
1048 if (ipoib_ib_dev_open(dev, 0) != 0) 1047 if (ipoib_ib_dev_open(dev) != 0)
1049 return; 1048 return;
1050 if (netif_queue_stopped(dev)) 1049 if (netif_queue_stopped(dev))
1051 netif_start_queue(dev); 1050 netif_start_queue(dev);