From owner-freebsd-sparc Thu Jun 13 8:34:42 2002 Delivered-To: freebsd-sparc@freebsd.org Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by hub.freebsd.org (Postfix) with SMTP id C327937B420 for ; Thu, 13 Jun 2002 08:34:34 -0700 (PDT) Received: (qmail 8168 invoked by uid 0); 13 Jun 2002 15:34:33 -0000 Received: from pd9e16ba2.dip.t-dialin.net (HELO forge.local) (217.225.107.162) by mail.gmx.net (mp009-rz3) with SMTP; 13 Jun 2002 15:34:33 -0000 Received: from tmm by forge.local with local (Exim 3.36 #1) id 17IWch-0001Eg-00; Thu, 13 Jun 2002 17:34:55 +0200 Date: Thu, 13 Jun 2002 17:34:55 +0200 From: Thomas Moestl To: Andrew Kenneth Milton Cc: Jake Burkholder , freebsd-sparc@FreeBSD.ORG Subject: Re: Weird PCI interface Message-ID: <20020613153455.GA312@crow.dom2ip.de> Mail-Followup-To: Andrew Kenneth Milton , Jake Burkholder , freebsd-sparc@FreeBSD.ORG References: <20020613020923.C44400@zeus.theinternet.com.au> <20020613185253.H44400@zeus.theinternet.com.au> <20020613104702.B257@locore.ca> <20020614005814.M44400@zeus.theinternet.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020614005814.M44400@zeus.theinternet.com.au> User-Agent: Mutt/1.3.99i Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Fri, 2002/06/14 at 00:58:14 +1000, Andrew Kenneth Milton wrote: > +-------[ Jake Burkholder ]---------------------- > | > | > I'm not sure which is correct scenario, whether it should return the > | > logical bus in the selector, or whether it should use physical bus when > | > looking up the device. > | > | Hmm. Thanks for looking at this. I don't know much about PCI so > | I can't be of much help... tmm is very busy right now with > | university but he said he had a break coming up soon, so he may > | be able to help you figure out what's going on then. > | > | Keep digging is all I can suggest. > > It looks like it'll hit all platforms that have the buses probed out of > order, so at this point it looks more than just Sparc related. I don't have > any other multi-bus machines to test that theory on though. Yes, this is caused by the MI PCI ioctl code using the following code to get the bus device structure: pci = devclass_get_device(devclass_find("pci"), io->pi_sel.pc_bus); where devclass_get_device() retrieves by logical (i.e. device) number. I have committed some code yesterday that adds bus enumeration to the MD PCI code (previously, the bus numbers set by the firmware would be used, which were not initialized correctly on some machines). This may work around the problem for you, so I suggest trying a newer kernel for now (there are however still some cases in which this will not help). I'll start to work on a real fix for this. - 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message