Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1620423
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.10 026/110] ACPI / scan: Prefer devices without _HID for _ADR matching |
| Date | 2017-04-10 19:20 +0200 |
| Message-ID | <tuL8T-3IQ-41@gated-at.bofh.it> (permalink) |
| References | <tuKPv-3hW-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> commit fdad4e7a876a2cb3d2c1f04e5418c324e79fffef upstream. Commit c2a6bbaf0c5f (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: c2a6bbaf0c5f (ACPI / scan: Prefer devices without _HID/_CID for _ADR matching) Link: https://bugzilla.kernel.org/show_bug.cgi?id=194889 Reported-and-tested-by: Mike <mike@mikewilson.me.uk> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- drivers/acpi/glue.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c @@ -99,13 +99,13 @@ static int find_child_checks(struct acpi return -ENODEV; /* - * If the device has a _HID (or _CID) returning a valid ACPI/PNP - * device ID, it is better to make it look less attractive here, so that - * the other device with the same _ADR value (that may not have a valid - * device ID) can be matched going forward. [This means a second spec - * violation in a row, so whatever we do here is best effort anyway.] + * If the device has a _HID returning a valid ACPI/PNP device ID, it is + * better to make it look less attractive here, so that the other device + * with the same _ADR value (that may not have a valid device ID) can be + * matched going forward. [This means a second spec violation in a row, + * so whatever we do here is best effort anyway.] */ - return sta_present && list_empty(&adev->pnp.ids) ? + return sta_present && !adev->pnp.type.platform_id ? FIND_CHILD_MAX_SCORE : FIND_CHILD_MIN_SCORE; }
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.10 000/110] 4.10.10-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-10 19:20 +0200
[PATCH 4.10 026/110] ACPI / scan: Prefer devices without _HID for _ADR matching Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-10 19:20 +0200
[PATCH 4.10 011/110] arm/arm64: KVM: Take mmap_sem in stage2_unmap_vm Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-10 19:20 +0200
[PATCH 4.10 039/110] metag/usercopy: Fix src fixup in from user rapf loops Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-10 19:20 +0200
[PATCH 4.10 020/110] mm/page_alloc.c: fix print order in show_free_areas() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-10 19:20 +0200
[PATCH 4.10 001/110] drm/vmwgfx: Type-check lookups of fence objects Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-10 19:20 +0200
[PATCH 4.10 022/110] dax: fix radix tree insertion race Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-10 19:20 +0200
[PATCH 4.10 028/110] jump label: fix passing kbuild_cflags when checking for asm goto support Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-10 19:20 +0200
[PATCH 4.10 032/110] mac80211: unconditionally start new netdev queues with iTXQ support Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-10 19:20 +0200
[PATCH 4.10 024/110] dm verity fec: fix bufio leaks Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-10 19:20 +0200
[PATCH 4.10 031/110] ring-buffer: Fix return value check in test_ringbuffer() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-10 19:20 +0200
[PATCH 4.10 014/110] iio: core: Fix IIO_VAL_FRACTIONAL_LOG2 for negative values Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-10 19:20 +0200
[PATCH 4.10 033/110] brcmfmac: use local iftype avoiding use-after-free of virtual interface Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-10 19:20 +0200
Re: [PATCH 4.10 000/110] 4.10.10-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-04-10 22:40 +0200
Re: [PATCH 4.10 000/110] 4.10.10-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-11 07:00 +0200
Re: [PATCH 4.10 000/110] 4.10.10-stable review Guenter Roeck <linux@roeck-us.net> - 2017-04-11 05:20 +0200
Re: [PATCH 4.10 000/110] 4.10.10-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-11 06:50 +0200
Re: [PATCH 4.10 000/110] 4.10.10-stable review Guenter Roeck <linux@roeck-us.net> - 2017-04-11 07:10 +0200
Re: [PATCH 4.10 000/110] 4.10.10-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-11 07:10 +0200
csiph-web