Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2017-08-14 15:37:48 +0200
committerJiri Slaby <jslaby@suse.cz>2017-08-14 15:37:48 +0200
commitc03614818df70be0b8f942a557a86677ecdc7885 (patch)
tree56070bd4e3d5608f6a8d8ba570f7169f0ffed2ee
parent4a4d34ebd1db8cc08bfc9580e8e0d9ebc13d80d0 (diff)
parente23b354e1fa6053cac49678a497ba3fe317c69fd (diff)
Merge branch 'SLE12-SP2' into SLE12-SP3
-rw-r--r--patches.fixes/ACPI-scan-Prefer-devices-without-_HID-for-_ADR-match.patch56
-rw-r--r--series.conf2
2 files changed, 58 insertions, 0 deletions
diff --git a/patches.fixes/ACPI-scan-Prefer-devices-without-_HID-for-_ADR-match.patch b/patches.fixes/ACPI-scan-Prefer-devices-without-_HID-for-_ADR-match.patch
new file mode 100644
index 0000000000..102ab3d670
--- /dev/null
+++ b/patches.fixes/ACPI-scan-Prefer-devices-without-_HID-for-_ADR-match.patch
@@ -0,0 +1,56 @@
+From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+Date: Sat, 1 Apr 2017 00:45:52 +0200
+Subject: ACPI / scan: Prefer devices without _HID for _ADR matching
+Git-commit: fdad4e7a876a2cb3d2c1f04e5418c324e79fffef
+Patch-mainline: v4.11-rc6
+References: git-fixes
+
+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>
+Cc: 4.10+ <stable@vger.kernel.org> # 4.10+
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ 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;
+ }
+
diff --git a/series.conf b/series.conf
index 374a9efc0c..936f933d89 100644
--- a/series.conf
+++ b/series.conf
@@ -3002,6 +3002,8 @@
# bsc#1051478
patches.fixes/acpi-processor-avoid-reserving-io-regions-too-early
+ patches.fixes/ACPI-scan-Prefer-devices-without-_HID-for-_ADR-match.patch
+
########################################################
# CPUFREQ
########################################################