]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.13-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Sep 2021 15:26:14 +0000 (17:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Sep 2021 15:26:14 +0000 (17:26 +0200)
added patches:
platform-x86-make-dual_accel_detect-kiox010a-kiox020a-detect-more-robust.patch

queue-5.13/platform-x86-make-dual_accel_detect-kiox010a-kiox020a-detect-more-robust.patch [new file with mode: 0644]
queue-5.13/series

diff --git a/queue-5.13/platform-x86-make-dual_accel_detect-kiox010a-kiox020a-detect-more-robust.patch b/queue-5.13/platform-x86-make-dual_accel_detect-kiox010a-kiox020a-detect-more-robust.patch
new file mode 100644 (file)
index 0000000..fc8b506
--- /dev/null
@@ -0,0 +1,37 @@
+From 085fc31f81765e061c78cdcab0e5516fd672bff7 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Mon, 2 Aug 2021 16:10:00 +0200
+Subject: platform/x86: Make dual_accel_detect() KIOX010A + KIOX020A detect more robust
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit 085fc31f81765e061c78cdcab0e5516fd672bff7 upstream.
+
+360 degree hinges devices with dual KIOX010A + KIOX020A accelerometers
+always have both a KIOX010A and a KIOX020A ACPI device (one for each
+accel).
+
+Theoretical some vendor may re-use some DSDT for a non-convertible
+stripping out just the KIOX020A ACPI device from the DSDT. Check that
+both ACPI devices are present to make the check more robust.
+
+Fixes: 153cca9caa81 ("platform/x86: Add and use a dual_accel_detect() helper")
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://lore.kernel.org/r/20210802141000.978035-1-hdegoede@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/dual_accel_detect.h |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/platform/x86/dual_accel_detect.h
++++ b/drivers/platform/x86/dual_accel_detect.h
+@@ -60,7 +60,8 @@ static bool dual_accel_detect_bosc0200(v
+ static bool dual_accel_detect(void)
+ {
+       /* Systems which use a pair of accels with KIOX010A / KIOX020A ACPI ids */
+-      if (acpi_dev_present("KIOX010A", NULL, -1))
++      if (acpi_dev_present("KIOX010A", NULL, -1) &&
++          acpi_dev_present("KIOX020A", NULL, -1))
+               return true;
+       /* Systems which use a single DUAL250E ACPI device to model 2 accels */
index 46306bb9aeae8f9aab660c769566858487646792..d10d38cb8745d1a2232a7a52658aa6e0acb5dd5e 100644 (file)
@@ -111,3 +111,4 @@ ubifs-report-correct-st_size-for-encrypted-symlinks.patch
 revert-parisc-add-assembly-implementations-for-memset-strlen-strcpy-strncpy-and-strcat.patch
 net-don-t-unconditionally-copy_from_user-a-struct-ifreq-for-socket-ioctls.patch
 audit-move-put_tree-to-avoid-trim_trees-refcount-underflow-and-uaf.patch
+platform-x86-make-dual_accel_detect-kiox010a-kiox020a-detect-more-robust.patch