Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Nov 2001 08:31:28 -0600 (CST)
From:      mark tinguely <tinguely@web.cs.ndsu.nodak.edu>
To:        freebsd-current@FreeBSD.ORG, haro@h4.dion.ne.jp
Cc:        imp@FreeBSD.ORG
Subject:   Re: Panic with PCCARD
Message-ID:  <200111021431.fA2EVSA65309@web.cs.ndsu.nodak.edu>
In-Reply-To: <20011102010512I.haro@h4.dion.ne.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
>  I'm having panic for the last few days, if I have PCCARD inserted.
>  If no card is inside, system boots up fine.
>
>  Here's the panic message, I've written down.
>
>  Fatal trap 12: page fault while in kernel mode
>  fault virtual address	= 0x3c
>  fault code		= supervisor write, page not present
>  instruction pointer	= 0x8:0xc01ecea5
>  stack pointer	        = 0x10:0xc8ca3b00
>  frame pointer	        = 0x10:0xc8ca3b00
>  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		= 201 (pccardd)
>  kernel: type 12 trap, code=0
>  Stopped at      device_set_flags+0x9:      movl %eax,0x3c (%edx)
>  db> Context switches not allowed in debugger
>  db> t
>  device_set_flags(0,0,c139a080,c1411e00,0) at device_set_flags+0x9
>  allocate_driver(c139c600,c1497400,c8ca8ba4,c13a9800,c87a0804) at allocate_driver+0xd9
>  crdioctl(c13a9800,c0ac5006,c1497400,3,c87a0804) at crdioctl+0x337
>  spec_ioctl(c8ca8b4,c8ca8c34,c02222cf,c8ca8ba4,c1496d80) at spec_ioctl+0x26
>  spec_vnoperate(c8ca8ba4,c1496d80,ac,c1497400,c03521a0) at spec_vnoperate+0x15
>  vn_ioctl(c1496d80,c0ac5006,c1497400,c87a0804,c87a090c) at vn_ioctl+0x10f
>  ioctl(c87a0804,c8ca8d20,8073140,8073100,0) at ioctl+0x20c
>  syscall(2f,2f,2f,0,8073100) at syscall+0x24c
>  syscall_with_err_pushed() at syscall_with_err_pushed+0x1b
>  --- syscall(54, FreeBSD ELF, ioctl), eip = 0x8054cd0, esp = 0xbfbff93c, ebp = 0xbfbffa48 ---

the panic appears to be a side affect that allocate_driver() in
sys/pccard/pccard.c does not check the success/failure of device_add_child().
The patch that would fix that is:
--- pccard.c.orig	Fri Sep 14 03:43:15 2001
+++ pccard.c	Fri Nov  2 08:21:48 2001
@@ -236,6 +236,8 @@
 	bcopy(desc->misc, devi->misc, sizeof(desc->misc));
 	resource_list_init(&devi->resources);
 	child = device_add_child(pccarddev, devi->name, desc->unit);
+	if (child == NULL)
+		return (EIO); 	/* XXX */
 	device_set_flags(child, desc->flags);
 	device_set_ivars(child, devi);
 	if (bootverbose) {

The real question is, why is device_add_child failing? The best answer
is that the device class is not being found in make_device() 
sys/kern/subr_bus.c. I would suggest you print the string in variable
"name", I think it is corrupt.

--mark tinguely.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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