Subject: PCMCIA and nasty CIS
To: None <tech-kern@netbsd.org>
From: Allen Briggs <briggs@ninthwonder.com>
List: tech-kern
Date: 05/23/2000 00:02:05
I'm the proud owner of a new D-Link DMF-560TXD controller that doesn't
work with NetBSD yet.  I didn't really expect it to work since I didn't
see any mention of it in the source code, and I don't mind getting it
working, but I need a few pointers.

What I get on boot is something like (after I've added the manufacturer
and product codes to the pcmciadevs database):

pcmcia0: CIS version PCMCIA 2.0 or 2.1
pcmcia0: CIS info: D-Link, DMF-560TXD DirectPort PC Card
pcmcia0: Manufacturer code 0x143, product 0xc0ab
pcmcia0: function 0: multi-function, ccr addr ffe0 mask 67
pcmcia0: function 0, config table entry 3: I/O card; irq mask 9e38; iomask a, iospace 2f8-2ff 300-31f; rdybsy_active io8 io16 irqshare irqpulse irqlevel powerdown audio
pcmcia0: function 0, config table entry 5: I/O card; irq mask 9e38; iomask a, iospace 3e8-3ef 300-31f; rdybsy_active io8 io16 irqshare irqpulse irqlevel powerdown audio
...
pcmcia0: function 0, config table entry 27: I/O card; irq mask 9e38; iomask a, iospace 2f8-2ff 240-24f; rdybsy_active io8 io16 irqshare irqpulse irqlevel powerdown audio
D-Link, DMF-560TXD DirectPort PC Card (manufacturer 0x0143, product 0xc0ab) function 0 not configured

I don't know much about PCMCIA yet, but it appears that this card's CIS
is not describing itself correctly.  It appears to be missing some
linkage to configuration space for the ethernet function, and it's
labeled the I/O function "multi-function" instead of "serial".

With PCMCIACISDEBUG turned on, I get:
CISTPL_DEVICE type=null speed=null
 01 02 00 ff
CISTPL_VERS_1
 15 28 04 01 44 2d 4c 69 6e 6b 00 44 4d 46 2d 35
 36 30 54 58 44 20 44 69 72 65 63 74 50 6f 72 74
 20 50 43 20 43 61 72 64 00 ff
CISTPL_MANFID
 20 04 43 01 ab c0
CISTPL_FUNCID
 21 02 00 00
CISTPL_CONFIG
 1a 05 01 1b e0 ff 67
CISTPL_CFTABLE_ENTRY
 1b 16 c3 41 99 79 55 3d 86 46 26 4c ea 61 f8 02
 07 00 03 1f f0 38 9e 28
CISTPL_CFTABLE_ENTRY
 1b 0a 05 08 ea 61 e8 03 07 00 03 1f
CISTPL_CFTABLE_ENTRY
 1b 0a 07 08 ea 61 e8 02 07 00 03 1f
CISTPL_CFTABLE_ENTRY
 1b 0a 09 08 ea 61 f8 02 07 20 03 1f
CISTPL_CFTABLE_ENTRY
 1b 0a 0b 08 ea 61 e8 03 07 20 03 1f
CISTPL_CFTABLE_ENTRY
 1b 0a 0d 08 ea 61 e8 02 07 20 03 1f
CISTPL_CFTABLE_ENTRY
 1b 0a 0f 08 ea 61 f8 02 07 40 03 1f
CISTPL_CFTABLE_ENTRY
 1b 0a 11 08 ea 61 e8 03 07 40 03 1f
CISTPL_CFTABLE_ENTRY
 1b 0a 13 08 ea 61 e8 02 07 40 03 1f
CISTPL_CFTABLE_ENTRY
 1b 0a 15 08 ea 61 f8 02 07 20 02 1f
CISTPL_CFTABLE_ENTRY
 1b 0a 17 08 ea 61 e8 03 07 20 02 1f
CISTPL_CFTABLE_ENTRY
 1b 0a 19 08 ea 61 e8 02 07 20 02 1f
CISTPL_CFTABLE_ENTRY
 1b 0a 1b 08 ea 61 f8 02 07 40 02 0f
CISTPL_END
 ff

This is listed as a "PCMCIA 10/100 Ethernet LAN 56K Fax/Modem Adapter
for Notebook Computers" and also has "PC Card" stamped on the side.  It
comes with drivers for MacOS and Windows.  It claims:
	* PCMCIA 2.1 and JEIDA 4.1 compliant
	* NE2000 support
	* Wide range of PCMCIA Card/Socket Services (CSS) support.
	* PC Card hot swap and insertion support

I'm running this with NetBSD-current on an IBM ThinkPad 560E laptop with

pcic0 at pci0 dev 19 function 0: Cirrus Logic PD6729 PCMCIA controller
pcic0: controller 0 (Cirrus PD672X) has sockets A and B
pcic0: controller 1 (Intel 82365SL Revision 1) has no sockets

Anyone have any ideas?

Thanks,
-allen