]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Mar 2022 11:04:18 +0000 (12:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Mar 2022 11:04:18 +0000 (12:04 +0100)
added patches:
acpi-battery-add-device-hid-and-quirk-for-microsoft-surface-go-3.patch
acpi-video-force-backlight-native-for-clevo-nl5xru-and-nl5xnu.patch
acpi-x86-work-around-broken-xsdt-on-advantech-dac-bj01-board.patch

queue-4.9/acpi-battery-add-device-hid-and-quirk-for-microsoft-surface-go-3.patch [new file with mode: 0644]
queue-4.9/acpi-video-force-backlight-native-for-clevo-nl5xru-and-nl5xnu.patch [new file with mode: 0644]
queue-4.9/acpi-x86-work-around-broken-xsdt-on-advantech-dac-bj01-board.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/acpi-battery-add-device-hid-and-quirk-for-microsoft-surface-go-3.patch b/queue-4.9/acpi-battery-add-device-hid-and-quirk-for-microsoft-surface-go-3.patch
new file mode 100644 (file)
index 0000000..a2c79b6
--- /dev/null
@@ -0,0 +1,53 @@
+From 7dacee0b9efc8bd061f097b1a8d4daa6591af0c6 Mon Sep 17 00:00:00 2001
+From: Maximilian Luz <luzmaximilian@gmail.com>
+Date: Sun, 13 Feb 2022 16:49:20 +0100
+Subject: ACPI: battery: Add device HID and quirk for Microsoft Surface Go 3
+
+From: Maximilian Luz <luzmaximilian@gmail.com>
+
+commit 7dacee0b9efc8bd061f097b1a8d4daa6591af0c6 upstream.
+
+For some reason, the Microsoft Surface Go 3 uses the standard ACPI
+interface for battery information, but does not use the standard PNP0C0A
+HID. Instead it uses MSHW0146 as identifier. Add that ID to the driver
+as this seems to work well.
+
+Additionally, the power state is not updated immediately after the AC
+has been (un-)plugged, so add the respective quirk for that.
+
+Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
+Cc: All applicable <stable@vger.kernel.org>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/acpi/battery.c |   12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- a/drivers/acpi/battery.c
++++ b/drivers/acpi/battery.c
+@@ -88,6 +88,10 @@ enum acpi_battery_files {
+ static const struct acpi_device_id battery_device_ids[] = {
+       {"PNP0C0A", 0},
++
++      /* Microsoft Surface Go 3 */
++      {"MSHW0146", 0},
++
+       {"", 0},
+ };
+@@ -1153,6 +1157,14 @@ static const struct dmi_system_id bat_dm
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Aspire V5-573G"),
+               },
+       },
++      {
++              /* Microsoft Surface Go 3 */
++              .callback = battery_notification_delay_quirk,
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
++                      DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"),
++              },
++      },
+       {},
+ };
diff --git a/queue-4.9/acpi-video-force-backlight-native-for-clevo-nl5xru-and-nl5xnu.patch b/queue-4.9/acpi-video-force-backlight-native-for-clevo-nl5xru-and-nl5xnu.patch
new file mode 100644 (file)
index 0000000..b24c36a
--- /dev/null
@@ -0,0 +1,110 @@
+From c844d22fe0c0b37dc809adbdde6ceb6462c43acf Mon Sep 17 00:00:00 2001
+From: Werner Sembach <wse@tuxedocomputers.com>
+Date: Tue, 15 Mar 2022 20:02:28 +0100
+Subject: ACPI: video: Force backlight native for Clevo NL5xRU and NL5xNU
+
+From: Werner Sembach <wse@tuxedocomputers.com>
+
+commit c844d22fe0c0b37dc809adbdde6ceb6462c43acf upstream.
+
+Clevo NL5xRU and NL5xNU/TUXEDO Aura 15 Gen1 and Gen2 have both a working
+native and video interface. However the default detection mechanism first
+registers the video interface before unregistering it again and switching
+to the native interface during boot. This results in a dangling SBIOS
+request for backlight change for some reason, causing the backlight to
+switch to ~2% once per boot on the first power cord connect or disconnect
+event. Setting the native interface explicitly circumvents this buggy
+behaviour by avoiding the unregistering process.
+
+Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
+Cc: All applicable <stable@vger.kernel.org>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/acpi/video_detect.c |   75 ++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 75 insertions(+)
+
+--- a/drivers/acpi/video_detect.c
++++ b/drivers/acpi/video_detect.c
+@@ -135,6 +135,81 @@ static const struct dmi_system_id video_
+               DMI_MATCH(DMI_PRODUCT_NAME, "UL30A"),
+               },
+       },
++      /*
++       * Clevo NL5xRU and NL5xNU/TUXEDO Aura 15 Gen1 and Gen2 have both a
++       * working native and video interface. However the default detection
++       * mechanism first registers the video interface before unregistering
++       * it again and switching to the native interface during boot. This
++       * results in a dangling SBIOS request for backlight change for some
++       * reason, causing the backlight to switch to ~2% once per boot on the
++       * first power cord connect or disconnect event. Setting the native
++       * interface explicitly circumvents this buggy behaviour, by avoiding
++       * the unregistering process.
++       */
++      {
++      .callback = video_detect_force_native,
++      .ident = "Clevo NL5xRU",
++      .matches = {
++              DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
++              DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"),
++              },
++      },
++      {
++      .callback = video_detect_force_native,
++      .ident = "Clevo NL5xRU",
++      .matches = {
++              DMI_MATCH(DMI_SYS_VENDOR, "SchenkerTechnologiesGmbH"),
++              DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"),
++              },
++      },
++      {
++      .callback = video_detect_force_native,
++      .ident = "Clevo NL5xRU",
++      .matches = {
++              DMI_MATCH(DMI_SYS_VENDOR, "Notebook"),
++              DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"),
++              },
++      },
++      {
++      .callback = video_detect_force_native,
++      .ident = "Clevo NL5xRU",
++      .matches = {
++              DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
++              DMI_MATCH(DMI_BOARD_NAME, "AURA1501"),
++              },
++      },
++      {
++      .callback = video_detect_force_native,
++      .ident = "Clevo NL5xRU",
++      .matches = {
++              DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
++              DMI_MATCH(DMI_BOARD_NAME, "EDUBOOK1502"),
++              },
++      },
++      {
++      .callback = video_detect_force_native,
++      .ident = "Clevo NL5xNU",
++      .matches = {
++              DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
++              DMI_MATCH(DMI_BOARD_NAME, "NL5xNU"),
++              },
++      },
++      {
++      .callback = video_detect_force_native,
++      .ident = "Clevo NL5xNU",
++      .matches = {
++              DMI_MATCH(DMI_SYS_VENDOR, "SchenkerTechnologiesGmbH"),
++              DMI_MATCH(DMI_BOARD_NAME, "NL5xNU"),
++              },
++      },
++      {
++      .callback = video_detect_force_native,
++      .ident = "Clevo NL5xNU",
++      .matches = {
++              DMI_MATCH(DMI_SYS_VENDOR, "Notebook"),
++              DMI_MATCH(DMI_BOARD_NAME, "NL5xNU"),
++              },
++      },
+       /*
+        * These models have a working acpi_video backlight control, and using
diff --git a/queue-4.9/acpi-x86-work-around-broken-xsdt-on-advantech-dac-bj01-board.patch b/queue-4.9/acpi-x86-work-around-broken-xsdt-on-advantech-dac-bj01-board.patch
new file mode 100644 (file)
index 0000000..841edd4
--- /dev/null
@@ -0,0 +1,75 @@
+From e702196bf85778f2c5527ca47f33ef2e2fca8297 Mon Sep 17 00:00:00 2001
+From: Mark Cilissen <mark@yotsuba.nl>
+Date: Mon, 7 Mar 2022 04:16:58 +0100
+Subject: ACPI / x86: Work around broken XSDT on Advantech DAC-BJ01 board
+
+From: Mark Cilissen <mark@yotsuba.nl>
+
+commit e702196bf85778f2c5527ca47f33ef2e2fca8297 upstream.
+
+On this board the ACPI RSDP structure points to both a RSDT and an XSDT,
+but the XSDT points to a truncated FADT. This causes all sorts of trouble
+and usually a complete failure to boot after the following error occurs:
+
+  ACPI Error: Unsupported address space: 0x20 (*/hwregs-*)
+  ACPI Error: AE_SUPPORT, Unable to initialize fixed events (*/evevent-*)
+  ACPI: Unable to start ACPI Interpreter
+
+This leaves the ACPI implementation in such a broken state that subsequent
+kernel subsystem initialisations go wrong, resulting in among others
+mismapped PCI memory, SATA and USB enumeration failures, and freezes.
+
+As this is an older embedded platform that will likely never see any BIOS
+updates to address this issue and its default shipping OS only complies to
+ACPI 1.0, work around this by forcing `acpi=rsdt`. This patch, applied on
+top of Linux 5.10.102, was confirmed on real hardware to fix the issue.
+
+Signed-off-by: Mark Cilissen <mark@yotsuba.nl>
+Cc: All applicable <stable@vger.kernel.org>
+Reviewed-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>
+---
+ arch/x86/kernel/acpi/boot.c |   24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+--- a/arch/x86/kernel/acpi/boot.c
++++ b/arch/x86/kernel/acpi/boot.c
+@@ -1324,6 +1324,17 @@ static int __init disable_acpi_pci(const
+       return 0;
+ }
++static int __init disable_acpi_xsdt(const struct dmi_system_id *d)
++{
++      if (!acpi_force) {
++              pr_notice("%s detected: force use of acpi=rsdt\n", d->ident);
++              acpi_gbl_do_not_use_xsdt = TRUE;
++      } else {
++              pr_notice("Warning: DMI blacklist says broken, but acpi XSDT forced\n");
++      }
++      return 0;
++}
++
+ static int __init dmi_disable_acpi(const struct dmi_system_id *d)
+ {
+       if (!acpi_force) {
+@@ -1444,6 +1455,19 @@ static struct dmi_system_id __initdata a
+                    DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
+                    },
+        },
++      /*
++       * Boxes that need ACPI XSDT use disabled due to corrupted tables
++       */
++      {
++       .callback = disable_acpi_xsdt,
++       .ident = "Advantech DAC-BJ01",
++       .matches = {
++                   DMI_MATCH(DMI_SYS_VENDOR, "NEC"),
++                   DMI_MATCH(DMI_PRODUCT_NAME, "Bearlake CRB Board"),
++                   DMI_MATCH(DMI_BIOS_VERSION, "V1.12"),
++                   DMI_MATCH(DMI_BIOS_DATE, "02/01/2011"),
++                   },
++       },
+       {}
+ };
index bc36ec35be54e390e74f41daeeaeb21d19a4f700..8bf40bddbb07b6db899ce0cfa70d0a88e4d4d392 100644 (file)
@@ -7,3 +7,6 @@ alsa-usb-audio-add-mute-tlv-for-playback-volumes-on-rode-nt-usb.patch
 alsa-cmipci-restore-aux-vol-on-suspend-resume.patch
 alsa-pci-fix-reading-of-swapped-values-from-pcmreg-in-ac97-codec.patch
 netfilter-nf_tables-initialize-registers-in-nft_do_chain.patch
+acpi-x86-work-around-broken-xsdt-on-advantech-dac-bj01-board.patch
+acpi-battery-add-device-hid-and-quirk-for-microsoft-surface-go-3.patch
+acpi-video-force-backlight-native-for-clevo-nl5xru-and-nl5xnu.patch