Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / drivers / infiniband / ulp / ipoib / ipoib_main.c
index 8be9ea0..1b1df5c 100644 (file)
@@ -156,14 +156,8 @@ static int ipoib_stop(struct net_device *dev)
 
        netif_stop_queue(dev);
 
-       /*
-        * Now flush workqueue to make sure a scheduled task doesn't
-        * bring our internal state back up.
-        */
-       flush_workqueue(ipoib_workqueue);
-
-       ipoib_ib_dev_down(dev, 1);
-       ipoib_ib_dev_stop(dev, 1);
+       ipoib_ib_dev_down(dev, 0);
+       ipoib_ib_dev_stop(dev, 0);
 
        if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) {
                struct ipoib_dev_priv *cpriv;
@@ -548,7 +542,7 @@ static int path_rec_start(struct net_device *dev,
                                   path_rec_completion,
                                   path, &path->query);
        if (path->query_id < 0) {
-               ipoib_warn(priv, "ib_sa_path_rec_get failed\n");
+               ipoib_warn(priv, "ib_sa_path_rec_get failed: %d\n", path->query_id);
                path->query = NULL;
                return path->query_id;
        }
@@ -1081,6 +1075,7 @@ static void ipoib_setup(struct net_device *dev)
 
        INIT_DELAYED_WORK(&priv->pkey_poll_task, ipoib_pkey_poll);
        INIT_DELAYED_WORK(&priv->mcast_task,   ipoib_mcast_join_task);
+       INIT_WORK(&priv->carrier_on_task, ipoib_mcast_carrier_on_task);
        INIT_WORK(&priv->flush_light,   ipoib_ib_dev_flush_light);
        INIT_WORK(&priv->flush_normal,   ipoib_ib_dev_flush_normal);
        INIT_WORK(&priv->flush_heavy,   ipoib_ib_dev_flush_heavy);
@@ -1314,7 +1309,7 @@ sysfs_failed:
 
 register_failed:
        ib_unregister_event_handler(&priv->event_handler);
-       flush_scheduled_work();
+       flush_workqueue(ipoib_workqueue);
 
 event_failed:
        ipoib_dev_cleanup(priv->dev);
@@ -1373,7 +1368,12 @@ static void ipoib_remove_one(struct ib_device *device)
 
        list_for_each_entry_safe(priv, tmp, dev_list, list) {
                ib_unregister_event_handler(&priv->event_handler);
-               flush_scheduled_work();
+
+               rtnl_lock();
+               dev_change_flags(priv->dev, priv->dev->flags & ~IFF_UP);
+               rtnl_unlock();
+
+               flush_workqueue(ipoib_workqueue);
 
                unregister_netdev(priv->dev);
                ipoib_dev_cleanup(priv->dev);