From owner-freebsd-current@FreeBSD.ORG Wed Jun 20 15:34:13 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 C779016A41F; Wed, 20 Jun 2007 15:34:13 +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 7DEF413C448; Wed, 20 Jun 2007 15:34:13 +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 l5KFWBT5035563; Wed, 20 Jun 2007 09:32:12 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 20 Jun 2007 09:32:43 -0600 (MDT) Message-Id: <20070620.093243.-957832379.imp@bsdimp.com> To: simokawa@freebsd.org From: "M. Warner Losh" In-Reply-To: <626eb4530706200651s255e2ff2u80d70d2d887c8e4c@mail.gmail.com> References: <626eb4530706161858l5f60d67ej55874cb9348e649b@mail.gmail.com> <20070618183627.GA2183@tin.it> <626eb4530706200651s255e2ff2u80d70d2d887c8e4c@mail.gmail.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]); Wed, 20 Jun 2007 09:32:18 -0600 (MDT) Cc: mobile@freebsd.org, wsk@gddsn.org.cn, piso@freebsd.org, current@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: Wed, 20 Jun 2007 15:34:13 -0000 In message: <626eb4530706200651s255e2ff2u80d70d2d887c8e4c@mail.gmail.com> "Hidetoshi Shimokawa" writes: : On 6/19/07, Paolo Pisati wrote: : > On Sun, Jun 17, 2007 at 10:58:12AM +0900, Hidetoshi Shimokawa wrote: : > > And INTR_FILTER doesn't seem well-tested at least for : > > handling of stray interrupts for filter only IRQs. : > > I need the following patch to workaroung the problem. : > > : > > http://people.freebsd.org/~simokawa/tmp/kern_intr.c-20070617.patch : > > on which platform? : : amd64 : : > cause, right now, if there's a stray interrupt we disable the : > irq line if the interrut disable function is hooked to : > ie_disab: : : My patch may be wrong. But it seems too restrictive to disable the : interrupt forever : only one stray interrupt. Drivers could return _STRAY even if it is the source. I've seen hardware cause spurious interrupts all the time. Part of this experience dates back to the 4.x behavior of ISRs, but sometimes hardware does just glitch. You get a lot of glitching with CardBus/PC Card insertion and removal events, even when one is very careful. The CardBus bridge is somewhat broken by design: if the card inserted asserts the interrupt, then we'll get an interrupt. During power up, this can easily happen, and would result in 'STRAY' interrupts happening. These are not ill-behaved cards, but rather a squishy part of the spec that some bridge makers have made good engineering decisions, while others have made good business decisions about gate counts.. While I can see the need to turn of an interrupt source that has boatloads of stray interrupts, 'one' doesn't count as a boatload. Warner