[3661] in linux-net channel archive

home help back first fref pref prev next nref lref last post

Re: 3c595 and repeatable trivial network crash!

daemon@ATHENA.MIT.EDU (Paul Gortmaker)
Sat Jul 13 05:10:53 1996

From: Paul Gortmaker <gpg109@rsphy1.anu.edu.au>
To: ewerlid@syscon.uu.se (Ove Ewerlid)
Date: 	Fri, 12 Jul 1996 12:20:48 +1000 (EST)
Cc: linux-net@vger.rutgers.edu, ewerlid@syscon.uu.se
In-Reply-To: <31E4890B.237D0CC@syscon.uu.se> from "Ove Ewerlid" at Jul 11, 96 06:54:35 am

> A can consistantly break the network on linux machines using
> 3c595-cards with large buffers (true for 1.3.9x - 2.0.x).

Does 2.0.x include 2.04 and up? Alan has snuck in the updated driver
from Donald's site since the older version was apparently useless
with the '590 cards that have a ridiculously tiny amount of RAM.
Might be worth checking that out if you haven't already.

> The buffer size is 64 Kword (128 Kb) in the cards I use.
> 
>    1)	Log in to the machine with the 3c595 card from another
> 	linux box (in this case with a 3c509B).
> 
>    2)	Start x11perf and the network freezes within seconds!
> 
> 
> you can cure the problem by replacing the 3c595 with a 3c590.
> The 3c590 has 8 kb buffer.

8kB RAM on a modern card. Hrmmph. Oh well.

> When the net has hanged you can fix it by 'ifconfig ethX down/up'.
> The interface seems to receive packets but none is sent during the
> hanged condition.

I take it the interface refuses to send, and it is not just the one
connection that is hung. I guess a missed/lost/whatever Tx done interrupt
could leave the interface flagged as busy so the bottom half doesn't
touch the card to fire off any more packets.

You might want to try this hack^H^H^H^H patch to see if that is indeed
what is happening. Note 3sec may not be long enough if you are using a
slow or noisy SLIP/PPP link as well as ether. If you aren't using any
slow links, you can cut that down to HZ/2 or less for the ether case.

Paul.
--
main(){long i,f,m=19248;f=open("/dev/tty",0);if(!fork())for(;;i++,ioctl(f,m,
(1<<23)+(rand()&2047)),ioctl(f,m+2,rand()%8),sleep(1));} /* Linux Console */


--- linux/net/core/dev.c~	Fri Jul  5 13:13:00 1996
+++ linux/net/core/dev.c	Fri Jul  5 13:25:27 1996
@@ -534,10 +534,18 @@
 
 	for (dev = dev_base; dev != NULL; dev = dev->next)
 	{
-		if (dev->flags != 0 && !dev->tbusy) {
+		if (dev->flags == 0) continue;
+		if (!dev->tbusy) {
 			/*
 			 *	Kick the device
 			 */
+			dev_tint(dev);
+		} else if (jiffies - dev->trans_start >= 3*HZ) {
+			/*
+			 *	Hrrm, asleep at the wheel for >= 3 sec!?!
+			 *	Kick it anyway!
+			 */
+			printk("%s: Possible lost Tx interrupt?\n", dev->name);
 			dev_tint(dev);
 		}
 	}


home help back first fref pref prev next nref lref last post