[...]>
> Secondly, in /dev, there is the common host0, host1 business.
/dev/ide or /dev/scsi?
I still
> haven't figured out the logic for determining the hostx business. Is it
> something I can visually see on the motherboard, or is it something I
> can query my system about that will provide the answer?
>
Not likely. Both for IDE and SCSI system enumerates adapters and assigns
them numbers, this happens dynamically. These are the numbers you get in
/dev/ide/hostN or /dev/scsi/hostN.
For IDE the system reserves first two entries for bootable IDE controllers
which usually means "controller on motherboard" unless you have configured
your system with CONFIG_BLK_DEV_OFFBOARD in which case also PCI cards may be
bootable. So your first onboard controller is host0 and next PCI is host2.
But if you happen to have bootable PCI controller it may well be host0.
For SCSI it is just the order SCSI hosts are enumerated which depends on
order in which modules for particular hardware is loaded. First found SCSI
controller gets 0, next 1 etc.
For IDE you can assign host number by using ideN=ports and for SCSI by using
scshosts=driver1,driver2,... but you have no easy way to specify relative
order of hosts sharing the same driver.
In general physical<->logical device numbers in Linux sucks. Even Solaris
manages it better in most respects. Hopefully it will change in 2.5 with
devicefs.
-andrey
|