From b519f9d660f157c68cfb7d0588dfa316f25aa3e1 Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Sat, 15 Sep 2001 04:14:31 +0000 Subject: 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. --- sys/dev/acpica/acpi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sys') diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 3edd3f80d102..e5c1194155e7 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -785,6 +785,16 @@ acpi_probe_child(ACPI_HANDLE handle, UINT32 level, void *context, void **status) break; 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 -- cgit v1.3