From owner-freebsd-current Fri Nov 2 6:31:32 2001 Delivered-To: freebsd-current@freebsd.org Received: from web.cs.ndsu.nodak.edu (web.cs.ndsu.NoDak.edu [134.129.125.7]) by hub.freebsd.org (Postfix) with ESMTP id D118537B401; Fri, 2 Nov 2001 06:31:29 -0800 (PST) Received: (from tinguely@localhost) by web.cs.ndsu.nodak.edu (8.11.4/8.11.4) id fA2EVSA65309; Fri, 2 Nov 2001 08:31:28 -0600 (CST) (envelope-from tinguely) Date: Fri, 2 Nov 2001 08:31:28 -0600 (CST) From: mark tinguely Message-Id: <200111021431.fA2EVSA65309@web.cs.ndsu.nodak.edu> To: freebsd-current@FreeBSD.ORG, haro@h4.dion.ne.jp Subject: Re: Panic with PCCARD Cc: imp@FreeBSD.ORG In-Reply-To: <20011102010512I.haro@h4.dion.ne.jp> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > 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