Skip to contentSkip to conversation

dev_close: use of netif_poll_disable

PATCH In review Francois Romieu 2 participants 2 messages Oct 2, 2004 – Oct 3, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dev_close: use of netif_poll_disable

Use of identical (comment included) netif_poll_disable().

net/core/dev.c renamed from net/core/dev.c~dev_close-cleanup +2 -5
diff -puN net/core/dev.c~dev_close-cleanup net/core/dev.c
@@ -959,11 +959,8 @@ int dev_close(struct net_device *dev)
 	 * engine, but this requires more changes in devices. */
 
 	smp_mb__after_clear_bit(); /* Commit netif_running(). */
-	while (test_bit(__LINK_STATE_RX_SCHED, &dev->state)) {
-		/* No hurry. */
-		current->state = TASK_INTERRUPTIBLE;
-		schedule_timeout(1);
-	}
+
+	netif_poll_disable(dev);
 
 	/*
 	 *	Call the device specific close. This cannot fail.

_

#1 lore raw
Quoted 3 lines · On Sat, 2 Oct 2004 22:28:05 +0200 Francois Romieu <[email protected]> wrote:

Use of identical (comment included) netif_poll_disable().

It's not identical. netif_poll_disable() actually sets the __LINK_STATE_RX_SCHED bit when it finally sees it clear.

Whereas this code in net/core/dev.c is just waiting for it to clear.