_STA 主要用于判断当前设备是否存在

来源:互联网 发布:帝国cms采集插件下载 编辑:程序博客网 时间:2024/06/16 14:15
在acpi_ns_get_device_callback 中如果匹配到HID或者CID 后会检查当前节点是否有_STA_STA 主要用于判断当前设备是否存在/* Run _STA to determine if device is present */status = acpi_ut_execute_STA(node, &flags);if (ACPI_FAILURE(status)) {return (AE_CTRL_DEPTH);}if (!(flags & ACPI_STA_DEVICE_PRESENT) &&    !(flags & ACPI_STA_DEVICE_FUNCTIONING)) {/* * Don't examine the children of the device only when the * device is neither present nor functional. See ACPI spec, * description of _STA for more information. */return (AE_CTRL_DEPTH);}可见如果从bios查询到的_STA的flag ,没有包含ACPI_STA_DEVICE_PRESENT和ACPI_STA_DEVICE_FUNCTIONING的话,acpi_ns_get_device_callback函数就退出了,不会为这个设备建立设备节点.

原创粉丝点击