Subject: toshiba libretto, 3c563, and Cardbus.
To: None <port-i386@netbsd.org>
From: Daniel Carosone <dan@geek.com.au>
List: port-i386
Date: 11/30/1999 16:04:38
I have a toshiba libretto 100CT.  I am trying to use it with a
3c563 modem/ether pcmcia card, and a collection of other cards.

Running the system with the BIOS configured in "pcic" or "auto"
mode, the cbb's are disabled and pcic's are found correctly:

cbb0 at pci0 dev 19 function 0 (ToPIC97), chipflags 2
 Do not use cbb0 because of intr unconfig.
cbb1 at pci0 dev 19 function 1 (ToPIC97), chipflags 2
 Do not use cbb1 because of intr unconfig.

pcic0 at isa0 port 0x3e0-0x3e1 iomem 0xd0000-0xd3fff: using irq 3
pcic0: controller 0 (Intel 82365SL Revision 1) has sockets A and B
pcmcia0 at pcic0 controller 0 socket 0
pcmcia1 at pcic0 controller 0 socket 1

In this mode, the 3c563 works just fine:

pcmcia1: CIS version PCMCIA 2.0 or 2.1
pcmcia1: CIS info: 3Com Corporation, 3C562D/3C563D, EtherLink III, LAN+Modem PC Card
pcmcia1: Manufacturer code 0x101, product 0x562
pcmcia1: function 0: network adapter, ccr addr 1800 mask 3ff
pcmcia1: function 0, config table entry 7: I/O card; irq mask ffff; iomask 4, iospace 0-f; rdybsy_active wp_active bvd_active io8 io16 irqlevel
pcmcia1: function 1: serial port, ccr addr 1900 mask 3ff
pcmcia1: function 1, config table entry 7: I/O card; irq mask 86b8; iomask 3, iospace 2f8-2ff; io8 audio
pcmcia1: function 1, config table entry 23: I/O card; irq mask 86b8; iomask 3, iospace 2e8-2ef; io8 audio
pcmcia1: function 1, config table entry 39: I/O card; irq mask 86b8; iomask 3, iospace 0-7; io8 audio
ep0 at pcmcia1 function 0 port 0x340-0x34f: 3Com 3c562 33.6 Modem/10Mbps Ethernet
ep0: address 00:60:97:f7:bb:8f, 8KB byte-wide FIFO, 5:3 Rx:Tx split
ep0: 10baseT, 10base5, 10base2 (default 10baseT)
com4 at pcmcia1 function 1 port 0x338-0x33f: serial device
com4: ns16550a, working fifo

However, the pcic's don't seem to get card insertion/removal events
properly; sometimes they get them, sometimes i can pop cards in
and out and it won't notice. (Even the ethernet cards, which don't
detach properly).  This is apparently a known problem with (some?)
toshibas in pcic compatibility mode.

Trying to solve this, when I switch the bios to use "Cardbus/16"
mode, the cbb's and cardslots probe and attach correctly. I notice
with some curiosity that the disabled cbb's claim to be ToPIC97's,
and the enabled ToPIC95B's:

cbb0 at pci0 dev 19 function 0 (ToPIC95B), chipflags 2
cbb1 at pci0 dev 19 function 1 (ToPIC95B), chipflags 2
cbb0: interrupting at irq 11
cbb0: cacheline 0x0 lattimer 0x0
cbb0: bhlc 0x820000 lscp 0x141400
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 20 device 0 cacheline 0x0, lattimer 0x0
pcmcia0 at cardslot0
cbb1: interrupting at irq 11
cbb1: cacheline 0x0 lattimer 0x0
cbb1: bhlc 0x820000 lscp 0x151500
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 21 device 0 cacheline 0x0, lattimer 0x0
pcmcia1 at cardslot1

All the other cards i have (3c589 ethernet, token ring, the libretto
floppy, and several CompactFlash cards) work as expected (ie, some
are not supported by NetBSD but still print correct CIS). Insertion
and removal events happen properly.

However, the 3c563 doesn't go:

pcmcia0: CIS version PCMCIA 2.0 or 2.1
pcmcia0: CIS info: 3Com Corporation, 3C562D/3C563D, EtherLink III, LAN+Modem PC Card
pcmcia0: Manufacturer code 0x101, product 0x562
pcmcia0: function 0: network adapter, ccr addr 1800 mask 3ff
pcmcia0: function 0, config table entry 7: I/O card; irq mask ffff; iomask 4, iospace 0-f; rdybsy_active wp_active bvd_active io8 io16 irqlevel
pcmcia0: function 1: serial port, ccr addr 1900 mask 3ff
pcmcia0: function 1, config table entry 7: I/O card; irq mask 86b8; iomask 3, iospace 2f8-2ff; io8 audio
pcmcia0: function 1, config table entry 23: I/O card; irq mask 86b8; iomask 3, iospace 2e8-2ef; io8 audio
pcmcia0: function 1, config table entry 39: I/O card; irq mask 86b8; iomask 3, iospace 0-7; io8 audio
ep0 at pcmcia0 function 0: can't allocate i/o space
com4 at pcmcia0 function 1: serial device
com4: ns16550a, working fifo

and when trying to use the serial port, opens hang and i get:

com4: com_iflush timeout 50

I'm looking for anyone with similar experiences, anyone successfully
using a 3c56[23] via cardslot on another type of laptop, and anyone
with clues how to make it work. Anyone with other Libretto experiences
to share, too.

--
Dan.