Re: Linux not adhering to BIOS Drive boot order?

Peter Samuelson (peter@cadcamlab.org)
Thu, 18 Jan 2001 06:50:12 -0600


[James Bottomley]
> The fundamental problem that we all agree on is that SCSI devices are
> detected in the order that the mid-layer hosts.c file calls their
> detect routines.

That was yesterday. Today they are detected in the order they are
linked into the kernel, cf. the Makefile. But yes, the problem is
basically the same.

> Further, for multiple cards of the same type, the detection order is
> up to the individual driver.

Yes. PCI-based drivers will most likely use bus order since the kernel
provides facilities to do this easily. For a single driver driving
multiple cards on multiple bus types, who knows.

> One of the ways this could be solved would be to impose bus ordering
> on the detection sequence.

This would be rather an intrusive change, since it puts the burden on
hosts.c to know what devices are where rather than on each driver.

A much less intrusive (?) variation: scsi_register() is given the
device location in some form. It would then use insertion sort to add
the new adapter to the list of known ones. Obviously this behavior
should only apply until the end of the boot sequence -- modules always
get put on the end of the list. The bus location would be a 32-bit
number, perhaps, with the high 8 bits for bus type and the low 24 bits
for further enumeration (for PCI: 8 bits each for bus, slot, and fn).

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/