Subject: Re: port-i386/4830: NE2000 ethernet board interrupt trouble
To: None <current-users@NetBSD.ORG>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: current-users
Date: 01/16/1998 14:40:42
On 16 Jan 1998 22:14:19 GMT 
 tron@lyssa.owl.de (Matthias Scheler) wrote:

 > So that bug can occur on a system running with correct hardware
 > settings, too?

It can happen on any fast machine... as far as I can tell, it's purely
a function of how fast your processor can do this:

	int i = 5000;

	while (i--)
		;

 > I agree that this kind of bugs exist. But reading his bug report I had
 > the impression that his fix was kludge to give his poor overstressed
 > hardware time to recover. The 337 MHz indicates that he's not only
 > overclocking the CPU but the system bus so that any kind of failures
 > of the I/O hardware are a logical consequence. I really would like to
 > know if the bug can be reproduced on a system without overclocked bus
 > speed.
 > 
 > > A delay in that loop is appropriate.
 > 
 > Can't it cause reduced throughput on slow systems?

Umm... From the line numbers listed in his patch, it certainly looked
like the additional delay was needed in dp8390.c:dp8390_stop().  Did
I misread something?

Given that he said the card worked if he did:

	ifconfig ne0 down
	ifconfig ne0 up

...it leads me to believe that the dp8390_stop() in dp8390_config() didn't
actually put the chip in the expected state, which is why the reset caused
by the down/up cycle worked; the chip had entered that state later, and took
less time to recover the next time around.

Am I missing something here?

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                            Home: +1 408 866 1912
NAS: M/S 258-6                                       Work: +1 650 604 0935
Moffett Field, CA 94035                             Pager: +1 415 428 6939