Improve the kludge assignment of sub-bus numbers a little by fixing an

off by one error.  subbus must be > than pribus, so the right test is
<= not just <.

Reported by: Peter Losher
This commit is contained in:
imp 2004-06-23 13:49:46 +00:00
parent d13d90025b
commit bba2e51a2e

View File

@ -738,7 +738,7 @@ cbb_attach(device_t brdev)
pribus = pcib_get_bus(parent);
DEVPRINTF((brdev, "Secondary bus is %d\n", bus));
if (bus == 0) {
if (curr_bus_number < pribus)
if (curr_bus_number <= pribus)
curr_bus_number = pribus + 1;
if (pci_read_config(brdev, PCIR_PRIBUS_2, 1) != pribus) {
DEVPRINTF((brdev, "Setting primary bus to %d\n", pribus));