summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/Osd
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2007-05-31 00:52:32 +0000
committernjl <njl@FreeBSD.org>2007-05-31 00:52:32 +0000
commit467cefc4dad88639222a7ac680638e367a73d3ba (patch)
treeb77a8bb082db5ade5d309be7d444c172a897d902 /sys/dev/acpica/Osd
parent67962a47d67fe829c03be105fdce2a7593bd7d52 (diff)
downloadFreeBSD-src-467cefc4dad88639222a7ac680638e367a73d3ba.zip
FreeBSD-src-467cefc4dad88639222a7ac680638e367a73d3ba.tar.gz
Remove "acpi_bus_number: can't get _ADR" message. It usually appears as
we traverse \_SB and \ in the namespace, which won't have _ADR anyway. Use a proper extern instead of our own private copy. MFC after: 1 week
Diffstat (limited to 'sys/dev/acpica/Osd')
-rw-r--r--sys/dev/acpica/Osd/OsdHardware.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/sys/dev/acpica/Osd/OsdHardware.c b/sys/dev/acpica/Osd/OsdHardware.c
index 575d570..6e3beea 100644
--- a/sys/dev/acpica/Osd/OsdHardware.c
+++ b/sys/dev/acpica/Osd/OsdHardware.c
@@ -34,9 +34,11 @@ __FBSDID("$FreeBSD$");
#include <contrib/dev/acpica/acpi.h>
+#include <sys/bus.h>
#include <sys/kernel.h>
#include <machine/bus.h>
#include <machine/pci_cfgreg.h>
+#include <dev/acpica/acpivar.h>
#include <dev/pci/pcireg.h>
/*
@@ -232,10 +234,6 @@ AcpiOsWritePciConfiguration (ACPI_PCI_ID *PciId, UINT32 Register,
return (AE_OK);
}
-/* XXX should use acpivar.h but too many include dependencies */
-extern ACPI_STATUS acpi_GetInteger(ACPI_HANDLE handle, char *path, int
- *number);
-
/*
* Depth-first recursive case for finding the bus, given the slot/function.
*/
@@ -271,10 +269,8 @@ acpi_bus_number(ACPI_HANDLE root, ACPI_HANDLE curr, ACPI_PCI_ID *PciId)
/* Get the parent's slot and function. */
status = acpi_GetInteger(parent, "_ADR", &adr);
- if (ACPI_FAILURE(status)) {
- printf("acpi_bus_number: can't get _ADR\n");
+ if (ACPI_FAILURE(status))
return (bus);
- }
slot = ACPI_HIWORD(adr);
func = ACPI_LOWORD(adr);
@@ -288,7 +284,7 @@ acpi_bus_number(ACPI_HANDLE root, ACPI_HANDLE curr, ACPI_PCI_ID *PciId)
header = pci_cfgregread(bus, slot, func, PCIR_HDRTYPE, 1) & PCIM_HDRTYPE;
if (header == PCIM_HDRTYPE_BRIDGE && subclass == PCIS_BRIDGE_PCI)
bus = pci_cfgregread(bus, slot, func, PCIR_SECBUS_1, 1);
- if (header == PCIM_HDRTYPE_CARDBUS && subclass == PCIS_BRIDGE_CARDBUS)
+ else if (header == PCIM_HDRTYPE_CARDBUS && subclass == PCIS_BRIDGE_CARDBUS)
bus = pci_cfgregread(bus, slot, func, PCIR_SECBUS_2, 1);
return (bus);
}
@@ -328,7 +324,8 @@ AcpiOsDerivePciId(ACPI_HANDLE rhandle, ACPI_HANDLE chandle, ACPI_PCI_ID **PciId)
bus = acpi_bus_number(rhandle, parent, *PciId);
(*PciId)->Bus = bus;
if (bootverbose) {
- printf("AcpiOsDerivePciId: bus %d dev %d func %d\n",
- (*PciId)->Bus, (*PciId)->Device, (*PciId)->Function);
+ printf("AcpiOsDerivePciId: %s -> bus %d dev %d func %d\n",
+ acpi_name(chandle), (*PciId)->Bus, (*PciId)->Device,
+ (*PciId)->Function);
}
}
OpenPOWER on IntegriCloud