diff options
author | jhb <jhb@FreeBSD.org> | 2013-07-03 17:26:05 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2013-07-03 17:26:05 +0000 |
commit | eaaf7e1bb0fd8d71cf05bc2811ac135659e0e89d (patch) | |
tree | bdc71c38d09d404a3621e95edd5afa20af47a105 /sys/dev/acpica | |
parent | 52791387f412865a332c53dbfe8b2966916edd4f (diff) | |
download | FreeBSD-src-eaaf7e1bb0fd8d71cf05bc2811ac135659e0e89d.zip FreeBSD-src-eaaf7e1bb0fd8d71cf05bc2811ac135659e0e89d.tar.gz |
Don't perform the acpi_DeviceIsPresent() check for PCI-PCI bridges. If
we are probing a PCI-PCI bridge it is because we found one by enumerating
the devices on a PCI bus, so the bridge is definitely present. A few
BIOSes report incorrect status (_STA) for some bridges that claimed they
were not present when in fact they were.
While here, move this check earlier for Host-PCI bridges so attach fails
before doing any work that needs to be torn down.
PR: kern/91594
Tested by: Jack Vogel @ Intel
MFC after: 1 week
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r-- | sys/dev/acpica/acpi_pcib.c | 9 | ||||
-rw-r--r-- | sys/dev/acpica/acpi_pcib_acpi.c | 8 |
2 files changed, 7 insertions, 10 deletions
diff --git a/sys/dev/acpica/acpi_pcib.c b/sys/dev/acpica/acpi_pcib.c index 1a42d74..c4bded8 100644 --- a/sys/dev/acpica/acpi_pcib.c +++ b/sys/dev/acpica/acpi_pcib.c @@ -135,15 +135,6 @@ acpi_pcib_attach(device_t dev, ACPI_BUFFER *prt, int busno) ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); /* - * Don't attach if we're not really there. - * - * XXX: This isn't entirely correct since we may be a PCI bus - * on a hot-plug docking station, etc. - */ - if (!acpi_DeviceIsPresent(dev)) - return_VALUE(ENXIO); - - /* * Get the PCI interrupt routing table for this bus. If we can't * get it, this is not an error but may reduce functionality. There * are several valid bridges in the field that do not have a _PRT, so diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c index 36d9580..882834d 100644 --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -287,6 +287,12 @@ acpi_pcib_acpi_attach(device_t dev) sc->ap_handle = acpi_get_handle(dev); /* + * Don't attach if we're not really there. + */ + if (!acpi_DeviceIsPresent(dev)) + return (ENXIO); + + /* * Get our segment number by evaluating _SEG. * It's OK for this to not exist. */ @@ -353,7 +359,7 @@ acpi_pcib_acpi_attach(device_t dev) if (status != AE_NOT_FOUND) { device_printf(dev, "could not evaluate _BBN - %s\n", AcpiFormatException(status)); - return_VALUE (ENXIO); + return (ENXIO); } else { /* If it's not found, assume 0. */ sc->ap_bus = 0; |