Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Dec 2008 02:45:40 +0100
From:      Marius Strobl <marius@alchemy.franken.de>
To:        Nathan Whitehorn <nwhitehorn@freebsd.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 154123 for review
Message-ID:  <20081206014540.GA59675@alchemy.franken.de>
In-Reply-To: <200812051754.mB5HsrKg017182@repoman.freebsd.org>
References:  <200812051754.mB5HsrKg017182@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/systm.h>
>  #include <sys/bus.h>
>  #include <sys/errno.h>
> +#include <sys/libkern.h>
>  
> +#include <dev/ofw/ofw_bus.h>
>  #include <dev/ofw/ofw_bus_subr.h>
>  #include <dev/ofw/openfirm.h>
>  
> @@ -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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081206014540.GA59675>