Subject: Re: kern/34834 ste driver generates packet burst after timeout
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Michael van Elst <mlelstv@serpens.de>
List: netbsd-bugs
Date: 01/04/2007 20:30:02
The following reply was made to PR kern/34834; it has been noted by GNATS.

From: Michael van Elst <mlelstv@serpens.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/34834 ste driver generates packet burst after timeout
Date: Thu, 4 Jan 2007 21:28:10 +0100

 I had a look at the FreeBSD driver and found that the watchdog
 function polls the device for interrupts before resetting it.
 
 The following equivalent patch seems to eliminate the packet bursts:
 
 Index: if_ste.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pci/if_ste.c,v
 retrieving revision 1.25
 diff -u -r1.25 if_ste.c
 --- if_ste.c	16 Nov 2006 01:33:09 -0000	1.25
 +++ if_ste.c	4 Jan 2007 20:24:29 -0000
 @@ -784,6 +784,8 @@
  	printf("%s: device timeout\n", sc->sc_dev.dv_xname);
  	ifp->if_oerrors++;
  
 +	ste_txintr(sc);
 +	ste_rxintr(sc);
  	(void) ste_init(ifp);
  
  	/* Try to get more packets going. */
 
 I still see the device timeouts, but the driver now recovers quickly.
 
 -- 
                                 Michael van Elst
 Internet: mlelstv@serpens.de
                                 "A potential Snark may lurk in every tree."