]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Mar 2018 17:36:02 +0000 (09:36 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Mar 2018 17:36:02 +0000 (09:36 -0800)
added patches:
acpi-bus-parse-tables-as-term_list-for-dell-xps-9570-and-precision-m5530.patch
arm-dts-logicpd-som-lv-fix-i2c1-pinmux.patch
arm-dts-logicpd-torpedo-fix-i2c1-pinmux.patch
md-only-allow-remove_and_add_spares-when-no-sync_thread-running.patch

queue-4.14/acpi-bus-parse-tables-as-term_list-for-dell-xps-9570-and-precision-m5530.patch [new file with mode: 0644]
queue-4.14/arm-dts-logicpd-som-lv-fix-i2c1-pinmux.patch [new file with mode: 0644]
queue-4.14/arm-dts-logicpd-torpedo-fix-i2c1-pinmux.patch [new file with mode: 0644]
queue-4.14/md-only-allow-remove_and_add_spares-when-no-sync_thread-running.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/acpi-bus-parse-tables-as-term_list-for-dell-xps-9570-and-precision-m5530.patch b/queue-4.14/acpi-bus-parse-tables-as-term_list-for-dell-xps-9570-and-precision-m5530.patch
new file mode 100644 (file)
index 0000000..b1f9ee7
--- /dev/null
@@ -0,0 +1,96 @@
+From 36904703aeeeb6cd31993f1353c8325006229f9a Mon Sep 17 00:00:00 2001
+From: Kai Heng Feng <kai.heng.feng@canonical.com>
+Date: Mon, 5 Feb 2018 13:19:24 +0800
+Subject: ACPI / bus: Parse tables as term_list for Dell XPS 9570 and Precision M5530
+
+From: Kai Heng Feng <kai.heng.feng@canonical.com>
+
+commit 36904703aeeeb6cd31993f1353c8325006229f9a upstream.
+
+The i2c touchpad on Dell XPS 9570 and Precision M5530 doesn't work out
+of box.
+
+The touchpad relies on its _INI method to update its _HID value from
+XXXX0000 to SYNA2393.
+
+Also, the _STA relies on value of I2CN to report correct status.
+
+Set acpi_gbl_parse_table_as_term_list so the value of I2CN can be
+correctly set up, and _INI can get run. The ACPI table in this machine
+is designed to get parsed this way.
+
+Also, change the quirk table to a more generic name.
+
+Link: https://bugzilla.kernel.org/show_bug.cgi?id=198515
+Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/bus.c |   38 +++++++++++++++++++++++++++++++-------
+ 1 file changed, 31 insertions(+), 7 deletions(-)
+
+--- a/drivers/acpi/bus.c
++++ b/drivers/acpi/bus.c
+@@ -66,10 +66,37 @@ static int set_copy_dsdt(const struct dm
+       return 0;
+ }
+ #endif
++static int set_gbl_term_list(const struct dmi_system_id *id)
++{
++      acpi_gbl_parse_table_as_term_list = 1;
++      return 0;
++}
+-static const struct dmi_system_id dsdt_dmi_table[] __initconst = {
++static const struct dmi_system_id acpi_quirks_dmi_table[] __initconst = {
++      /*
++       * Touchpad on Dell XPS 9570/Precision M5530 doesn't work under I2C
++       * mode.
++       * https://bugzilla.kernel.org/show_bug.cgi?id=198515
++       */
++      {
++              .callback = set_gbl_term_list,
++              .ident = "Dell Precision M5530",
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
++                      DMI_MATCH(DMI_PRODUCT_NAME, "Precision M5530"),
++              },
++      },
++      {
++              .callback = set_gbl_term_list,
++              .ident = "Dell XPS 15 9570",
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
++                      DMI_MATCH(DMI_PRODUCT_NAME, "XPS 15 9570"),
++              },
++      },
+       /*
+        * Invoke DSDT corruption work-around on all Toshiba Satellite.
++       * DSDT will be copied to memory.
+        * https://bugzilla.kernel.org/show_bug.cgi?id=14679
+        */
+       {
+@@ -83,7 +110,7 @@ static const struct dmi_system_id dsdt_d
+       {}
+ };
+ #else
+-static const struct dmi_system_id dsdt_dmi_table[] __initconst = {
++static const struct dmi_system_id acpi_quirks_dmi_table[] __initconst = {
+       {}
+ };
+ #endif
+@@ -1001,11 +1028,8 @@ void __init acpi_early_init(void)
+       acpi_permanent_mmap = true;
+-      /*
+-       * If the machine falls into the DMI check table,
+-       * DSDT will be copied to memory
+-       */
+-      dmi_check_system(dsdt_dmi_table);
++      /* Check machine-specific quirks */
++      dmi_check_system(acpi_quirks_dmi_table);
+       status = acpi_reallocate_root_table();
+       if (ACPI_FAILURE(status)) {
diff --git a/queue-4.14/arm-dts-logicpd-som-lv-fix-i2c1-pinmux.patch b/queue-4.14/arm-dts-logicpd-som-lv-fix-i2c1-pinmux.patch
new file mode 100644 (file)
index 0000000..bff18d2
--- /dev/null
@@ -0,0 +1,52 @@
+From 84c7efd607e7fb6933920322086db64654f669b2 Mon Sep 17 00:00:00 2001
+From: Adam Ford <aford173@gmail.com>
+Date: Sat, 27 Jan 2018 15:27:05 -0600
+Subject: ARM: dts: LogicPD SOM-LV: Fix I2C1 pinmux
+
+From: Adam Ford <aford173@gmail.com>
+
+commit 84c7efd607e7fb6933920322086db64654f669b2 upstream.
+
+The pinmuxing was missing for I2C1 which was causing intermittent issues
+with the PMIC which is connected to I2C1.  The bootloader did not quite
+configure the I2C1 either, so when running at 2.6MHz, it was generating
+errors at times.
+
+This correctly sets the I2C1 pinmuxing so it can operate at 2.6MHz
+
+Fixes: ab8dd3aed011 ("ARM: DTS: Add minimal Support for Logic PD DM3730
+SOM-LV")
+
+Signed-off-by: Adam Ford <aford173@gmail.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/logicpd-som-lv.dtsi |    9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/logicpd-som-lv.dtsi
++++ b/arch/arm/boot/dts/logicpd-som-lv.dtsi
+@@ -97,6 +97,8 @@
+ };
+ &i2c1 {
++      pinctrl-names = "default";
++      pinctrl-0 = <&i2c1_pins>;
+       clock-frequency = <2600000>;
+       twl: twl@48 {
+@@ -215,7 +217,12 @@
+               >;
+       };
+-
++      i2c1_pins: pinmux_i2c1_pins {
++              pinctrl-single,pins = <
++                      OMAP3_CORE1_IOPAD(0x21ba, PIN_INPUT | MUX_MODE0)        /* i2c1_scl.i2c1_scl */
++                      OMAP3_CORE1_IOPAD(0x21bc, PIN_INPUT | MUX_MODE0)        /* i2c1_sda.i2c1_sda */
++              >;
++      };
+ };
+ &omap3_pmx_wkup {
diff --git a/queue-4.14/arm-dts-logicpd-torpedo-fix-i2c1-pinmux.patch b/queue-4.14/arm-dts-logicpd-torpedo-fix-i2c1-pinmux.patch
new file mode 100644 (file)
index 0000000..f670bad
--- /dev/null
@@ -0,0 +1,51 @@
+From 74402055a2d3ec998a1ded599e86185a27d9bbf4 Mon Sep 17 00:00:00 2001
+From: Adam Ford <aford173@gmail.com>
+Date: Thu, 25 Jan 2018 14:10:37 -0600
+Subject: ARM: dts: LogicPD Torpedo: Fix I2C1 pinmux
+
+From: Adam Ford <aford173@gmail.com>
+
+commit 74402055a2d3ec998a1ded599e86185a27d9bbf4 upstream.
+
+The pinmuxing was missing for I2C1 which was causing intermittent issues
+with the PMIC which is connected to I2C1.  The bootloader did not quite
+configure the I2C1 either, so when running at 2.6MHz, it was generating
+errors at time.
+
+This correctly sets the I2C1 pinmuxing so it can operate at 2.6MHz
+
+Fixes: 687c27676151 ("ARM: dts: Add minimal support for LogicPD Torpedo
+DM3730 devkit")
+
+Signed-off-by: Adam Ford <aford173@gmail.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/logicpd-torpedo-som.dtsi |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/arch/arm/boot/dts/logicpd-torpedo-som.dtsi
++++ b/arch/arm/boot/dts/logicpd-torpedo-som.dtsi
+@@ -104,6 +104,8 @@
+ };
+ &i2c1 {
++      pinctrl-names = "default";
++      pinctrl-0 = <&i2c1_pins>;
+       clock-frequency = <2600000>;
+       twl: twl@48 {
+@@ -211,6 +213,12 @@
+                       OMAP3_CORE1_IOPAD(0x21b8, PIN_INPUT | MUX_MODE0)        /* hsusb0_data7.hsusb0_data7 */
+               >;
+       };
++      i2c1_pins: pinmux_i2c1_pins {
++              pinctrl-single,pins = <
++                      OMAP3_CORE1_IOPAD(0x21ba, PIN_INPUT | MUX_MODE0)        /* i2c1_scl.i2c1_scl */
++                      OMAP3_CORE1_IOPAD(0x21bc, PIN_INPUT | MUX_MODE0)        /* i2c1_sda.i2c1_sda */
++              >;
++      };
+ };
+ &uart2 {
diff --git a/queue-4.14/md-only-allow-remove_and_add_spares-when-no-sync_thread-running.patch b/queue-4.14/md-only-allow-remove_and_add_spares-when-no-sync_thread-running.patch
new file mode 100644 (file)
index 0000000..0548b0f
--- /dev/null
@@ -0,0 +1,60 @@
+From 39772f0a7be3b3dc26c74ea13fe7847fd1522c8b Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.com>
+Date: Sat, 3 Feb 2018 09:19:30 +1100
+Subject: md: only allow remove_and_add_spares when no sync_thread running.
+
+From: NeilBrown <neilb@suse.com>
+
+commit 39772f0a7be3b3dc26c74ea13fe7847fd1522c8b upstream.
+
+The locking protocols in md assume that a device will
+never be removed from an array during resync/recovery/reshape.
+When that isn't happening, rcu or reconfig_mutex is needed
+to protect an rdev pointer while taking a refcount.  When
+it is happening, that protection isn't needed.
+
+Unfortunately there are cases were remove_and_add_spares() is
+called when recovery might be happening: is state_store(),
+slot_store() and hot_remove_disk().
+In each case, this is just an optimization, to try to expedite
+removal from the personality so the device can be removed from
+the array.  If resync etc is happening, we just have to wait
+for md_check_recover to find a suitable time to call
+remove_and_add_spares().
+
+This optimization and not essential so it doesn't
+matter if it fails.
+So change remove_and_add_spares() to abort early if
+resync/recovery/reshape is happening, unless it is called
+from md_check_recovery() as part of a newly started recovery.
+The parameter "this" is only NULL when called from
+md_check_recovery() so when it is NULL, there is no need to abort.
+
+As this can result in a NULL dereference, the fix is suitable
+for -stable.
+
+cc: yuyufen <yuyufen@huawei.com>
+Cc: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
+Fixes: 8430e7e0af9a ("md: disconnect device from personality before trying to remove it.")
+Cc: stable@ver.kernel.org (v4.8+)
+Signed-off-by: NeilBrown <neilb@suse.com>
+Signed-off-by: Shaohua Li <sh.li@alibaba-inc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/md.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/md/md.c
++++ b/drivers/md/md.c
+@@ -8522,6 +8522,10 @@ static int remove_and_add_spares(struct
+       int removed = 0;
+       bool remove_some = false;
++      if (this && test_bit(MD_RECOVERY_RUNNING, &mddev->recovery))
++              /* Mustn't remove devices when resync thread is running */
++              return 0;
++
+       rdev_for_each(rdev, mddev) {
+               if ((this == NULL || rdev == this) &&
+                   rdev->raid_disk >= 0 &&
index 270d5d55ca23872259964131ae6446281aa69c8d..7c2250101b5a373b0ab6d5a39b2c1b3279ff0a69 100644 (file)
@@ -103,3 +103,7 @@ kvm-x86-fix-vcpu-initialization-with-userspace-lapic.patch
 pci-aspm-deal-with-missing-root-ports-in-link-state-handling.patch
 kvm-x86-fix-wrong-macro-references-of-x86_cr0_pg_bit-and-x86_cr4_pae_bit-in-kvm_valid_sregs.patch
 kvm-x86-remove-warn_on-for-when-vm_munmap-fails.patch
+acpi-bus-parse-tables-as-term_list-for-dell-xps-9570-and-precision-m5530.patch
+arm-dts-logicpd-som-lv-fix-i2c1-pinmux.patch
+arm-dts-logicpd-torpedo-fix-i2c1-pinmux.patch
+md-only-allow-remove_and_add_spares-when-no-sync_thread-running.patch