Subject: ze0: xmit logic died .. again
To: None <port-vax@netbsd.org>
From: Michael Schneider <ms@silke.rt.schwaben.de>
List: port-vax
Date: 07/13/2002 22:47:36
Hello,

i don't want to believe it myself, but this little patch (below)
caused my VAX 4000/200's sgec to really behave:
- no "xmit logic died" message
- no ethernet lockups
- network performance seems ok, not lower than "normal".

This with a machine that previously was totally unuseable when
netbooted / root mounted via nfs.
I am running -current, latest snapshot. root is still mounted via
nfs/udp. The machine is currently building a kernel, with no network
problems. This was unthinkable before.

The code change was 'stolen' from pre-1.4.2 versions of the sgec driver,
just because these versions worked for me once...

Does this make sense for someone???
Could someone else with another 4000/200 or maybe a 4000/90 try this
out?
I mean, now the code just looks *wrong*, but it seems to work...

The patch:

--- sgec.c.orig	Sat Jul 13 22:12:16 2002
+++ sgec.c	Sat Jul 13 22:14:25 2002
@@ -318,7 +318,6 @@
 	paddr_t	buffer;
 	struct mbuf *m, *m0;
 	int idx, len, i, totlen, error;
-	int old_inq = sc->sc_inq;
 	short orword;
 
 	while (sc->sc_inq < (TXDESCS - 1)) {
@@ -400,7 +399,7 @@
 	if (sc->sc_inq == (TXDESCS - 1))
 		ifp->if_flags |= IFF_OACTIVE;
 
-out:	if (old_inq < sc->sc_inq)
+out:	if (sc->sc_inq)
 		ifp->if_timer = 5; /* If transmit logic dies */
 }
 
@@ -460,8 +459,7 @@
 				sc->sc_txmbuf[idx] = 0;
 			}
 		}
-		if (sc->sc_inq == 0)
-			ifp->if_timer = 0;
+		ifp->if_timer = 0;
 		ifp->if_flags &= ~IFF_OACTIVE;
 		zestart(ifp); /* Put in more in queue */
 	}



-- 
Michael Schneider                       email: ms@vaxcluster.de
Germany                                  http://www.vaxcluster.de

                     Sieben auf einen Streich