All of lore.kernel.org
 help / color / mirror / Atom feed
* PATCH 2.6.17-rc5 tulip free_irq() called too late
@ 2006-05-31 19:52 Grant Grundler
  2006-06-08 14:43 ` Jeff Garzik
  0 siblings, 1 reply; 30+ messages in thread
From: Grant Grundler @ 2006-05-31 19:52 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev

Jeff,
SLES10 testing exposed an MCA that was confirmed to be a DMA IO TLB miss.
This means tulip device was attempting to DMA to memory that was already
unmapped. The test was crashing in the "ifconfig down" step when a 4-port
tulip card was under this work load:

while :
do
	ifconfig eth24 up
	ifconfig eth25 up
	ifconfig eth26 up
	ifconfig eth27 up
        # Pound both interfaces with ethtool
        for i in `seq 1000`
        do
                ethtool eth24 &>/dev/null
                ethtool eth25 &>/dev/null
                ethtool eth26 &>/dev/null
                ethtool eth27 &>/dev/null
        done

	# Bring interfaces down
        echo ifconfig $nic1 down
        ifconfig eth24 down
        ifconfig eth25 down
        ifconfig eth26 down
        ifconfig eth27 down

        sleep 5
done


[ And yes, I know tulip doesn't support ethtool. Don't ask.
  It's still a sore point at the moment. Just consider it 
  a delay loop or use "sleep 5" instead. ]

The real "network load" comes from another box(en) running 4 instances
of "ping -f -s 1450 192.168.x.y" where "x.y" is the subnet/IP of eth24-27.
The parisc and ia64 machines will crash in minutes.

I believe the problem is a race condition between an interrupt coming
in and the tulip_down() code path. Moving the "free_irq()" to before
tulip_down() call fixes the problem. I've been able to run the above
test for several hours now.
Please apply.

thanks,
grant


Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

--- a/drivers/net/tulip/tulip_core.c
+++ b/drivers/net/tulip/tulip_core.c
@@ -18,11 +18,11 @@
 
 #define DRV_NAME	"tulip"
 #ifdef CONFIG_TULIP_NAPI
-#define DRV_VERSION    "1.1.13-NAPI" /* Keep at least for test */
+#define DRV_VERSION    "1.1.14-NAPI" /* Keep at least for test */
 #else
-#define DRV_VERSION	"1.1.13"
+#define DRV_VERSION	"1.1.14"
 #endif
-#define DRV_RELDATE	"December 15, 2004"
+#define DRV_RELDATE	"May 31, 2006"
 
 
 #include <linux/module.h>
@@ -772,14 +774,13 @@ static int tulip_close (struct net_devic
 	int i;
 
 	netif_stop_queue (dev);
-
+	free_irq (dev->irq, dev);    /* don't let IRQs race w/tulip_down() */
 	tulip_down (dev);
 
 	if (tulip_debug > 1)
 		printk (KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n",
 			dev->name, ioread32 (ioaddr + CSR5));
 
-	free_irq (dev->irq, dev);
 
 	/* Free all the skbuffs in the Rx queue. */
 	for (i = 0; i < RX_RING_SIZE; i++) {

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2006-06-26 22:33 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-31 19:52 PATCH 2.6.17-rc5 tulip free_irq() called too late Grant Grundler
2006-06-08 14:43 ` Jeff Garzik
2006-06-08 15:22   ` Grant Grundler
2006-06-08 15:32     ` Grant Grundler
2006-06-08 15:38       ` Jeff Garzik
2006-06-08 15:47         ` Grant Grundler
2006-06-08 15:32     ` Jeff Garzik
2006-06-08 15:36       ` Grant Grundler
2006-06-08 17:01   ` Grant Grundler
2006-06-13 23:55     ` PATCHv3 " Grant Grundler
2006-06-14  0:06       ` Valerie Henson
2006-06-14  0:33       ` Jeff Garzik
2006-06-14  4:44         ` Grant Grundler
2006-06-14 13:05           ` Kyle McMartin
2006-06-14 14:54             ` Grant Grundler
2006-06-14 15:03           ` Jeff Garzik
2006-06-14 18:14             ` Grant Grundler
2006-06-14 19:51               ` Jeff Garzik
2006-06-14 22:25                 ` Grant Grundler
2006-06-14 20:47               ` Francois Romieu
2006-06-14 22:30                 ` Grant Grundler
2006-06-15 20:30                   ` Francois Romieu
2006-06-16  5:47                     ` Grant Grundler
2006-06-16  7:32                       ` Jeff Garzik
2006-06-16 15:25                         ` Grant Grundler
     [not found]                         ` <20060616152400.GA7868@colo.lackof.org>
     [not found]                           ` <4492CE98.50900@pobox.com>
2006-06-16 16:06                             ` Grant Grundler
2006-06-16 16:16                               ` Jeff Garzik
2006-06-22  0:43       ` Valerie Henson
2006-06-23  5:00         ` Grant Grundler
2006-06-26 22:31           ` [PATCH] Fix tulip shutdown DMA/irq race Valerie Henson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.