[PATCH] fix ifdown/ifup bug

From: Jeff Garzik
Date: Fri Sep 12 2003 - 16:12:58 EST


Marcelo,

If you haven't gotten this patch from somebody else, please make sure this is applied. It fixes a bug I introduced in -pre3 when moving some helpers from tg3 to netdevice.h.

Jeff


diff -Nru a/net/core/dev.c b/net/core/dev.c
--- a/net/core/dev.c Fri Sep 12 17:10:03 2003
+++ b/net/core/dev.c Fri Sep 12 17:10:03 2003
@@ -851,7 +851,11 @@
* 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.