From owner-freebsd-current@FreeBSD.ORG Tue Jun 10 04:45:48 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3CEDE37B404 for ; Tue, 10 Jun 2003 04:45:48 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 18B8E43FAF for ; Tue, 10 Jun 2003 04:45:46 -0700 (PDT) (envelope-from tmoestl@gmx.net) Received: (qmail 10073 invoked by uid 65534); 10 Jun 2003 11:45:44 -0000 Received: from p508E7664.dip.t-dialin.net (EHLO galatea.local) (80.142.118.100) by mail.gmx.net (mp007) with SMTP; 10 Jun 2003 13:45:44 +0200 Received: from tmm by galatea.local with local (Exim 4.20 #1) id 19PhFL-0000bv-AB; Tue, 10 Jun 2003 13:24:59 +0200 Date: Tue, 10 Jun 2003 13:24:59 +0200 From: Thomas Moestl To: John-Mark Gurney Message-ID: <20030610112458.GA734@crow.dom2ip.de> Mail-Followup-To: John-Mark Gurney , freebsd-sparc64@freebsd.org, freebsd-current@freebsd.org References: <20030609165838.32044@hydrogen.funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030609165838.32044@hydrogen.funkthat.com> User-Agent: Mutt/1.4.1i Sender: Thomas Moestl cc: freebsd-current@freebsd.org cc: freebsd-sparc64@freebsd.org Subject: Re: PCI bus numbering and orphaned devices X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2003 11:45:48 -0000 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 http://www.tu-bs.de/~y0015675/ http://people.FreeBSD.org/~tmm/ PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C