Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Sep 1999 21:13:22 -0400 (EDT)
From:      Bill Paul <wpaul@skynet.ctr.columbia.edu>
To:        thorpej@nas.nasa.gov
Cc:        hackers@freebsd.org
Subject:   Re: Tulip device driver question
Message-ID:  <199909080113.VAA06935@skynet.ctr.columbia.edu>
In-Reply-To: <199909072136.OAA18714@lestat.nas.nasa.gov> from "Jason Thorpe" at Sep 7, 99 02:36:00 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Of all the gin joints in all the towns in all the world, Jason Thorpe 
had to walk into mine and say:

> [ snip ... all the quirks ]
> 
> ...I'm well aware of all of these :-)
> 
> Amusingly, these are the same kinds of quirks you have to deal with for
> a unified *genuine DEC Tulip* driver.  E.g. 21143s have internal NWAY and
> MII; board manufacturer gets to choose which to use.

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.

> In any case, I have a single driver for NetBSD that works with both the PNIC
> and Winbond clones, and I'm working on support for the other clones.

I'm assuming you actually have a Winbond card. If you do, try this for
me: connect the Winbond to a link partner who's media settings you can
easily control, like a managed switch port or another NIC via crossover
cable. Set the Winbond and its link partner to 100Mbps half-duplex.
Exchange a little traffic; a couple of pings should be enough. Then
go to the link partner and change the media settings to 10Mbps half-duplex.
Observe the Winbond closely. (Alternatively, start out with both devices
set to 10Mbps half-duplex and then set the other end to 100Mbps half-duplex.
I don't remember if both cases have the same result.)

Initially I do traffic tests by plugging in the new device directly to
another NIC with a driver that supports ifmedia using a crossover cable.
This lets me test the card in all media settings. I noticed with the
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.

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.

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

>  > And that's just the PCI devices: who knows what other oddities will
>  > turn up once we have cardbus support. (And we will have cardbus support
>  > some day soon, right Warner? Hello? Warner? You okay? Hm. Somebody want to 
>  > call an ambulance for Warner? Thank you. Breathe, Warner. _Breathe._
>  > That's better.)
> 
> I think most of the Tulip-like CardBus boards use 21143s.  Thankfully.
> AFAIK, none of the current sets of clones are designed for CardBus
> applications.

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.

> BTW, you forgot EISA (DE-425) ... when I finish all the clone support
> in my unified driver, I'm going to migrate support for the genuine DEC
> chips, as well.

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

-Bill

-- 
=============================================================================
-Bill Paul            (212) 854-6020 | System Manager, Master of Unix-Fu
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
 "It is not I who am crazy; it is I who am mad!" - Ren Hoek, "Space Madness"
=============================================================================


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?199909080113.VAA06935>