Subject: Crash when removing cardbus card
To: None <current-users@netbsd.org>
From: Peter Postma <peter.postma@chello.nl>
List: current-users
Date: 03/10/2004 12:10:29
My laptop crashes when I remove the cardbus card:

tqphy0 detached
cardbus0: unmap mem space
tlp0 detached
uvm_fault(0xc035b680, 0xc02f3000, 0, 2) -> 0xe
kernel: page fault trap, code=0
Stopped in pid 6.1 (cardslot0) at	netbsd:pccbb_intr_disestablish+0x19:movl %eax,0x10(%edx)
db> sync

...

(gdb) bt
#0  0x00000001 in ?? ()
#1  0xc023b3db in cpu_reboot (howto=21188608, bootstr=0x0)
    at /usr/src/sys/arch/i386/i386/machdep.c:731
#2  0xc01acb68 in db_sync_cmd (addr=1, have_addr=0, count=-1071185762,
    modif=0xc4710c20 "| R8À7\fqÄ\001") at /usr/src/sys/ddb/db_command.c:750
#3  0xc01ac5bb in db_command (last_cmdp=0xc0357970, cmd_table=0xc4710c18)
    at /usr/src/sys/ddb/db_command.c:464
#4  0xc01ac2d6 in db_command_loop () at /usr/src/sys/ddb/db_command.c:255
#5  0xc01af394 in db_trap (type=0, code=0) at /usr/src/sys/ddb/db_trap.c:101
#6  0xc0238c0a in kdb_trap (type=6, code=0, regs=0x0)
    at /usr/src/sys/arch/i386/i386/db_interface.c:225
#7  0xc0245389 in trap (frame=0xc4710e74)
    at /usr/src/sys/arch/i386/i386/trap.c:284
#8  0xc0102ccf in calltrap ()
#9  0xc029d672 in cardbus_intr_disestablish (cc=0xc06a4600, cf=0xc4710c20,
    handler=0xc069e340) at /usr/src/sys/dev/cardbus/cardbus.c:679
#10 0xc029ea0a in com_cardbus_detach (self=0xc06a4600, flags=0)
    at /usr/src/sys/dev/cardbus/com_cardbus.c:339
#11 0xc01e0671 in config_detach (dev=0xc06eae00, flags=0)
    at /usr/src/sys/kern/subr_autoconf.c:964
#12 0xc029d5c5 in cardbus_detach_card (sc=0xc0650300)
    at /usr/src/sys/dev/cardbus/cardbus.c:635
#13 0xc029c829 in cardslot_event_thread (arg=0xc0650380)
    at /usr/src/sys/dev/cardbus/cardslot.c:398


I've found two workarounds:
 * disable "com* at cardbus?" with userconf.
 * boot the system without the card inserted and insert the card when
   the system is up (the com3 doesn't say: "com3: interrupting at irq 11").

The card is a Xircom RealPort Cardbus Ethernet 10/100+Modem 56.


dmesg:

NetBSD 1.6ZK (LAPTOP) #2: Tue Mar  9 18:29:41 CET 2004
        root@laptop.pointless.nl:/usr/obj/sys/arch/i386/compile/LAPTOP
total memory = 127 MB
avail memory = 121 MB
BIOS32 rev. 0 found at 0xffe90
PCI BIOS rev. 2.1 found at 0xfc0ce
pcibios: config mechanism [1][x], special cycles [x][x], last bus 1
PCI IRQ Routing Table rev. 1.0 found at 0xfbd70, size 128 bytes (6 entries)
PCI Interrupt Router at 000:07:0 (Intel 82371MX Mobile PCI I/O IDE Xcelerator (MPIIX))
------------------------------------------
  device vendor product pin PIRQ IRQ stage
------------------------------------------
000:03:0 0x104c 0xac1c   A  0x03  11  0    already assigned
000:03:1 0x104c 0xac1c   A  0x03  11  0    already assigned
000:07:2 0x8086 0x7112   D  0x03  11  0    already assigned
000:08:0 0x125d 0x1998   A  0x01   5  0    already assigned
001:00:0 0x1002 0x4c4d   A  0x00  11  0    already assigned
------------------------------------------
PCI fixup examining 8086:7190
PCI fixup examining 8086:7191
PCI fixup examining 1002:4c4d
PCI bridge 0: primary 0, secondary 1, subordinate 1
PCI fixup examining 104c:ac1c
PCI bridge 1: primary 0, secondary 2, subordinate 2
PCI fixup examining 104c:ac1c
PCI bridge 2: primary 0, secondary 3, subordinate 3
PCI fixup examining 8086:7110
PCI fixup examining 8086:7111
PCI fixup examining 8086:7112
PCI fixup examining 8086:7113
PCI fixup examining 125d:1998
PCI bus #3 is the last bus
[System BIOS Setting]-----------------------
  device vendor product
  register space address    size
--------------------------------------------
000:00:0 0x8086 0x7190
        10h mem  0xf4000000 0x04000000
                [OK]
000:01:0 0x8086 0x7191
                [OK]
000:03:0 0x104c 0xac1c
        10h mem  0x00000000 0x00001000
                [NG]
000:03:1 0x104c 0xac1c
        10h mem  0x00000000 0x00001000
                [NG]
000:07:0 0x8086 0x7110
                [OK]
000:07:1 0x8086 0x7111
        20h port 0x00000860 0x00000010
                [OK]
000:07:2 0x8086 0x7112
        20h port 0x0000dce0 0x00000020
                [OK]
000:07:3 0x8086 0x7113
                [OK]
000:08:0 0x125d 0x1998
        10h port 0x0000d800 0x00000100
        14h mem  0xfaffe000 0x00002000
                [OK]
001:00:0 0x1002 0x4c4d
        10h mem  0xfd000000 0x01000000
        14h port 0x0000ec00 0x00000100
        18h mem  0xfcfff000 0x00001000
                [OK]
--------------------------[  2 devices bogus]
 Physical memory end: 0x07fec000
 PCI memory mapped I/O space start: 0x08000000
[PCIBIOS fixup stage]-----------------------
  device vendor product
  register space address    size
--------------------------------------------
000:00:0 0x8086 0x7190
        10h mem  0xf4000000 0x04000000
                [OK]
000:01:0 0x8086 0x7191
                [OK]
000:03:0 0x104c 0xac1c
        10h mem  0x08000000 0x00001000
                [OK]
000:03:1 0x104c 0xac1c
        10h mem  0x08001000 0x00001000
                [OK]
000:07:0 0x8086 0x7110
                [OK]
000:07:1 0x8086 0x7111
        20h port 0x00000860 0x00000010
                [OK]
000:07:2 0x8086 0x7112
        20h port 0x0000dce0 0x00000020
                [OK]
000:07:3 0x8086 0x7113
                [OK]
000:08:0 0x125d 0x1998
        10h port 0x0000d800 0x00000100
        14h mem  0xfaffe000 0x00002000
                [OK]
001:00:0 0x1002 0x4c4d
        10h mem  0xfd000000 0x01000000
        14h port 0x0000ec00 0x00000100
        18h mem  0xfcfff000 0x00001000
                [OK]
--------------------------[  0 devices bogus]
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Celeron (686-class), 498.49 MHz, id 0x681
cpu0: features 383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
cpu0: features 383f9ff<PGE,MCA,CMOV,PAT,PSE36,MMX>
cpu0: features 383f9ff<FXSR,SSE>
cpu0: I-cache 16 KB 32b/line 4-way, D-cache 16 KB 32b/line 4-way
cpu0: L2 cache 128 KB 32b/line 4-way
cpu0: ITLB 32 4 KB entries 4-way, 2 4 MB entries fully associative
cpu0: DTLB 64 4 KB entries 4-way, 8 4 MB entries 4-way
cpu0: 8 page colors
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82443BX Host Bridge/Controller (rev. 0x03)
agp0 at pchb0: aperture at 0xf4000000, size 0x4000000
ppb0 at pci0 dev 1 function 0: Intel 82443BX AGP Interface (rev. 0x03)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga1 at pci1 dev 0 function 0: ATI Technologies Rage Mobility (rev. 0x64)
wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
cbb0 at pci0 dev 3 function 0: Texas Instruments PCI1225 PCI-CardBus Bridge (rev. 0x01)
cbb1 at pci0 dev 3 function 1: Texas Instruments PCI1225 PCI-CardBus Bridge (rev. 0x01)
pcib0 at pci0 dev 7 function 0
pcib0: Intel 82371AB PCI-to-ISA Bridge (PIIX4) (rev. 0x02)
piixide0 at pci0 dev 7 function 1
piixide0: Intel 82371AB IDE controller (PIIX4) (rev. 0x01)
piixide0: bus-master DMA support present
piixide0: primary channel wired to compatibility mode
piixide0: primary channel interrupting at irq 14
atabus0 at piixide0 channel 0
piixide0: secondary channel wired to compatibility mode
piixide0: secondary channel interrupting at irq 15
atabus1 at piixide0 channel 1
uhci0 at pci0 dev 7 function 2: Intel 82371AB USB Host Controller (PIIX4) (rev. 0x01)
uhci0: interrupting at irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
Intel 82371AB Power Management Controller (PIIX4) (miscellaneous bridge, revision 0x03) at pci0 dev 7 function 3 not configured
esa0 at pci0 dev 8 function 0: ESS Technology, Inc. Maestro 3 PCI Audio Accelerator (rev. 0x10)
esa0: interrupting at irq 5
esa0: ac97: SigmaTel STAC9721/23 codec; 18 bit DAC, 18 bit ADC, SigmaTel 3D
esa0: ac97: ext id 200<AMAP>
audio0 at esa0: full duplex, mmap, independent
cbb0: interrupting at irq 11
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 2 device 0
pcmcia0 at cardslot0
cbb1: interrupting at irq 11
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 3 device 0
pcmcia1 at cardslot1
isa0 at pcib0
lpt0 at isa0 port 0x378-0x37b irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
isapnp0: no ISA Plug 'n Play devices found
apm0 at mainbus0: Power Management spec V1.2
cardbus_mapreg_map called: cardbus0 0
cardbus_mapreg_map: physaddr 40000000
cardbus0: unmap mem space
tlp0 at cardbus0 dev 0 function 0: Xircom X3201-3 Ethernet, pass 0.3
cardbus_mapreg_map called: cardbus0 0
cardbus_mapreg_map: physaddr 40000000
tlp0: Ethernet address 00:10:a4:c4:9a:e7
tqphy0 at tlp0 phy 0: 78Q2120 10/100 media interface, rev. 10
tqphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
cardbus_mapreg_map called: cardbus0 0
cardbus_mapreg_map: physaddr 40004000
cardbus0: unmap mem space
com3 at cardbus0 dev 0 function 1cardbus_mapreg_map called: cardbus0 1
cardbus_mapreg_map: physaddr 4300
: Xircom CardBus Ethernet 10/100 + Modem 56
com3: ns16550a, working fifo
wd0 at atabus0 drive 0: <IBM-DARA-206000>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 5729 MB, 12416 cyl, 15 head, 63 sec, 512 bytes/sect x 11733120 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
wd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <TOSHIBA CD-ROM XM-1902B, , 1A15> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2
cd0(piixide0:1:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
boot device: wd0
root on wd0a dumps on wd0b
mountroot: trying smbfs...
mountroot: trying cd9660...
mountroot: trying ntfs...
mountroot: trying nfs...
mountroot: trying ffs...
root file system type: ffs
init: copying out path `/sbin/init' 11
com3: interrupting at irq 11
tlp0: interrupting at irq 11
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)


Thanks in advance,
-- 
Peter Postma