From owner-freebsd-current@FreeBSD.ORG Sun Jun 17 05:57:17 2007 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF68516A468; Sun, 17 Jun 2007 05:57:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9B55D13C468; Sun, 17 Jun 2007 05:57:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l5H5uTjk033772; Sat, 16 Jun 2007 23:56:29 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 16 Jun 2007 23:56:59 -0600 (MDT) Message-Id: <20070616.235659.-1947354616.imp@bsdimp.com> To: gurney_j@resnet.uoregon.edu From: "M. Warner Losh" In-Reply-To: <20070617053746.GV4602@funkthat.com> References: <20070617024935.GU4602@funkthat.com> <20070616.211257.1585999818.imp@bsdimp.com> <20070617053746.GV4602@funkthat.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 16 Jun 2007 23:56:29 -0600 (MDT) Cc: simokawa@FreeBSD.org, current@FreeBSD.org, wsk@gddsn.org.cn, mobile@FreeBSD.org Subject: Re: kernel panic with pccard insert on recent 7.0 CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2007 05:57:17 -0000 In message: <20070617053746.GV4602@funkthat.com> John-Mark Gurney writes: : Warner Losh wrote this message on Sat, Jun 16, 2007 at 21:12 -0600: : > In message: <20070617024935.GU4602@funkthat.com> : > John-Mark Gurney writes: : > : Warner Losh wrote this message on Sat, Jun 16, 2007 at 17:33 -0600: : > : > Also, I'm unclear on the difference between FILTER_STRAY and : > : > FILTER_HANDLED. : > : : > : The interrupt filter is suppose to return one of FILTER_STRAY or : > : FILTER_HANDLED... If you _HANDLED it return that, otherwise return : > : _STRAY... If you need to schedule the ithread, return _HANDLED or'd : > : with _SCHEDULE_THREAD... : > : > Will _HANDLED cause all the other handlers to not get called, or just : > the stray interrupt code from not happening? : : It will cause the remaining (not yet called) handlers not to get called... I'm not sure that's right, especially for edge triggered devices. : intr_event_handle calls intr_filter_loop which will return on the first : non-_STRAY handler and return it... Which intr_event_handle eoi's... : : It looks like this code is designed for level triggered interrupts and : not edge triggered... Yes. I'm pretty sure that's wrong. All ISA and PC Card devices use edge triggered interrupts. Also, it is inefficient for level triggered interrupts, since two interrupt sources on the same interrupt may trigger at about the same time... Warner : > : I thought piso fixed the comments, but apparently he hasn't (or hasn't : > : finished committing the patch that includes the comment fixes)... The : > : comments in bus.h are incorrect... : > : : > : > In message: <626eb4530706160525o54234621s2de098e64cdeb4fe@mail.gmail.com> : > : > "Hidetoshi Shimokawa" writes: : > : > : I think the following patch fix the problem. : > : > : : > : > : RCS file: /home/ncvs/src/sys/dev/pccard/pccard.c,v : > : > : retrieving revision 1.118 : > : > : diff -u -r1.118 pccard.c : > : > : --- pccard.c 31 May 2007 19:29:20 -0000 1.118 : > : > : +++ pccard.c 16 Jun 2007 12:23:35 -0000 : > : > : @@ -1238,7 +1238,7 @@ : > : > : if (pf->intr_filter != NULL || pf->intr_handler != NULL) : > : > : panic("Only one interrupt handler per function allowed"); : > : > : err = bus_generic_setup_intr(dev, child, irq, flags, pccard_filter, : > : > : - pccard_intr, pf, cookiep); : > : > : + intr ? pccard_intr : NULL, pf, cookiep); : > : > : if (err != 0) : > : > : return (err); : > : > : pf->intr_filter = filt; : > : > : : > : > : : > : > : On 6/16/07, ?????? wrote: : > : > : > hi, lists : > : > : > i always get Fatal trap while insert a pccard with recent 7.0 current. : > : > : > It seems that Can't recognize the pccard address? : > : > : > thanks with any reply. : > : > : > : > : > : > pccard0:Allocation failed for cfe 13 : > : > : > pccard0:Allocation failed for cfe 21 : > : > : > uart0: at port 0x3e8-0x3ef irq 11 : > : > : > function 0 config 29 on pccard0 : > : > : > uart0:[FILTER] : > : > : > : > : > : > Fatal trap 12: page fault while in kernel mode : > : > : > cpuid = 0; apic id = 00 : > : > : > fault virtual address = 0x0 : > : > : > fault code = supervisor read, page not present : > : > : > instruction pointer = 0x20:0x0 : > : > : > stack pointer = 0x28:0xe2996cb0 : > : > : > frame pointer = 0x28:0xe2996cb8 : > : > : > code segment = base 0x0, limit 0xfffff, type 0x1b : > : > : > = DPL 0, pres 1, def32 1, gran 1 : > : > : > processor eflags = interrupt enable, resume, IOPL = 0 : > : > : > current process = 21 (irq11: cbb0 cbb1+*) : > : > : > [thread pid 21 tid 100013 ] : > : > : > Stopped at 0: *** error reading from address 0 *** : > : > : > db>bt : > : > : > Tracing pid 21 tid 100013 td 0xc3f05c00 : > : > : > pccard_intr(c4285e00) at pccard_intr+0x12 : > : > : > cbb_func_intr(c4103140,0,c0a493ae,40b,c3f00064,...) at cbb_func_intr|0x51 : > : > : > ithread_loop(c404fab0,e2996d38,83fb5be8,ff06fc46,c3f4b804,...) at : > : > : > ithread_loop+0 : > : > : > x1b5 : > : > : > fork_exit(c074ccd0,c404fab0,e2996d38) at fork_exit+0x57 : > : > : > fork_trampoline() at fork_trampoline+0x8 : > : > : > --- trap 0, eip = 0, esp = 0xe2996d70, ebp = 0 --- : : -- : John-Mark Gurney Voice: +1 415 225 5579 : : "All that I will do, has been done, All that I have, has not." : :