From owner-freebsd-current@FreeBSD.ORG Wed Dec 30 18:07:07 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 924EA1065692; Wed, 30 Dec 2009 18:07:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 627908FC19; Wed, 30 Dec 2009 18:07:07 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id F0D4846B09; Wed, 30 Dec 2009 13:07:06 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 21C9B8A01B; Wed, 30 Dec 2009 13:07:06 -0500 (EST) From: John Baldwin To: "Wojciech A. Koszek" Date: Wed, 30 Dec 2009 13:04:53 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091103; KDE/4.3.1; amd64; ; ) References: <200912110615.28030.thierry.herbelot@free.fr> <200912301025.56737.jhb@freebsd.org> <20091230173351.GV77520@FreeBSD.org> In-Reply-To: <20091230173351.GV77520@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit Message-Id: <200912301304.53191.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 30 Dec 2009 13:07:06 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Thierry Herbelot , Warner Losh , current@freebsd.org Subject: Re: Panic in a recent kernel (cardbus/pci related ?) 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, 30 Dec 2009 18:07:07 -0000 On Wednesday 30 December 2009 12:33:51 pm Wojciech A. Koszek wrote: > On Wed, Dec 30, 2009 at 10:25:56AM -0500, John Baldwin wrote: > > On Wednesday 30 December 2009 9:28:33 am John Baldwin wrote: > > > On Friday 11 December 2009 12:15:27 am Thierry Herbelot wrote: > > > > Hello, > > > > > > [..] > > > > > This is one possible hack. It instructs the PCI bus to completely remove the > > resource for the CIS. While looking at this I found some other bugs (the code to > > disable decoding in the ROM BAR didn't actually work for example) and have come up > > with a larger patch. It does a few things: > > > > 1) Fixes bus_generic_rl_(alloc|release)_resource() to not try to fetch a resource > > list for a grandchildren. > > > > 2) Add full support for device ROM BARs to the PCI bus and remove the device ROM > > hacks from the cardbus driver now that PCI manages them. > > > > 3) Use a resource_list_unreserve() when purging resources from a cardbus card when > > it is removed as this is a bit cleaner. Arguably the PCI bus driver should have a > > 'delete all resources' method that does this instead (hotplug PCI would need to > > use it). > > > > 4) Remove unused pci_release_resource(). > > > > The patch is available at http://www.FreeBSD.org/~jhb/patches/cardbus.patch > > Hi John, > > And I have applied your patch against src/sys/.... This is what I got when my > Atheros-based CardBus WiFi card got inserted: > > http://people.freebsd.org/~wkoszek/traces/cb.jpg I had a typo. Change the 'bus_generic_activate_resource()' in pci_deactivate_resource() in pci.c to bus_generic_deactivate_resource(). -- John Baldwin