summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2001-09-15 04:14:31 +0000
committermsmith <msmith@FreeBSD.org>2001-09-15 04:14:31 +0000
commit1815e2ca4a9e9a52f9124b054f65639bd26195dc (patch)
treec97c02600d9c152e6af7b0b486e743647946121e /sys/dev/acpica/acpi.c
parent7454909fa17bd7195415085ff8b55650ebb1cf64 (diff)
downloadFreeBSD-src-1815e2ca4a9e9a52f9124b054f65639bd26195dc.zip
FreeBSD-src-1815e2ca4a9e9a52f9124b054f65639bd26195dc.tar.gz
Disable devices that are not present; at a later stage we can then enable
them if the device arrives. This should solve the problem where devices that have been disabled eg. in the BIOS show up with nonsense resources and hang the bootstrap process.
Diffstat (limited to 'sys/dev/acpica/acpi.c')
-rw-r--r--sys/dev/acpica/acpi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 3edd3f8..e5c1194 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -786,6 +786,16 @@ acpi_probe_child(ACPI_HANDLE handle, UINT32 level, void *context, void **status)
acpi_set_handle(child, handle);
/*
+ * Check that the device is present. If it's not present,
+ * leave it disabled (so that we have a device_t attached to
+ * the handle, but we don't probe it).
+ */
+ if (!acpi_DeviceIsPresent(child)) {
+ device_disable(child);
+ break;
+ }
+
+ /*
* Get the device's resource settings and attach them.
* Note that if the device has _PRS but no _CRS, we need
* to decide when it's appropriate to try to configure the
OpenPOWER on IntegriCloud