diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2002-11-25 21:55:04 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2002-11-25 21:55:04 +0000 |
| commit | 8745ec57d0058bf1fe2b5841fbec531b9b3dcaf4 (patch) | |
| tree | f4af87040f146012e624ad726bb411669b2fc7fe /sys/dev | |
| parent | 1bbf246462f4f47904227c82f8b841401b6f2897 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/acpica/acpi_pcib_acpi.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c index 31e4c441d934..7fca8bed2f3c 100644 --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -164,10 +164,10 @@ acpi_pcib_acpi_attach(device_t dev) device_printf(dev, "could not evaluate _BBN - %s\n", AcpiFormatException(status)); return_VALUE(ENXIO); + } else { + /* if it's not found, assume 0 */ + sc->ap_bus = 0; } - } else { - /* if it's not found, assume 0 */ - sc->ap_bus = 0; } /* @@ -176,16 +176,15 @@ acpi_pcib_acpi_attach(device_t dev) */ busok = 1; if (sc->ap_bus == 0 && devclass_get_device(pcib_devclass, 0) != dev) { + busok = 0; status = acpi_EvaluateInteger(sc->ap_handle, "_ADR", &addr); if (ACPI_FAILURE(status)) { if (status != AE_NOT_FOUND) { device_printf(dev, "could not evaluate _ADR - %s\n", AcpiFormatException(status)); return_VALUE(ENXIO); - } else { + } else device_printf(dev, "could not determine config space address\n"); - busok = 0; - } } else { /* XXX: We assume bus 0. */ slot = addr >> 16; @@ -193,11 +192,11 @@ acpi_pcib_acpi_attach(device_t dev) if (bootverbose) device_printf(dev, "reading config registers from 0:%d:%d\n", slot, func); - if (host_pcib_get_busno(pci_cfgregread, 0, slot, func, &busno) == 0) { + if (host_pcib_get_busno(pci_cfgregread, 0, slot, func, &busno) == 0) device_printf(dev, "could not read bus number from config space\n"); - busok = 0; - } else { + else { sc->ap_bus = busno; + busok = 1; } } } |
