• R
    ACPI / scan: Prefer devices without _HID/_CID for _ADR matching · c2a6bbaf
    Rafael J. Wysocki 提交于
    The way acpi_find_child_device() works currently is that, if there
    are two (or more) devices with the same _ADR value in the same
    namespace scope (which is not specifically allowed by the spec and
    the OS behavior in that case is not defined), the first one of them
    found to be present (with the help of _STA) will be returned.
    
    This covers the majority of cases, but is not sufficient if some of
    the devices in question have a _HID (or _CID) returning some valid
    ACPI/PNP device IDs (which is disallowed by the spec) and the
    ASL writers' expectation appears to be that the OS will match
    devices without a valid ACPI/PNP device ID against a given bus
    address first.
    
    To cover this special case as well, modify find_child_checks()
    to prefer devices without ACPI/PNP device IDs over devices that
    have them.
    Suggested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
    Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Tested-by: NHans de Goede <hdegoede@redhat.com>
    c2a6bbaf
glue.c 9.0 KB