Subject: Re: new pcmcia devices
To: Christos Zoulas <christos@zoulas.com>
From: Steven M. Bellovin <smb@research.att.com>
List: netbsd-users
Date: 07/10/2003 16:53:06
In message <HHtpp5.Dxz@tac.nyc.ny.us>, Christos Zoulas writes:
>In article <20030710153531.1CFC77B4D@berkshire.research.att.com>,
>Steve Bellovin <smb@research.att.com> wrote:
>>I have an oddball pcmcia card that emulates an NE2000.  When I plug
>>it in, the kernel says:
>>
>>ASIX, AX88790,  (manufacturer 0xffff, product 0x1090) at pcmcia0, 
>>function 0 not configured
>>
>>I assume I need to add an entry to if_ne_pcmcia.c.  I know what the
>>character string should be, and I assume that the manufacturer
>>and product are 0xffff and 0x1090.  What do I put for the cis_info,
>>function,enet_maddr, enet_vendr, and flags?  Is there anything else
>>I need to do?
>
>You need to edit pcmciadevs and add the strings; then you need to
>make -f Makefile.pcmciadevs. But you cannot use 0xffff as the manufacturer
>because that is the placeholder for the invalid manufacturer. You
>have to do the kludge at the end of the file with the pcmcia strings.

I've complained about that -- they will change it from 0xffff for 
me...
>
>Then you add the new #defines into a struct entry... in if_ne_pcmcia.c
>I'd use what most popular cards use, for the entries you are asking.
>
Right now, it's hard-coded; when it all works, I'll build a proper 
patch and try to get it committed...

Thanks.

On a larger scale, though -- on Linux, adding the config information 
was as simple as adding

card "AT&T I-card"
  manfid 0xffff, 0x1090
  bind "pcnet_cs"

to /etc/pcmcia/config.  The issue of 0xffff aside, it would be nice if 
NetBSD had an external config file for such things, rather than 
hard-coded kernel tables.  BSD/OS has an external file, too.

		--Steve Bellovin, http://www.research.att.com/~smb (me)
		http://www.wilyhacker.com (2nd edition of "Firewalls" book)