diff --git a/sys/dev/acpica/acpi_pcib.c b/sys/dev/acpica/acpi_pcib.c index 1a42d740a3e..c4bded8383c 100644 --- a/sys/dev/acpica/acpi_pcib.c +++ b/sys/dev/acpica/acpi_pcib.c @@ -134,15 +134,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 diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c index 36d9580b9b6..882834df61d 100644 --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -286,6 +286,12 @@ acpi_pcib_acpi_attach(device_t dev) sc->ap_dev = 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;