5.3-BETA5 panics when inserting dc0 carbus card (only with ACPI enabled)

Johan Karlsson johan at freebsd.org
Wed Sep 22 01:16:20 PDT 2004


I get an instant panic when I insert the network card into my T20.
The card:
dc0: <Xircom X3201 10/100BaseTX> port 0x1080-0x10ff mem 0x88000000-0x880007ff,0x88000800-0x88000fff irq 11 at device 0.0 on cardbus1

And the panic message:
cbb alloc res fail
cardbus1: Can't get memory for IO ports
found->	vendor=0x115d, dev=0x0003, revid=0x03
	bus=5, slot=0, func=0
	class=02-00-00, hdrtype=0x00, mfdev=0
	cmdreg=0x0000, statreg=0x0210, cachelnsz=8 (dwords)
	lattimer=0xa8 (5040 ns), mingnt=0x14 (5000 ns), maxlat=0x28 (10000 ns)
	intpin=a, irq=255
	powerspec 1  supports D0 D1 D2 D3  current D0
dc0: <Xircom X3201 10/100BaseTX> port 0-0x7f mem 0x88000000-0x880007ff,0x88000800-0x88000fff at device 0.0 on cardbus1
cbb alloc res fail
dc0: couldn't map ports/memory

Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address	= 0x30
fault code		= supervisor write, page not present
instruction pointer	= 0x8:0xc079238e
stack pointer	        = 0x10:0xcc75cc10
frame pointer	        = 0x10:0xcc75cc14
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, def32 1, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 39 (cbb1)
trap number		= 12
panic: page fault
cpuid = 0
Uptime: 4m42s
Dumping 255 MB
 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240
Dump complete
Shutting down ACPI
stray irq9
Automatic reboot in 15 seconds - press a key on the console to abort
--> Press a key on the console to reboot,
--> or switch off the system now.

I only get the panic when ACPI is enabled. With ACPI disabled it attached
properly and works as expected.

If I leave the card in the slot during boot it will panic when it tries to
attached it with the same message.

Moreover, I have seen a similar panic (if not the exact same one) on
another T20 with another cardbus card.

I have attached two verbose dmesg output (gzipped)
1) just after boot with ACPI enabled
2) after inserting the dc0 card with ACPI disabled

I have also attached a script output from kgdb session with
a backtrace and a 'list *<instruction pointer>'

These files can also be found at

Please let me know if there is any other info I can provide that will
help with the debugging of this problem.

/Johan K
Johan Karlsson		mailto:johan at FreeBSD.org
-------------- next part --------------
Script started on Wed Sep 22 09:37:12 2004
sm-pc471# exit
[11`rm kgdb.o[11`exit
[11`kgdb kernel.debug /var/crash/vmcore.1

kgdb: /var/crash/vmcore.1: No such file or directory
sm-pc471# kgdb kernel.debug /var/crash/vmcore.12

[GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"]
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd".
doadump () at pcpu.h:159
(kgdb) bt
#0  doadump () at pcpu.h:159
#1  0xc060b1fb in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:397
#2  0xc060b521 in panic (fmt=0xc07ec8c8 "%s")
    at /usr/src/sys/kern/kern_shutdown.c:553
#3  0xc07a5aa4 in trap_fatal (frame=0xcc75cbd0, eva=48)
    at /usr/src/sys/i386/i386/trap.c:809
#4  0xc07a57e7 in trap_pfault (frame=0xcc75cbd0, usermode=0, eva=48)
    at /usr/src/sys/i386/i386/trap.c:727
#5  0xc07a5421 in trap (frame=
      {tf_fs = -1067319272, tf_es = -1050673136, tf_ds = -1046740976, tf_edi = 6, tf_esi = -1047375872, tf_ebp = -864695276, tf_isp = -864695300, tf_ebx = 0, tf_edx = 0, tf_ecx = -1056882688, tf_eax = 16, tf_trapno = 12, tf_err = 2, tf_eip = -1065802866, tf_cs = 8, tf_eflags = 66118, tf_esp = 0, tf_ss = -864695252}) at /usr/src/sys/i386/i386/trap.c:417
#6  0xc079390a in calltrap () at /usr/src/sys/i386/i386/exception.s:140
#7  0xc0620018 in bus_generic_rl_set_resource (dev=0x0, child=0x0, 
    type=-1050630528, rid=-1047375872, start=3430272116, count=6)
    at bus_if.h:522
#8  0xc06fe6aa in dc_detach (dev=0x8) at /usr/src/sys/pci/if_dc.c:2364
#9  0xc06fe560 in dc_attach (dev=0xc19cdc80) at /usr/src/sys/pci/if_dc.c:2318
#10 0xc061f1f0 in device_attach (dev=0xc19cdc80) at device_if.h:177
#11 0xc061f190 in device_probe_and_attach (dev=0xc19cdc80)
    at /usr/src/sys/kern/subr_bus.c:2147
#12 0xc04da2ef in cardbus_attach_card (cbdev=0xc160a680)
---Type <return> to continue, or q <return> to quit---
    at /usr/src/sys/dev/cardbus/cardbus.c:189
#13 0xc0560d76 in cbb_insert (sc=0xc15c5800) at card_if.h:82
#14 0xc0560b69 in cbb_event_thread (arg=0xc15c5800)
    at /usr/src/sys/dev/pccbb/pccbb.c:489
#15 0xc05f61e9 in fork_exit (callout=0xc0560a24 <cbb_event_thread>, 
    arg=0xc15c5800, frame=0xcc75cd48) at /usr/src/sys/kern/kern_fork.c:811
#16 0xc079396c in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:209
(kgdb) list *0xc079238e
0xc079238e is in bus_dmamap_destroy (/usr/src/sys/i386/i386/busdma_machdep.c:418).
413		if (map != NULL && map != &nobounce_dmamap) {
414			if (STAILQ_FIRST(&map->bpages) != NULL)
415				return (EBUSY);
416			free(map, M_DEVBUF);
417		}
418		dmat->map_count--;
419		return (0);
420	}
(kgdb) quit
sm-pc471# exit


Script done on Wed Sep 22 09:49:47 2004

More information about the freebsd-current mailing list