diff options
author | jhb <jhb@FreeBSD.org> | 2003-08-28 21:22:25 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-08-28 21:22:25 +0000 |
commit | 51be1787c3f88a0d7f0e7acc9c80f8efe14d4107 (patch) | |
tree | a1e7aeb2faa12e05e2679df87b9fa88f7bfd5295 /sys/dev/acpica | |
parent | fed4d10a43fd7e42c8ab0e04aad88fa09632b414 (diff) | |
download | FreeBSD-src-51be1787c3f88a0d7f0e7acc9c80f8efe14d4107.zip FreeBSD-src-51be1787c3f88a0d7f0e7acc9c80f8efe14d4107.tar.gz |
- Rename PCIx_HEADERTYPE* to PCIx_HDRTYPE* so the constants aren't so long.
- Add a new PCIM_HDRTYPE constant for the field in PCIR_HDRTYPE that holds
the header type.
- Replace several magic numbers with appropriate constants for the header
type register and a couple of PCI_FUNCMAX.
- Merge to amd64 the fix to the i386 bridge code to skip devices with
unknown header types.
Requested by: imp (1, 2)
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r-- | sys/dev/acpica/Osd/OsdHardware.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/acpica/Osd/OsdHardware.c b/sys/dev/acpica/Osd/OsdHardware.c index afc32e8..90d2385 100644 --- a/sys/dev/acpica/Osd/OsdHardware.c +++ b/sys/dev/acpica/Osd/OsdHardware.c @@ -213,10 +213,10 @@ acpi_bus_number(ACPI_HANDLE root, ACPI_HANDLE curr, ACPI_PCI_ID *PciId) 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_HEADERTYPE, 1) & 0x7f; - if (header == 1 && subclass == PCIS_BRIDGE_PCI) + 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 == 2 && subclass == PCIS_BRIDGE_CARDBUS) + if (header == PCIM_HDRTYPE_CARDBUS && subclass == PCIS_BRIDGE_CARDBUS) bus = pci_cfgregread(bus, slot, func, PCIR_SECBUS_2, 1); return (bus); } |