From owner-freebsd-current@FreeBSD.ORG Wed Dec 30 17:20:48 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 51F0310656A6; Wed, 30 Dec 2009 17:20:48 +0000 (UTC) (envelope-from wkoszek@freebsd.czest.pl) Received: from freebsd.czest.pl (l95h.icis.pcz.pl [212.87.224.105]) by mx1.freebsd.org (Postfix) with ESMTP id BA75A8FC1F; Wed, 30 Dec 2009 17:20:47 +0000 (UTC) Received: from freebsd.czest.pl (l95h.icis.pcz.pl [212.87.224.105]) by freebsd.czest.pl (8.14.2/8.14.2) with ESMTP id nBUHXqL2014610; Wed, 30 Dec 2009 18:33:52 +0100 (CET) (envelope-from wkoszek@freebsd.czest.pl) Received: (from wkoszek@localhost) by freebsd.czest.pl (8.14.2/8.14.2/Submit) id nBUHXpo3014609; Wed, 30 Dec 2009 18:33:51 +0100 (CET) (envelope-from wkoszek) Date: Wed, 30 Dec 2009 18:33:51 +0100 From: "Wojciech A. Koszek" To: John Baldwin Message-ID: <20091230173351.GV77520@FreeBSD.org> Mail-Followup-To: John Baldwin , Thierry Herbelot , Warner Losh , current@freebsd.org References: <200912110615.28030.thierry.herbelot@free.fr> <200912300928.33157.jhb@freebsd.org> <200912301025.56737.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: <200912301025.56737.jhb@freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-3.0 (freebsd.czest.pl [212.87.224.105]); Wed, 30 Dec 2009 18:33:52 +0100 (CET) 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 17:20:48 -0000 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, I took my current sources: http://people.freebsd.org/~wkoszek/traces/cb-kernel.txt Which come from: FreeBSD laptop.freebsd.czest.pl 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r200811: Mon Dec 21 22:11:17 UTC 2009 wkoszek@laptop.freebsd.czest.pl:/usr/src/sys/i386/compile/L20091221 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 -- Wojciech A. Koszek wkoszek@FreeBSD.org http://FreeBSD.czest.pl/~wkoszek/