Date: Sat, 8 Jul 2000 22:01:48 +0200 From: Stefan Esser <se@freebsd.org> To: Doug White <dwhite@resnet.uoregon.edu> Cc: Remy Nonnenmacher <remy@boostworks.com>, freebsd-stable@FreeBSD.ORG, Stefan Esser <se@freebsd.org> Subject: Re: Fixing PCI device locations Message-ID: <20000708220148.A2104@StefanEsser.FreeBSD.org> In-Reply-To: <Pine.BSF.4.21.0006260917480.43159-100000@resnet.uoregon.edu>; from dwhite@resnet.uoregon.edu on Mon, Jun 26, 2000 at 09:18:38AM -0700 References: <200006261436.QAA10618@luxren2.boostworks.com> <Pine.BSF.4.21.0006260917480.43159-100000@resnet.uoregon.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2000-06-26 09:18 -0700, Doug White <dwhite@resnet.uoregon.edu> 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. But in order to assign fixed unit numbers to cards in certain slots, this would be better than nothing. And there just should be comments, that remind you that the intermediate bus numbers are only "labeled", not "wired". But the device is attached under a predetermined name, and that is what counts ;-) ( The situation is not that different from wired SCSI devices, just that a SCSI bus does not have the concept of a bus number, and we can thus choose scbus (unit) numbers without the risk of confusion. PCI buses have numbers assigned by the BIOS, long before we get a chance to state our preferences ;-) Anybody got a better concept ? Regards, STefan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000708220148.A2104>