From 51be1787c3f88a0d7f0e7acc9c80f8efe14d4107 Mon Sep 17 00:00:00 2001 From: jhb Date: Thu, 28 Aug 2003 21:22:25 +0000 Subject: - 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) --- sys/dev/acpica/Osd/OsdHardware.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev/acpica') 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); } -- cgit v1.1