Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jun 2003 13:24:59 +0200
From:      Thomas Moestl <t.moestl@tu-bs.de>
To:        John-Mark Gurney <gurney_j@resnet.uoregon.edu>
Cc:        freebsd-sparc64@freebsd.org
Subject:   Re: PCI bus numbering and orphaned devices
Message-ID:  <20030610112458.GA734@crow.dom2ip.de>
In-Reply-To: <20030609165838.32044@hydrogen.funkthat.com>
References:  <20030609165838.32044@hydrogen.funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2003/06/09 at 16:58:38 -0700, John-Mark Gurney wrote:
> Hello,
> 
> I've recently started work on making FreeBSD work better on a sparc64
> box that a friend has.  It's a Netra AX1105-500 (UltraSPARC-IIe 500MHz).
> 
> So far I have found out that the pci bus numbering has problems.  We
> don't attach pci busses as they are numbered in the bridge/OFW info.
> This causes problems with pciconf -l and pciconf -{w,r} not agreeing.
> It isn't too hard to tie down the busses to make pciconf agree with
> itself.
>
> [...]
>
> Index: apb.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/sparc64/pci/apb.c,v
> retrieving revision 1.4
> diff -u -r1.4 apb.c
> --- apb.c	2002/03/24 02:10:56	1.4
> +++ apb.c	2003/06/09 23:33:07
> @@ -207,9 +207,11 @@
>  	 * number, we should pick a better value.  One sensible alternative
>  	 * would be to pick 255; the only tradeoff here is that configuration
>  	 * transactions would be more widely routed than absolutely necessary.
> +	 *
> +	 * If we don't hardware the bus down, pciconf gets confused.
>  	 */
>  	if (sc->secbus != 0) {
> -		child = device_add_child(dev, "pci", -1);
> +		child = device_add_child(dev, "pci", sc->secbus);
>  		if (child != NULL)
>  			return (bus_generic_attach(dev));
>  	} else

This one looks good, please commit. The comment above is outdated, so
it might be better to just remove it completely.

	- Thomas

-- 
Thomas Moestl <t.moestl@tu-bs.de>	http://www.tu-bs.de/~y0015675/
              <tmm@FreeBSD.org>		http://people.FreeBSD.org/~tmm/
PGP fingerprint: 1C97 A604 2BD0 E492 51D0  9C0F 1FE6 4F1D 419C 776C



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