From owner-freebsd-stable@FreeBSD.ORG Fri May 15 13:11:08 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15309106566B for ; Fri, 15 May 2009 13:11:08 +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 DCEF28FC18 for ; Fri, 15 May 2009 13:11:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 9129D46C1A; Fri, 15 May 2009 09:11:07 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 8116F8A025; Fri, 15 May 2009 09:11:06 -0400 (EDT) From: John Baldwin To: freebsd-stable@freebsd.org Date: Fri, 15 May 2009 08:50:19 -0400 User-Agent: KMail/1.9.7 References: <4A0CF934.4000706@incunabulum.net> In-Reply-To: <4A0CF934.4000706@incunabulum.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905150850.19843.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 15 May 2009 09:11:06 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95 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: Bruce Simpson Subject: Re: Boot panic w/7.2-STABLE on amd64: resource_list_alloc X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2009 13:11:08 -0000 On Friday 15 May 2009 1:10:12 am Bruce Simpson wrote: > Hi, > > Since upgrading sources on RELENG_7 yesterday, my amd64 system panics > right after this line in dmesg: > > ata4: on atapci1 > panic: resource_list_alloc: resource entry is busy > > This machine uses an ALi SATA controller. I haven't had any problems > with this controller's support for most of the 7.x branch, but it was > last broken during the 6.x branch. > > I see there have recently been commits in this area which may have > broken ATA driver support in some subtle way. > > Backtrace is (w/o symbols):- > ... > resource_list_alloc() > pci_alloc_resource() > bus_alloc_resource() > ata_ali_sata_allocate() > ata_pcichannel_attach() > device_attach() > ... > > There are no debugging symbols at the moment as this is a production kernel. > If any further information is required to resolve the bug, please let me > know. Sounds like the ATA driver is allocating the same BAR twice. Hmm, yes, it allocates the resources once for each channel it seems in the ata_ali_sata attachment. Looking in ata-chipset.c, all the other chipsets are good about allocating these resources in their chipinit routines rather than the per-channel allocate routine. Well, except ata_pci_allocate() is also busted. *sigh* I can work on a patch for HEAD if you are willing to test. -- John Baldwin