(no subject)
Subsystems (2)
From: Robert Olsson <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <[email protected]>
Date: Thu, 18 Sep 2003 20:35:36 +0200
To: Andrew Morton <[email protected]>
Cc: Jeff Garzik <[email protected]>,
[email protected],
[email protected]
Subject: Re: netif_poll_disable() hangs
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]> <[email protected]>
X-Mailer: VM 6.92 under Emacs 21.2.1
Quoted 7 lines · Andrew Morton
Quoted 5 lines
Quoted 5 lines
ifup eth0 ifdown eth0 ifup eth0 ifdown eth0 <- hangs in dev_close -> netif_poll_disable()2.4 does
test_bit, 2.6 doestest_and_set_bit.
Yeep. I noticed this too in 2.6.0-test5
linux/netdevice.h renamed from linux/netdevice.h.orig +2 -2
@@ -830,9 +830,9 @@local_irq_restore (flags); } -static inline void netif_poll_disable (struct net_device *dev) +static inline void netif_poll_sync (struct net_device *dev) { -while (test_and_set_bit (__LINK_STATE_RX_SCHED, &dev->state)) { +while (test_bit (__LINK_STATE_RX_SCHED, &dev->state)) {/* No hurry. */ current->state =TASK_INTERRUPTIBLE ;schedule_timeout (1 );
core/dev.c renamed from core/dev.c.orig +1 -1
@@ -841,7 +841,7 @@* engine, but this requires more changes in devices. */ smp_mb__after_clear_bit ();/* Commit netif_running(). */ -netif_poll_disable (dev); +netif_poll_sync (dev);/* * Call the device specific close. This cannot fail.
Cheers.
--ro
Re: your mail
On Thu, Sep 18, 2003 at 08:35:36PM +0200, Robert Olsson wrote:
This issue is already fixed in 2.4 and 2.5 :)
Quoted 4 lines
linux/netdevice.h renamed from linux/netdevice.h.orig +0
-0@@ -830,9 +830,9 @@local_irq_restore (flags);
linux/netdevice.h line 838
Quoted 10 lines
linux/netdevice.h renamed from linux/netdevice.h.orig +2
-2} -static inline void netif_poll_disable (struct net_device *dev) +static inline void netif_poll_sync (struct net_device *dev) { -while (test_and_set_bit (__LINK_STATE_RX_SCHED, &dev->state)) { +while (test_bit (__LINK_STATE_RX_SCHED, &dev->state)) {/* No hurry. */ current->state =TASK_INTERRUPTIBLE ;schedule_timeout (1 );
This patch breaks tg3 build, and operation... tg3 wants a different operation than net/core/dev.c.
Jeff