]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix netdev close
authorJeff Garzik <jgarzik@pobox.com>
Tue, 9 Sep 2003 02:46:25 +0000 (19:46 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 9 Sep 2003 02:46:25 +0000 (19:46 -0700)
This should fix the "ifconfig down ...  ifconfig up" problems some
people have seen.

net/core/dev.c

index 2cf887cee6d7a4e41079407bd942ef89677bb47a..427100bd7f820694e1c2304de8227c060827fda9 100644 (file)
@@ -841,7 +841,11 @@ int dev_close(struct net_device *dev)
         * engine, but this requires more changes in devices. */
 
        smp_mb__after_clear_bit(); /* Commit netif_running(). */
-       netif_poll_disable(dev);
+       while (test_bit(__LINK_STATE_RX_SCHED, &dev->state)) {
+               /* No hurry. */
+               current->state = TASK_INTERRUPTIBLE;
+               schedule_timeout(1);
+       }
 
        /*
         *      Call the device specific close. This cannot fail.