Subject: Hmm PCMCIA bug??
To: Port-i386 <port-i386@NetBSD.ORG>
From: Paul Sijben <sijben@acm.org>
List: port-i386
Date: 02/05/1998 18:06:57
I am still struggeling with PCMCIA ethernet cards. However the story has 
changed from an unsupported piece of hardware to a supported piece of hardware 
that doesn't work.

I have one PCMCIA NE2000 compatible network card that is not recognised by the 
NE2000 PCMCIA detection code. I added the recognition strings into the 
appropriate table in if_ne_pcmcia.c. After which the card was detected and 
attached as ne2. But when I tried a simple ifconfig ne2 192.168.0.4 the 
machine frooze. (not even keyboard input is echoed anymore) (BTW: if I do 
ifconfig ne2 up, the keyboard is echoed but ^C does not present a prompt, I 
try to retype what I see in the debugger below)

I got some other cards on loan. One of which is recognised by the 
generic 1.3 kernel! The device attaches but I still get the freeze.

This smels like a bug.
The machine is a Pentium 200 MMX

this is the dmesg output:
Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.3 (GENERIC) #0: Tue Dec 30 18:26:29 EST 1997
    perry@jekyll.piermont.com:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: family 5 model 4 step 3
cpu0: Intel Pentium/MMX (586-class)
real mem  = 33157120
avail mem = 30019584
using 430 buffers containing 1761280 bytes of memory
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
Opti product 0xc701 (host bridge, revision 0x20) at pci0 dev 0 function 0 not co
nfigured
Opti product 0xc700 (ISA bridge, revision 0x20) at pci0 dev 1 function 0 not con
figured
Chips and Technologies 65554 (VGA display, revision 0xc2) at pci0 dev 2 function
 0 not configured
Opti product 0xc814 (CardBus bridge) at pci0 dev 4 function 0 not configured
VIA Technologies VT83C572 USB Controller (USB serial bus, revision 0x04) at pci0
 dev 9 function 0 not configured
Texas Instruments PCI1131 (CardBus bridge, revision 0x01) at pci0 dev 10 functio
n 0 not configured
Texas Instruments PCI1131 (CardBus bridge, revision 0x01) at pci0 dev 10 functio
n 1 not configured
Opti product 0xd568 (IDE mass storage, interface 0x80, revision 0x12) at pci0 de
v 20 function 0 not configured
isa0 at mainbus0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
lpt0 at isa0 port 0x378-0x37b irq 7
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
atapibus0 at wdc0
wd0 at wdc0 drive 0: <TOSHIBA MK1403MAV>
wd0: 1376MB, 2796 cyl, 16 head, 63 sec, 512 bytes/sec
wd0: using 16-sector 16-bit pio transfers, lba addressing
wdc1 at isa0 port 0x170-0x177 irq 15
atapibus1 at wdc1
cd0 at atapibus1 drive 0: <MATSHITA CR-172, , RM18> type 5 cdrom removable
sb0 at isa0 port 0x220-0x237 irq 7 drq 1: dsp v3.01
audio0 at sb0
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
isapnp0 at isa0 port 0x279: read port 0x203
isapnp0: <ESS ES1868 Plug and Play AudioD, ESS0000, , > port 0x800/8 not configu
red
sb1 at isapnp0 port 0x240/16,0x388/4,0x300/2 irq 5 drq 0,0
sb1: ESS ES1868 Plug and Play AudioD : dsp v3.01
audio1 at sb1
joy0 at isapnp0 port 0x201/1
joy0: ESS ES1868 Plug and Play AudioD 
joy0: joystick not connected
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
ne2 at pcmcia1 function 0 port 0x340-0x34f port 0x350-0x35f
ne2: PreMax PE-200 Ethernet
ne2: Ethernet address 00:20:e0:0f:a0:63
biomask c040 netmask c040 ttymask c0ca
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs

The card that I inserted is a combo card. When I do ifconfig ne2 the result is 
Ne2: flags=8822<BROADCAST, NOTRAILERS,SIMPLEX,MULTICAST> mtu 1500
	media: manual (none)
	inet 0.0.0.0 netmask 0x0

I try to investigate further. I have already established that the code is not 
in ne2000.c when the freeze occurs.

Any help would be appreciated.

Paul

debugger:
db>trace
_Debugger(f084aee0,f2f0acb8,f028c7b1,f08aaee0,f0101e10) at _Debugger+0x4
_sget(f084aee0,f0101e10,f088f400,f2f0acc0,f0101063) at _sget+0x153
_pcintr(f0844d40) at _pcintr+0x2d
_Xintr1() at _Xintr1+0x6f
---- interrupt ---
_Xdoreti() at _Xdoreti
-- interrupt ---
_Xdoreti() at _Xdoreti+0x1b
-- interrupt ---
_Xdoreti() at _Xdoreti+0x1b
--- interrupt ---
_pcic_isa_chip_intr_establish(f088f4e0,f0843600,5,f011a540,f08c0a00) at 
_pcic_isa_chip_intr_establish+0xb
_pcic_isa_chip_intr_establish(f0843600,5,f011a540,f08c0a00,f08c0a00) at 
_pcic_isa_chip_intr_establish+0x18c
_ne_pcmcia_enable(f08c0a00) at ...+0x1a
..etc...

I don't know how to interpret this output. Could someone educate me?
-- 
Paul Sijben                 University of Twente, The Netherlands    
tel.: 033-4557522           http://www.huygens.org/~sijben/
-----------------------------------------------------------------------
"You know you could find yourself charged with being a dominant species  
while under the influence of impulse-driven consumerism, don't you?"
	            Terry Pratchett & Neil Gaiman - Good Omens