Subject: Re: PCMCIA if_ne: struct ne2000dev
To: Ignatios Souvatzis <>
From: Stefan Grefen <>
List: tech-kern
Date: 01/18/1999 22:53:57
In message <>  Ignatios Souvatzis wrote:
> On Mon, Jan 18, 1999 at 12:41:21PM +0100, Ingolf Koch wrote:
> > [struct ne2000dev, especially on the enet_maddr entry
> >  in /usr/src/sys/dev/pcmcia/if_ne_pcmcia.c]
> > 
> > On Mon, Jan 18, 1999 at 01:09:33AM +0100, Ignatios Souvatzis wrote:
> > 
> > > Apparently it is not known how to get the Ethernet
> > > address in a general way out of the PCMCIA CIS information of ne2000 pcmcia
> > > cards, so it was chosen to have an table of card name vs. address offset in
> > > configuration space.
> > 
> > Does that mean: "there is no way to extract the address" or rather
> > "there probably is one, but we do not know"?
> I guess the latter. Although PC peripheral designers have done a lot of
> stupid things, so I wouldn't be surprised if there wasn't any way. Sane
> chipsets have a way to do this.

Wrong guess :-) Older NE cards (esp. cheap ones) decided to place
the ethernet address in various places:
    1) CIS with correct tag
    2) CIS .. after the end of the CIS-structure
    3) Same method as reals NE2000 (PIO from PROM)
    4) ...

I guess for modern cards we should check the CIS-tag and only if that
fails dive down into the dark-pit of ne2000dev.enet_maddr ...

> I guess something with a ne card should dump the CIS structure... if there
> is a sane tag to look for, it should be obvious.


> 	-is

Stefan Grefen                                Tandem Computers Europe Inc.                       High Performance Research Center
 --- Hacking's just another word for nothing left to kludge. ---