Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Sep 1999 20:16:13 -0700
From:      Jason Thorpe <thorpej@nas.nasa.gov>
To:        Bill Paul <wpaul@skynet.ctr.columbia.edu>
Cc:        hackers@freebsd.org
Subject:   Re: Tulip device driver question 
Message-ID:  <199909080316.UAA21624@lestat.nas.nasa.gov>

next in thread | raw e-mail | index | archive | help
On Tue, 7 Sep 1999 21:13:22 -0400 (EDT) 
 Bill Paul <wpaul@skynet.ctr.columbia.edu> wrote:

 > Well, the older chipsets make it even harder on you: you have to know
 > just the right way to twiddle the bits in the GPIO register in order to
 > program the media settings, and to figure that out you're supposed to
 > read the media description from the SROM, which is sometimes wrong.
 > This opens up a whole other set of quirks.

Yah.  This is pretty annoying.  At least DEC spec'd it to be in the SROM :-)

When it's wrong, the `de' driver gets it wrong, too.  Linux actually quirks
some boards which have incorrect SROM settings.  I guess someone was willing
to trace the traces on the boards (ick!).

 > I'm assuming you actually have a Winbond card. If you do, try this for

Yah, some Unicom card, I think.

 > me: connect the Winbond to a link partner who's media settings you can

[ . . . snip . . . ]

 > Winbond that if I changed the link partner's speed settings, it would
 > start DMAing all kinds of crap into the host's memory. Furthermore, I
 > think it ignores the RX buffer lengths specified in the receive descriptor
 > ring and trashes various chunks of memory that it shouldn't, leading to
 > a crash. Given that I never observed this behavior with any of the other
 > tulip clones using similar code, I was pretty sure this was a chip bug and
 > not some horrible coding error that I had made somewhere.

Yes, I have seen exactly this.  I could only get it to happen if I changed
the Winbond's link partner from 10 -> 100 while the Winbond was still in 10.

I see the TDSTAT_Rx_FS and TDSTAT_Rx_LS bits cleared in the descriptor,
as well.  When I see this condition occur, I attempt to reset the chip.
This does NOT help this condition on the Winbond.  It's thorougly wedged.

Oh yay, cheap chips.

 > I saw this with at least three separate Winbond cards and I tried my
 > best to detect the condition and smack the chip upside the head to make
 > it stop, but I'd be interested to see somebody else duplicate the problem
 > and give me their take on it.

Were you ever able to smack it and make it stop?  :-)

 > Also, just out of curiosity, have you ever observed the PNIC receiver
 > bug that gave me so many fits?

I observed it briefly back when there were still some pretty basic bugs
in the driver, which have since been squashed.  I haven't seen it since.
I'm aware of the nature of the problem and your work-around.  I'm hoping
I don't need to implement it :-)

I have seen some pretty awful problems with the PNIC, tho.  The DMA engine
is a piece of crap.  On a 500MHz AlphaStation 500, who's PCI bus can surely
keep up with a cheap fast Ethernet board, the PNIC gets constant DMA underruns
unless in Store-and-Forward mode, *including the setup frame*.  I have to
initialize the chip into S-F mode just to get the damn filter programmed :-)

I also noticed that DMA underruns don't abort the transmit pipe on the PNIC.
Every DMA underrun on a real packet corresponded to a junk frame hitting
the wire.  A short frame I could understand... but we're talking even the
Ethernet header is toast.

Another interesting problem I've been seeing; The very first setup frame
fails to complete.  All subsequent setup frames succeed.  Including setup
frames sent after an ifconfig down/up.  Utterly bizarre.

Oh yay, cheap chips.

...speaking of the PNIC ... I sent you some mail asking where you got
your PNIC manuals... I have been unable to locate any.  I haven't even
been able to find the correct contact at Lite-On.  Every Lite-On company
I find seems to not have any networking products... *puzzled*  Anyhow, just
wondering if you missed that message...

 > There's at least one that has a cardbus version... darnit, which is
 > is it. Oh: it's the ADMtek. There's an AL982 designed for PCMCIA and
 > cardbus use. Unfortunately, the data sheet for it is not on ADMtek's
 > server, but it's probably the same core as the AL981. In any case, I
 > don't know of any boards that use the AL982. For that matter, I'm not
 > even sure which boards use the AL981: the only cards I have are the
 > samples that ADMtek sent me, and I haven't seen any board resellers
 > claiming to use it.

I'd like to get more info from you about these contacts... I have one each of:

	* PNIC board (NetGear variety)
	* Macronix board ('15 variety, SOHO)
	* Winbond board (Unicom thingie)

...and am looking to get ahold of more in order to get this merged driver
hammered out.

 > If you can actually get it all to work and retain some portion of your
 > sanity, I'll be mighty impressed.

...you could argue that if I'm even trying at all, I don't have any sanity
to begin with :-)

        -- Jason R. Thorpe <thorpej@nas.nasa.gov>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909080316.UAA21624>