PCI bus numbering and orphaned devices

Jake Burkholder jake at locore.ca
Tue Jun 10 08:46:24 PDT 2003


Apparently, On Tue, Jun 10, 2003 at 01:24:59PM +0200,
	Thomas Moestl said words to the effect of;

> 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.

There's a PR about this that should be closed if it fixes the problem,
sparc64/50789.

Jake


More information about the freebsd-sparc64 mailing list