• Rafael J. Wysocki's avatar
    ACPI / scan: Prefer devices without _HID for _ADR matching · fdad4e7a
    Rafael J. Wysocki authored
    Commit c2a6bbaf (ACPI / scan: Prefer devices without _HID/_CID
    for _ADR matching) added a list_empty(&adev->pnp.ids) check to
    find_child_checks() so as to catch situations in which the ACPI
    core attempts to decode _ADR for a device having a _HID too which
    is strictly against the spec.  However, it overlooked the fact that
    the adev->pnp.ids list for the devices taken into account by
    find_child_checks() may contain device IDs set internally by the
    kernel, like "LNXVIDEO" (thanks to Zhang Rui for that realization),
    and it broke the enumeration of those devices as a result.
    
    To unbreak it, replace the overly coarse grained list_empty()
    check with a much more precise check against the pnp.type.platform_id
    flag which is only set for devices having a _HID (that's how it
    should be done from the start, as having both _ADR and _CID is
    actually permitted).
    
    Fixes: c2a6bbaf (ACPI / scan: Prefer devices without _HID/_CID for _ADR matching)
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=194889Reported-and-tested-by: default avatarMike <mike@mikewilson.me.uk>
    Tested-by: default avatarHans de Goede <hdegoede@redhat.com>
    Cc: 4.10+ <stable@vger.kernel.org> # 4.10+
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    fdad4e7a
glue.c 8.96 KB