Subject: Re: Strange errors from qec in Sparc Classic
To: <>
From: David Laight <david@l8s.co.uk>
List: port-sparc
Date: 01/22/2002 13:01:31
Christian Dueholm Christensen wrote:
> 
> I have an old Classic that I use as a ipf/ipnat box. The box used to run
> OpenBSD 2.8, but I "upgraded" to NetBSD 1.5.2 this weekend and since then
> I've been getting some strange errors on the external interface (qe0). I
> use the builtin interface as the internal link.
> 
> The box is running fine, there are no lockups or performance problems but
> I am getting a lot of these in /var/log/messages:
> 
> qe0: rint: no packets; rb index 43; status 0x80000800
> qe0: rint: no packets; rb index 52; status 0x80000800
> qe0: rint: no packets; rb index 66; status 0x80000800
> qe0: rint: no packets; rb index 70; status 0x80000800
> 
> The "rb index" number varies from about 0 - 255 and the entries
> appears several times a second when there is traffic on qe0.

This is a simple bug in the qe driver.  Since I can't see it doing any
writes to clear the irq request (so they are not sitting in a store
buffer anywhere), the read of the status must clear it.

What happens is that if a packet arrives just after the status is
cleared, it will set the 'rx packet available' IRQ, but the loop will
process the packet anyway.  This means the ISR will be re-entered and
find nothing to do.

Solutions:

1) delete the printf and all associated code!
2) make the driver loop withing the ISR until there is no longer a
request pending

FYI the 'current' sources have this printf disable unless sc->sc_debug
is non-zero.

	David