Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Sep 2004 10:16:16 +0200
From:      Johan Karlsson <johan@freebsd.org>
To:        freebsd-current@freebsd.org
Subject:   5.3-BETA5 panics when inserting dc0 carbus card (only with ACPI enabled)
Message-ID:  <20040922081616.GA18509@numeri.campus.luth.se>

next in thread | raw e-mail | index | archive | help

--KsGdsel6WgEHnImy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi

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.
Rebooting...


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
http://numeri.campus.luth.se/~k/dmesg.acpi
http://numeri.campus.luth.se/~k/dmesg.no_acpi
http://numeri.campus.luth.se/~k/kgdb.out

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@FreeBSD.org

--KsGdsel6WgEHnImy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="kgdb.out"
Content-Transfer-Encoding: quoted-printable

Script started on Wed Sep 22 09:37:12 2004
sm-pc471# exit=0D=1B[11`rm kgdb.o=1B[11`exit=1B[K=0D=1B[11`kgdb kernel.debu=
g /var/crash/vmcore.1=0D=0D
kgdb: /var/crash/vmcore.1: No such file or directory=0D
sm-pc471# kgdb kernel.debug /var/crash/vmcore.1=08=1B[K2=0D=0D
[GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so:=
 Undefined symbol "ps_pglobal_lookup"]=0D
GNU gdb 6.1.1 [FreeBSD]=0D
Copyright 2004 Free Software Foundation, Inc.=0D
GDB is free software, covered by the GNU General Public License, and you ar=
e=0D
welcome to change it and/or distribute copies of it under certain condition=
s.=0D
Type "show copying" to see the conditions.=0D
There is absolutely no warranty for GDB.  Type "show warranty" for details.=
=0D
This GDB was configured as "i386-marcel-freebsd".=0D
doadump () at pcpu.h:159=0D
(kgdb) bt=0D
#0  doadump () at pcpu.h:159=0D
#1  0xc060b1fb in boot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c:3=
97=0D
#2  0xc060b521 in panic (fmt=3D0xc07ec8c8 "%s")=0D
    at /usr/src/sys/kern/kern_shutdown.c:553=0D
#3  0xc07a5aa4 in trap_fatal (frame=3D0xcc75cbd0, eva=3D48)=0D
    at /usr/src/sys/i386/i386/trap.c:809=0D
#4  0xc07a57e7 in trap_pfault (frame=3D0xcc75cbd0, usermode=3D0, eva=3D48)=
=0D
    at /usr/src/sys/i386/i386/trap.c:727=0D
#5  0xc07a5421 in trap (frame=3D=0D
      {tf_fs =3D -1067319272, tf_es =3D -1050673136, tf_ds =3D -1046740976,=
 tf_edi =3D 6, tf_esi =3D -1047375872, tf_ebp =3D -864695276, tf_isp =3D -8=
64695300, tf_ebx =3D 0, tf_edx =3D 0, tf_ecx =3D -1056882688, tf_eax =3D 16=
, tf_trapno =3D 12, tf_err =3D 2, tf_eip =3D -1065802866, tf_cs =3D 8, tf_e=
flags =3D 66118, tf_esp =3D 0, tf_ss =3D -864695252}) at /usr/src/sys/i386/=
i386/trap.c:417=0D
#6  0xc079390a in calltrap () at /usr/src/sys/i386/i386/exception.s:140=0D
#7  0xc0620018 in bus_generic_rl_set_resource (dev=3D0x0, child=3D0x0, =0D
    type=3D-1050630528, rid=3D-1047375872, start=3D3430272116, count=3D6)=0D
    at bus_if.h:522=0D
#8  0xc06fe6aa in dc_detach (dev=3D0x8) at /usr/src/sys/pci/if_dc.c:2364=0D
#9  0xc06fe560 in dc_attach (dev=3D0xc19cdc80) at /usr/src/sys/pci/if_dc.c:=
2318=0D
#10 0xc061f1f0 in device_attach (dev=3D0xc19cdc80) at device_if.h:177=0D
#11 0xc061f190 in device_probe_and_attach (dev=3D0xc19cdc80)=0D
    at /usr/src/sys/kern/subr_bus.c:2147=0D
#12 0xc04da2ef in cardbus_attach_card (cbdev=3D0xc160a680)=0D
---Type <return> to continue, or q <return> to quit---=0D
    at /usr/src/sys/dev/cardbus/cardbus.c:189=0D
#13 0xc0560d76 in cbb_insert (sc=3D0xc15c5800) at card_if.h:82=0D
#14 0xc0560b69 in cbb_event_thread (arg=3D0xc15c5800)=0D
    at /usr/src/sys/dev/pccbb/pccbb.c:489=0D
#15 0xc05f61e9 in fork_exit (callout=3D0xc0560a24 <cbb_event_thread>, =0D
    arg=3D0xc15c5800, frame=3D0xcc75cd48) at /usr/src/sys/kern/kern_fork.c:=
811=0D
#16 0xc079396c in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:=
209=0D
(kgdb) list *0xc079238e=0D
0xc079238e is in bus_dmamap_destroy (/usr/src/sys/i386/i386/busdma_machdep.=
c:418).=0D
413		if (map !=3D NULL && map !=3D &nobounce_dmamap) {=0D
414			if (STAILQ_FIRST(&map->bpages) !=3D NULL)=0D
415				return (EBUSY);=0D
416			free(map, M_DEVBUF);=0D
417		}=0D
418		dmat->map_count--;=0D
419		return (0);=0D
420	}=0D
421	=0D
422	=0D
(kgdb) quit=0D
sm-pc471# exit=0D=0D
exit=0D

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

--KsGdsel6WgEHnImy--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040922081616.GA18509>