diff options
author | jkim <jkim@FreeBSD.org> | 2010-10-13 16:30:41 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2010-10-13 16:30:41 +0000 |
commit | c60347528d6983d341039f9596f1988e833a16b7 (patch) | |
tree | b85db60716de6fe870533a9c381f95b8c8d7b654 /sys/dev/acpica | |
parent | ed92bd409f719797bab6d2ed5cde481b5a268bf1 (diff) | |
download | FreeBSD-src-c60347528d6983d341039f9596f1988e833a16b7.zip FreeBSD-src-c60347528d6983d341039f9596f1988e833a16b7.tar.gz |
Remove acpi_bus_number() completely. It had to be removed in r212761.
Pointed out by: jhb
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r-- | sys/dev/acpica/Osd/OsdHardware.c | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/sys/dev/acpica/Osd/OsdHardware.c b/sys/dev/acpica/Osd/OsdHardware.c index c8cc76e..e645196 100644 --- a/sys/dev/acpica/Osd/OsdHardware.c +++ b/sys/dev/acpica/Osd/OsdHardware.c @@ -122,58 +122,3 @@ AcpiOsWritePciConfiguration (ACPI_PCI_ID *PciId, UINT32 Register, return (AE_OK); } - -/* - * Depth-first recursive case for finding the bus, given the slot/function. - */ -static int __unused -acpi_bus_number(ACPI_HANDLE root, ACPI_HANDLE curr, ACPI_PCI_ID *PciId) -{ - ACPI_HANDLE parent; - ACPI_STATUS status; - ACPI_OBJECT_TYPE type; - UINT32 adr; - int bus, slot, func, class, subclass, header; - - /* Try to get the _BBN object of the root, otherwise assume it is 0. */ - bus = 0; - if (root == curr) { - status = acpi_GetInteger(root, "_BBN", &bus); - if (ACPI_FAILURE(status) && bootverbose) - printf("acpi_bus_number: root bus has no _BBN, assuming 0\n"); - return (bus); - } - status = AcpiGetParent(curr, &parent); - if (ACPI_FAILURE(status)) - return (bus); - - /* First, recurse up the tree until we find the host bus. */ - bus = acpi_bus_number(root, parent, PciId); - - /* Validate parent bus device type. */ - if (ACPI_FAILURE(AcpiGetType(parent, &type)) || type != ACPI_TYPE_DEVICE) { - printf("acpi_bus_number: not a device, type %d\n", type); - return (bus); - } - - /* Get the parent's slot and function. */ - status = acpi_GetInteger(parent, "_ADR", &adr); - if (ACPI_FAILURE(status)) - return (bus); - slot = ACPI_HIWORD(adr); - func = ACPI_LOWORD(adr); - - /* Is this a PCI-PCI or Cardbus-PCI bridge? */ - class = pci_cfgregread(bus, slot, func, PCIR_CLASS, 1); - if (class != PCIC_BRIDGE) - return (bus); - subclass = pci_cfgregread(bus, slot, func, PCIR_SUBCLASS, 1); - - /* Find the header type, masking off the multifunction bit. */ - 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); - else if (header == PCIM_HDRTYPE_CARDBUS && subclass == PCIS_BRIDGE_CARDBUS) - bus = pci_cfgregread(bus, slot, func, PCIR_SECBUS_2, 1); - return (bus); -} |