From owner-p4-projects@FreeBSD.ORG Sat Dec 6 02:23:31 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7FCD1106567E; Sat, 6 Dec 2008 02:23:31 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 432AF1065673 for ; Sat, 6 Dec 2008 02:23:31 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id AC6A58FC0C for ; Sat, 6 Dec 2008 02:23:30 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id mB61jf3G059729; Sat, 6 Dec 2008 02:45:41 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id mB61jfbi059728; Sat, 6 Dec 2008 02:45:41 +0100 (CET) (envelope-from marius) Date: Sat, 6 Dec 2008 02:45:40 +0100 From: Marius Strobl To: Nathan Whitehorn Message-ID: <20081206014540.GA59675@alchemy.franken.de> References: <200812051754.mB5HsrKg017182@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812051754.mB5HsrKg017182@repoman.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: Perforce Change Reviews Subject: Re: PERFORCE change 154123 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2008 02:23:31 -0000 On Fri, Dec 05, 2008 at 05:54:53PM +0000, Nathan Whitehorn wrote: > http://perforce.freebsd.org/chv.cgi?CH=154123 > > Change 154123 by nwhitehorn@nwhitehorn_trantor on 2008/12/05 17:54:14 > > Expand the OFW PCI probing routines to do a regular PCI probe in > addtion to asking the firmware. There can be devices even in Apple > hardware that are not listed in the devtree (grackle_hb, for instance) > and this also sets the stage for FDT support. Also add some > pretty-printing of name and compat properties to the devinfo output. > > This commit also, and more importantly, fixes X11 on my Blue & White > G3. Apparently X barfs if the OS's list of PCI devices doesn't match > the ones that it finds? Unclear. > > MFp4: RSN > > Affected files ... > > .. //depot/projects/ppc-g5/sys/dev/ofw/ofw_bus_subr.c#4 edit > .. //depot/projects/ppc-g5/sys/dev/ofw/ofw_bus_subr.h#3 edit > .. //depot/projects/ppc-g5/sys/powerpc/ofw/ofw_pcibus.c#5 edit > .. //depot/projects/ppc-g5/sys/powerpc/powermac/macio.c#6 edit > > Differences ... > > ==== //depot/projects/ppc-g5/sys/dev/ofw/ofw_bus_subr.c#4 (text+ko) ==== > > @@ -34,7 +34,9 @@ > #include > #include > #include > +#include > > +#include > #include > #include > > @@ -72,6 +74,18 @@ > free(obd->obd_type, M_OFWPROP); > } > > +int > +ofw_bus_gen_child_location_str(device_t cbdev, device_t child, char *buf, > + size_t buflen) > +{ > + strlcat(buf, "name=", buflen); > + strlcat(buf, ofw_bus_get_name(child), buflen); > + > + strlcat(buf, " compat=", buflen); > + strlcat(buf, ofw_bus_get_compat(child), buflen); > + > + return (0); > +}; > IMO a bus_child_pnpinfo_str method would be way more appropriate for this kind of information as it doesn't refer to an address, physical location, etc. Marius