Index: acpi.c =================================================================== RCS file: /cvs/src/sys/dev/acpi/acpi.c,v retrieving revision 1.419 diff -u -p -r1.419 acpi.c --- acpi.c 10 Feb 2023 14:34:16 -0000 1.419 +++ acpi.c 9 Mar 2023 07:14:05 -0000 @@ -2957,22 +2957,29 @@ acpi_attach_deps(struct acpi_softc *sc, if (aml_evalname(sc, node, "_DEP", 0, NULL, &res)) return; - +printf("%s[%u]\n", __func__, __LINE__); if (res.type != AML_OBJTYPE_PACKAGE) return; - +printf("%s[%u]\n", __func__, __LINE__); for (i = 0; i < res.length; i++) { val = res.v_package[i]; if (val->type == AML_OBJTYPE_OBJREF) val = val->v_objref.ref; +printf("%s[%u] val type %d\n", __func__, __LINE__, val->type); if (val->type != AML_OBJTYPE_DEVICE) continue; +printf("%s[%u]\n", __func__, __LINE__); dep = val->node; - if (dep == NULL || dep->attached) + if (dep == NULL) + continue; +printf("%s[%u] %s wants %s (attached %d)\n", __func__, __LINE__, node->name, dep->name, dep->attached); + if (dep->attached) continue; dep = aml_searchname(dep, "_HID"); - if (dep) + if (dep) { +printf("%s[%u] %s wants %s\n", __func__, __LINE__, node->name, dep->name); acpi_foundhid(dep, sc); + } } aml_freevalue(&res); @@ -3120,17 +3127,17 @@ acpi_foundhid(struct aml_node *node, voi #ifndef SMALL_KERNEL int i; #endif - +printf("%s[%u]\n", __func__, __LINE__); if (acpi_parsehid(node, arg, cdev, dev, sizeof(dev)) != 0) return (0); - +printf("%s[%u] node %s cdev %.32s dev %.32s\n", __func__, __LINE__, node->name, cdev, dev); sta = acpi_getsta(sc, node->parent); if ((sta & (STA_PRESENT | STA_ENABLED)) != (STA_PRESENT | STA_ENABLED)) return (0); - +printf("%s[%u]\n", __func__, __LINE__); if (aml_evalinteger(sc, node->parent, "_CCA", 0, NULL, &cca)) cca = 1; - +printf("%s[%u]\n", __func__, __LINE__); acpi_attach_deps(sc, node->parent); memset(&aaa, 0, sizeof(aaa));