From owner-freebsd-i386@FreeBSD.ORG Sun Jan 25 23:00:03 2009 Return-Path: Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E9441065691 for ; Sun, 25 Jan 2009 23:00:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 268428FC19 for ; Sun, 25 Jan 2009 23:00:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n0PN02TA036575 for ; Sun, 25 Jan 2009 23:00:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n0PN02eD036574; Sun, 25 Jan 2009 23:00:02 GMT (envelope-from gnats) Date: Sun, 25 Jan 2009 23:00:02 GMT Message-Id: <200901252300.n0PN02eD036574@freefall.freebsd.org> To: freebsd-i386@FreeBSD.org From: Markus Hitter Cc: Subject: Re: i386/130957: /sys/dev/pci/pci.c revision 181771 breaks networking and the power button X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Markus Hitter List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2009 23:00:03 -0000 The following reply was made to PR i386/130957; it has been noted by GNATS. From: Markus Hitter To: bug-followup@FreeBSD.org Cc: Subject: Re: i386/130957: /sys/dev/pci/pci.c revision 181771 breaks networking and the power button Date: Sun, 25 Jan 2009 23:52:32 +0100 --Apple-Mail-3--933801065 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Indeed, reverting the r181771 change on stable/7 as of today brings my Flepo back to life. I've attached a slimmed version of the reverse patch, keeping the comments, code removal and spelling corrections. --Apple-Mail-3--933801065 Content-Transfer-Encoding: 7bit Content-Type: text/plain; x-unix-mode=0644; name=pcipatch.txt Content-Disposition: attachment; filename=pcipatch.txt Index: sys/dev/pci/pci.c =================================================================== --- sys/dev/pci/pci.c (revision 187693) +++ sys/dev/pci/pci.c (working copy) @@ -2395,17 +2395,10 @@ */ res = resource_list_alloc(rl, bus, dev, type, ®, start, end, count, prefetch ? RF_PREFETCHABLE : 0); - if (res == NULL) { - /* - * If the allocation fails, clear the BAR and delete - * the resource list entry to force - * pci_alloc_resource() to allocate resources from the - * parent. - */ - resource_list_delete(rl, type, reg); - start = 0; - } else - start = rman_get_start(res); + if (res == NULL) + return(barlen); + start = rman_get_start(res); + pci_write_config(dev, reg, start, 4); if (ln2range == 64) pci_write_config(dev, reg + 4, start >> 32, 4); --Apple-Mail-3--933801065--