From owner-freebsd-sparc64@FreeBSD.ORG Tue Jun 10 08:46:23 2003 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E325C37B401 for ; Tue, 10 Jun 2003 08:46:23 -0700 (PDT) Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BC4243FB1 for ; Tue, 10 Jun 2003 08:46:22 -0700 (PDT) (envelope-from jake@k6.locore.ca) Received: from k6.locore.ca (localhost.locore.ca [127.0.0.1]) by k6.locore.ca (8.12.9/8.12.9) with ESMTP id h5AFkRMZ006735; Tue, 10 Jun 2003 11:46:28 -0400 (EDT) (envelope-from jake@k6.locore.ca) Received: (from jake@localhost) by k6.locore.ca (8.12.9/8.12.9/Submit) id h5AFkNaZ006734; Tue, 10 Jun 2003 11:46:23 -0400 (EDT) Date: Tue, 10 Jun 2003 11:46:23 -0400 From: Jake Burkholder To: John-Mark Gurney , freebsd-sparc64@freebsd.org Message-ID: <20030610154623.GB3351@locore.ca> References: <20030609165838.32044@hydrogen.funkthat.com> <20030610112458.GA734@crow.dom2ip.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030610112458.GA734@crow.dom2ip.de> User-Agent: Mutt/1.4i Subject: Re: PCI bus numbering and orphaned devices X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2003 15:46:24 -0000 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