From owner-freebsd-stable Mon Jul 10 9:16:20 2000 Delivered-To: freebsd-stable@freebsd.org Received: from horizon.barak-online.net (horizon.barak.net.il [206.49.94.218]) by hub.freebsd.org (Postfix) with ESMTP id 22BF837B578 for ; Mon, 10 Jul 2000 09:16:10 -0700 (PDT) (envelope-from bk532@iname.com) Received: from localhost.local.net (pop09-1-ras1-p160.barak.net.il [212.150.107.160]) by horizon.barak-online.net (8.9.3/8.9.1) with ESMTP id TAA06718 for ; Mon, 10 Jul 2000 19:15:12 +0300 (IDT) Received: from iname.com (localhost.local.net [127.0.0.1]) by localhost.local.net (8.9.3/8.9.3) with ESMTP id OAA04626 for ; Mon, 10 Jul 2000 14:28:48 +0300 (IDT) (envelope-from bk532@iname.com) Message-ID: <3969B36C.684CC369@iname.com> Date: Mon, 10 Jul 2000 14:28:44 +0300 From: Boris Karnaukh Organization: Private person X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.0-STABLE i386) X-Accept-Language: en, ru MIME-Version: 1.0 Cc: freebsd-stable@FreeBSD.ORG Subject: Re: Fixing PCI device locations References: <200006261436.QAA10618@luxren2.boostworks.com> <20000708220148.A2104@StefanEsser.FreeBSD.org> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Stefan Esser wrote: > > On 2000-06-26 09:18 -0700, Doug White wrote: > > On Mon, 26 Jun 2000, Remy Nonnenmacher wrote: > > > I recently upgraded a server from 3.4 to 4-stable and was hurted by the > > > PCI device scanning not done in the same order on the two versions. > > > > > > Mainly, the server have 6 SCSI busses over 3 devices and two PCI > > > busses. (da0 on 3.4 ended up on da52 under 4-stable) > > > > > > While provisions are made for fixing SCSI controlers to busses (ieg: ahc > > > to scbus) and disks to scbuses, is there a way to fix SCSI controlers > > > to PCI locations ? > > > > > > (something like "device ahc0 on pci0.11.1") > > > > Not at this time, but it may appear at some time in the future, given an > > enterprising individual. A great many people, including embedded systems > > builders, would be thankful for such a feature. > > I had plans to improve the support for wired PCI devices that was in 3.0, > but have not looked at the problem after the newbus modifications. There > is one problem, which needs to be understood, but its not that hard ;-) > > The PCI probe reports bus numbers as assigned by the PCI BIOS. If we want > to specify locations of wired devices, we should NOT use the bus number > they are reported on, or bad things will happen, if some new PCI bridge > is installed and all the buses are suddenly renumbered ... > > We need a way to assign "labels" to PCI buses. This may be best done like > this: > > device pcibus1 at pci 0.10.0 > device pcibus2 at pci 1.4.0 > device ahc0 at pci 2.0.0 > > Keep in mind, that there may be a PCI bridge at 0.9.0, which already got > bus number 1 assigned by the BIOS. For that reason, we now have two PCI > number schemes: The bus numbers as programmed into the PCI chip-set and > bridges, and our "logical" bus numbers, which are only used for reference > in order to bind device driver instances to devices that are physically > connected to some PCI slot (possibly via multiple bridges). > > The above lines should be interpreted to mean: > > device pcibus X at pci 0.10.0 > device pcibus Y at pci X.4.0 > device ahc0 at pci Y.0.0 > > and X and Y can come out as 3 and 5 respectively, for example (and would > be reported in the boot log accordingly). This will confuse people that > want to add a device on yet another PCI bus, since numbers in the config > and numbers reported will always diverge, whenever a PCI bridge is added. > I think that from semantic point of view of would be better to change syntax as follows: device pcibus1 at pci 0.10.0 device pcibus2 at pcibus1 4.0 device ahc0 at pcibus2 0.0 to provide clear distinction between subordinate pci buses. -- Boris Karnaukh (mailto:bk532@iname.com) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message