summaryrefslogtreecommitdiffstats
path: root/sys/dev/pccbb
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2004-06-23 13:49:46 +0000
committerimp <imp@FreeBSD.org>2004-06-23 13:49:46 +0000
commitc5906d37f5b02f25c5c993f3b6e8a6f56a1c453d (patch)
treea89d6923d769f10b0005250ea4112de92c59feb4 /sys/dev/pccbb
parentbf9f245cda47349b25ee02e943f872cdd230b842 (diff)
downloadFreeBSD-src-c5906d37f5b02f25c5c993f3b6e8a6f56a1c453d.zip
FreeBSD-src-c5906d37f5b02f25c5c993f3b6e8a6f56a1c453d.tar.gz
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
Diffstat (limited to 'sys/dev/pccbb')
-rw-r--r--sys/dev/pccbb/pccbb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c
index 97c3661..659f928 100644
--- a/sys/dev/pccbb/pccbb.c
+++ b/sys/dev/pccbb/pccbb.c
@@ -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));
OpenPOWER on IntegriCloud