diff options
Diffstat (limited to 'sys/dev/acpica/acpi.c')
-rw-r--r-- | sys/dev/acpica/acpi.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index c0f17f6..500a072 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -1673,38 +1673,36 @@ acpi_probe_child(ACPI_HANDLE handle, UINT32 level, void *context, void **status) ACPI_OBJECT_TYPE type; ACPI_HANDLE h; device_t bus, child; + char *handle_str; int order; - char *handle_str, **search; - static char *scopes[] = {"\\_PR_", "\\_TZ_", "\\_SI_", "\\_SB_", NULL}; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + if (acpi_disabled("children")) + return_ACPI_STATUS (AE_OK); + /* Skip this device if we think we'll have trouble with it. */ if (acpi_avoid(handle)) return_ACPI_STATUS (AE_OK); bus = (device_t)context; if (ACPI_SUCCESS(AcpiGetType(handle, &type))) { + handle_str = acpi_name(handle); switch (type) { case ACPI_TYPE_DEVICE: - case ACPI_TYPE_PROCESSOR: - case ACPI_TYPE_THERMAL: - case ACPI_TYPE_POWER: - if (acpi_disabled("children")) - break; - /* * Since we scan from \, be sure to skip system scope objects. - * At least \_SB and \_TZ are detected as devices (ACPI-CA bug?) + * \_SB_ and \_TZ_ are defined in ACPICA as devices to work around + * BIOS bugs. For example, \_SB_ is to allow \_SB._INI to be run + * during the intialization and \_TZ_ is to support Notify() on it. */ - handle_str = acpi_name(handle); - for (search = scopes; *search != NULL; search++) { - if (strcmp(handle_str, *search) == 0) - break; - } - if (*search != NULL) + if (strcmp(handle_str, "\\_SB_") == 0 || + strcmp(handle_str, "\\_TZ_") == 0) break; - + /* FALLTHROUGH */ + case ACPI_TYPE_PROCESSOR: + case ACPI_TYPE_THERMAL: + case ACPI_TYPE_POWER: /* * Create a placeholder device for this node. Sort the * placeholder so that the probe/attach passes will run |