Subject: Two PCMCIA<->ISA adapters?
To: Port-i386 <port-i386@NetBSD.ORG>
From: Jukka Marin <jmarin@pyy.jmp.fi>
List: port-i386
Date: 07/14/2000 18:57:46
Hello again,

I'm actively playing with 1.5 ALPHA, as you can see ;-)

I'm trying to get two PCMCIA<->ISA adapters working on a not-so-new Pentium
class system (the one with a crashing Cyrix).  Both PCMCIA adapters are
based on a Ricoh RF5C296 chip and have similar jumpers to select "slot 1"
to "slot 4" and "DMA none/1/2/5/7".

I have jumpered the first adapter to slot 1 and am trying to pick up good
settings for the other (neither one is using DMA).  In my kernel config
file I have

pcmcia* at pcic? controller ? socket ?
pcmcia* at tcic? controller ? socket ?
pcic0   at isa? port 0x3e0 iomem 0xd0000 iosiz 0x10000
pcic1   at isa? port 0x3e2 iomem 0xe0000 iosiz 0x4000
tcic0   at isa? port 0x240 iomem 0xd0000 iosiz 0x10000
pcic*   at isapnp?

NetBSD sees both PCMCIA adapters, at least to some degree (the output below
was generated when the second adapter was set to slot 4):

pcic0 at isa0 port 0x3e0-0x3e1 iomem 0xd0000-0xdffff
pcic0: controller 0 (Intel 82365SL Revision 1) has socket A only
pcic0: controller 1 (Intel 82365SL Revision 1) has socket B only
pcmcia0 at pcic0 controller 0 socket 0
pcmcia1 at pcic0 controller 1 socket 1
pcic0: controller 0 detecting irqs with mask 0xdeb8:..9..10
pcic0: controller 1 detecting irqs with mask 0xdeb8:..9..10
pcic0: using irq 9 for socket events
pcmcia0: CIS version PCMCIA 2.0 or 2.1
pcmcia0: CIS info: SunDisk, SDP, 5/3 0.6
pcmcia0: Manufacturer code 0x45, product 0x401
pcmcia0: function 0: fixed disk, ccr addr 200 mask f
pcmcia0: function 0, config table entry 0: memory card; irq mask 0; memspace 0-7
ff; maxtwins 1; mwait_required rdybsy_active powerdown
pcmcia0: function 0, config table entry 1: I/O card; irq mask ffff; iomask 4, io
space 0-f; memspace 0-7ff; maxtwins 1; rdybsy_active io8 io16
irqshare irqpulse irqlevel powerdown
pcmcia0: function 0, config table entry 2: I/O card; irq mask 4000; iomask a, io
space 1f0-1f7 3f6-3f7; memspace 0-7ff; maxtwins 1; rdybsy_active io8 io16
irqshare irqpulse irqlevel powerdown
pcmcia0: function 0, config table entry 3: I/O card; irq mask 4000; iomaska, io
space 170-177 376-377; memspace 0-7ff; maxtwins 1; rdybsy_active io8 io16
irqshare irqpulse irqlevel powerdown
pcmcia0: function 0, config table entry 7: I/O card; irq mask 4000; iomaska, io
space 170-177 376-377; memspace 0-7ff; maxtwins 1; rdybsy_active io8 io16
irqshare irqpulse irqlevel powerdown
wdc2 at pcmcia0 function 0 port 0x400-0x40f
wd1 at wdc2 channel 0 drive 0: <SunDisk SDCFB-15>
wd1: drive supports 1-sector pio transfers, lba addressing
wd1: 14656 KB, 458 cyl, 2 head, 32 sec, 512 bytes/sect x 29312 sectors
pcmcia1: CIS version PCMCIA 2.0 or 2.1
pcmcia1: CIS info: WebGear, PC Card WLAN Adapter, Version 4.88 Jan 1999
pcmcia1: Manufacturer code 0x1a6, product 0x0
pcmcia1: function 0: network adapter, ccr addr f00 mask b
pcmcia1: function 0, config table entry 1: I/O card; irq mask ffb8; memspace
0-bfff; mwait_required irqlevel
ray0 at pcmcia1 function 0: WebGear, PC Card WLAN Adapter, Version 4.88 Jan 1999
ray0: firmware version 85
ray0: 802.11 address 00:00:8f:48:ed:1a
pcmcia0: card irq 10
wd1: no disk label
stray interrupt 10
pcmcia0: card irq 10
stray interrupt 10

In this case, both the PCMCIA cards show up properly, and the CompactFLASH
card even _works_ properly.  If I eject the card, NetBSD knows about it and
if I reinsert it, NetBSD detects it again.

However, if I eject or insert the WebGear card, NetBSD doesn't know about
it.  If I ifconfig the card, the LED lits up, but no data transfer is
possible.  I guess the interrupt for this card isn't working.

Questions:

In this configuration, should the PCMCIA adapters be using a different I/O
space (like in the kernel config file, 0x3e0 and 0x3e2) or is it normal
that the kernel thinks both the PCMCIA slots are on the same controller?

Why doesn't the interrupt work for the other card?  I have configured all
irq's the same way in BIOS and no other device is using irq's 9, 10, or 11,
so they should be free for PCMCIA.

If I remove the other adapter and insert the WebGear into the remaining one,
it works just fine.

And what are those "stray interrupt 10"'s that I see?  Like this:

pcmcia1: card irq 9
stray interrupt 10
wd1 detached
wdc2 detached

Sorry for flooding the list, but I'm trying to test a few things with 1.5
before it's too late.. ;-)

As always, thanks a bunch,

  -jm