diff options
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_ib.c | 6 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index da6082739839..e7e5adf84e84 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c | |||
@@ -685,7 +685,8 @@ int ipoib_ib_dev_open(struct net_device *dev) | |||
685 | queue_delayed_work(ipoib_workqueue, &priv->ah_reap_task, | 685 | queue_delayed_work(ipoib_workqueue, &priv->ah_reap_task, |
686 | round_jiffies_relative(HZ)); | 686 | round_jiffies_relative(HZ)); |
687 | 687 | ||
688 | set_bit(IPOIB_FLAG_INITIALIZED, &priv->flags); | 688 | if (!test_and_set_bit(IPOIB_FLAG_INITIALIZED, &priv->flags)) |
689 | napi_enable(&priv->napi); | ||
689 | 690 | ||
690 | return 0; | 691 | return 0; |
691 | } | 692 | } |
@@ -804,7 +805,8 @@ int ipoib_ib_dev_stop(struct net_device *dev, int flush) | |||
804 | struct ipoib_tx_buf *tx_req; | 805 | struct ipoib_tx_buf *tx_req; |
805 | int i; | 806 | int i; |
806 | 807 | ||
807 | clear_bit(IPOIB_FLAG_INITIALIZED, &priv->flags); | 808 | if (test_and_clear_bit(IPOIB_FLAG_INITIALIZED, &priv->flags)) |
809 | napi_disable(&priv->napi); | ||
808 | 810 | ||
809 | ipoib_cm_dev_stop(dev); | 811 | ipoib_cm_dev_stop(dev); |
810 | 812 | ||
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 421a6640c9bd..ab2c192c76bc 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -106,8 +106,7 @@ int ipoib_open(struct net_device *dev) | |||
106 | 106 | ||
107 | ipoib_dbg(priv, "bringing up interface\n"); | 107 | ipoib_dbg(priv, "bringing up interface\n"); |
108 | 108 | ||
109 | if (!test_and_set_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags)) | 109 | set_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags); |
110 | napi_enable(&priv->napi); | ||
111 | 110 | ||
112 | if (ipoib_pkey_dev_delay_open(dev)) | 111 | if (ipoib_pkey_dev_delay_open(dev)) |
113 | return 0; | 112 | return 0; |
@@ -143,7 +142,6 @@ err_stop: | |||
143 | ipoib_ib_dev_stop(dev, 1); | 142 | ipoib_ib_dev_stop(dev, 1); |
144 | 143 | ||
145 | err_disable: | 144 | err_disable: |
146 | napi_disable(&priv->napi); | ||
147 | clear_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags); | 145 | clear_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags); |
148 | 146 | ||
149 | return -EINVAL; | 147 | return -EINVAL; |
@@ -156,7 +154,6 @@ static int ipoib_stop(struct net_device *dev) | |||
156 | ipoib_dbg(priv, "stopping interface\n"); | 154 | ipoib_dbg(priv, "stopping interface\n"); |
157 | 155 | ||
158 | clear_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags); | 156 | clear_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags); |
159 | napi_disable(&priv->napi); | ||
160 | 157 | ||
161 | netif_stop_queue(dev); | 158 | netif_stop_queue(dev); |
162 | 159 | ||