Subject: PCMCIA problems on 486 laptops... again! :-)
To: NetBSD/i386 Discussion List <port-i386@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: port-i386
Date: 03/24/2001 19:39:26
I've been trying to get a 3com Megahertz X-Jack PC card working on a
couple of older 486 laptops. One's only got 4MB of RAM, and that's the
one I posted about before (i.e. trying with the recent snapshot image of
rescue_tiny.fs). The other's got 20MB of RAM and also has two available
PCMCIA slots.
Finally today I managed to get a new INSTALL kernel on a floppy of my
own making to test on the second machine. Now my -current source tree
is rather old, but if all goes well and I finally get a complete rsync
of the CVS repository here (it's finally transfering files again) then
I'll be updating it soon. In the mean time I'll post these notes
because finally I have enough success to make it possible without a lot
of re-typing....
I also turned on "option PCMCIAVERBOSE" in hopes of seeing more details
of what was going on.
First off I tried with just one of the three cards I have available for
testing installed in slot 1 (two XJ10BTs and a CC10BT). However no card
was never properly probled (just as sm1 isn't below). When I configured
the interface it printed:
pcmcia0: card irq5
sm1: receive interrupt on empty fifo
and the kernel would panic very shortly thereafter (sometimes I'd get a
ping started first, but there'd be no reply) with a "kernel: page fault
trap, code = 0" and a broken frame pointer on the stack.
(Prior to turning on PCMCIAVERBOSE the behaviour was much the same as I
noted in my previouse post, with "sm1: timeout" and apparently no
interrupts being seen by the kernel. My guess is there's a printf() or
similar somewhere in the optional code that's causing the panic.)
Then I tried putting two similar cards into the machine at once, and it
worked!
Here's the dmesg (copied verbatim from /kern/msgbuf over the network!)
NetBSD 1.5F (INSTALL) #2: Sat Mar 24 17:27:40 EST 2001
woods@proven:/var/NetBSD-obj.i386/arch/i386/compile/INSTALL
cpu0: Intel 486DX2 (486-class)
cpu0: features b<FPU,VME,PSE>
cpu0: features b
total memory = 20096 KB
avail memory = 14164 KB
using 276 buffers containing 1104 KB of memory
mainbus0 (root)
isa0 at mainbus0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
wd0 at wdc0 channel 0 drive 0: <ST9655AG>
wd0: drive supports 16-sector pio transfers, chs addressing
wd0: 500 MB, 1016 cyl, 16 head, 63 sec, 512 bytes/sect x 1024128 sectors
wd0: drive supports PIO mode 3, DMA mode 1
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
pc0 at isa0 port 0x60-0x6f irq 1: color
pc0: console
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
pcic0 at isa0 port 0x3e0-0x3e1 iomem 0xd0000-0xd3fff
pcic0: controller 0 (Cirrus PD672X) has sockets A and B
pcic0: controller 1 (Intel 82365SL Revision 1) has no sockets
pcmcia0 at pcic0 controller 0 socket 0
pcmcia1 at pcic0 controller 0 socket 1
isapnp0: no ISA Plug 'n Play devices found
biomask ffed netmask ffed ttymask ffef
pcic0: using irq 3 for socket events
md0: internal 2048K image area
pcmcia0: CIS version PCMCIA 2.0 or 2.1
pcmcia0: CIS info: Megahertz, CC10BT/2, PCMCIA 10BASE-T/2 ETHERNET ADAPTER, 0000860595E2
pcmcia0: Manufacturer code 0x128, product 0x103
pcmcia0: function 0: network adapter, ccr addr 300 mask 1
pcmcia0: function 0, config table entry 1: I/O card; irq mask ffff; iomask 4, iospace 0-f; io8 io16 irqlevel
pcmcia0: function 0, config table entry 3: I/O card; irq mask ffff; iomask 5, iospace 0-1f; io8 io16 irqlevel
sm1 at pcmcia0 function 0 port 0x400-0x40f: Megahertz X-JACK Ethernet
sm1: unknown chip id 15, revision 15, buffer size: 0
sm1: MAC address 00:00:86:05:95:e2, default media UTP
pcmcia1: CIS version PCMCIA 2.0 or 2.1
pcmcia1: CIS info: Megahertz, CC10BT/2, PCMCIA 10BASE-T/2 ETHERNET ADAPTER, 00008616C6E4
pcmcia1: Manufacturer code 0x128, product 0x103
pcmcia1: function 0: network adapter, ccr addr 300 mask 1
pcmcia1: function 0, config table entry 1: I/O card; irq mask ffff; iomask 4, iospace 0-f; io8 io16 irqlevel
pcmcia1: function 0, config table entry 3: I/O card; irq mask ffff; iomask 5, iospace 0-1f; io8 io16 irqlevel
sm2 at pcmcia1 function 0 port 0x410-0x41f: Megahertz X-JACK Ethernet
sm2: SMC91C94, revision 1, buffer size: 4608
sm2: MAC address 00:00:86:16:c6:e4, default media UTP
wd0: no disk label
boot device: fd0
root on md0a dumps on md0b
root file system type: ffs
pcmcia1: card irq 5
Note that these cards are not exactly identical. The one in slot-0 is
actually an older model CC10BT with no x-jack, while the working one (in
slot-1) is a real XJ10BT with both x-jack and dongle connector.
Note also that sm2 continues working fine when sm1 is removed.
So, is there anything obvious going wrong here? It wouldn't seem in
this case to be a problem of IRQ masks since the default choice has
always been #5 on this machine -- it just won't work unless there's a
second card installed when it's first probed.....
BTW, I tried a FreeBSD 4.2-BETA floppy set too and it didn't even see
the card, not even when two cards were installed (though it did reveal
that the mouse in this second laptop is indeed a ps2 mouse using IRQ
12).
Hopefully once my source tree is updated I can try all of this again,
and try with INSTALL_LAPTOP on the 4MB machine too....
--
Greg A. Woods
+1 416 218-0098 VE3TCP <gwoods@acm.org> <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>