]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Feb 2023 11:48:31 +0000 (12:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Feb 2023 11:48:31 +0000 (12:48 +0100)
added patches:
arm64-dts-meson-axg-make-mmc-host-controller-interrupts-level-sensitive.patch
arm64-dts-meson-gx-make-mmc-host-controller-interrupts-level-sensitive.patch
riscv-fixup-race-condition-on-pg_dcache_clean-in-flush_icache_pte.patch
usb-core-add-quirk-for-alcor-link-ak9563-smartcard-reader.patch
usb-typec-altmodes-displayport-fix-probe-pin-assign-check.patch

queue-4.19/arm64-dts-meson-axg-make-mmc-host-controller-interrupts-level-sensitive.patch [new file with mode: 0644]
queue-4.19/arm64-dts-meson-gx-make-mmc-host-controller-interrupts-level-sensitive.patch [new file with mode: 0644]
queue-4.19/riscv-fixup-race-condition-on-pg_dcache_clean-in-flush_icache_pte.patch [new file with mode: 0644]
queue-4.19/series
queue-4.19/usb-core-add-quirk-for-alcor-link-ak9563-smartcard-reader.patch [new file with mode: 0644]
queue-4.19/usb-typec-altmodes-displayport-fix-probe-pin-assign-check.patch [new file with mode: 0644]

diff --git a/queue-4.19/arm64-dts-meson-axg-make-mmc-host-controller-interrupts-level-sensitive.patch b/queue-4.19/arm64-dts-meson-axg-make-mmc-host-controller-interrupts-level-sensitive.patch
new file mode 100644 (file)
index 0000000..0df19b1
--- /dev/null
@@ -0,0 +1,51 @@
+From d182bcf300772d8b2e5f43e47fa0ebda2b767cc4 Mon Sep 17 00:00:00 2001
+From: Heiner Kallweit <hkallweit1@gmail.com>
+Date: Thu, 9 Feb 2023 21:10:31 +0100
+Subject: arm64: dts: meson-axg: Make mmc host controller interrupts level-sensitive
+
+From: Heiner Kallweit <hkallweit1@gmail.com>
+
+commit d182bcf300772d8b2e5f43e47fa0ebda2b767cc4 upstream.
+
+The usage of edge-triggered interrupts lead to lost interrupts under load,
+see [0]. This was confirmed to be fixed by using level-triggered
+interrupts.
+The report was about SDIO. However, as the host controller is the same
+for SD and MMC, apply the change to all mmc controller instances.
+
+[0] https://www.spinics.net/lists/linux-mmc/msg73991.html
+
+Fixes: 221cf34bac54 ("ARM64: dts: meson-axg: enable the eMMC controller")
+Reported-by: Peter Suti <peter.suti@streamunlimited.com>
+Tested-by: Vyacheslav Bocharov <adeep@lexina.in>
+Tested-by: Peter Suti <peter.suti@streamunlimited.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
+Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
+Link: https://lore.kernel.org/r/c00655d3-02f8-6f5f-4239-ca2412420cad@gmail.com
+Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/boot/dts/amlogic/meson-axg.dtsi |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
++++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+@@ -167,7 +167,7 @@
+                       sd_emmc_b: sd@5000 {
+                               compatible = "amlogic,meson-axg-mmc";
+                               reg = <0x0 0x5000 0x0 0x800>;
+-                              interrupts = <GIC_SPI 217 IRQ_TYPE_EDGE_RISING>;
++                              interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>;
+                               status = "disabled";
+                               clocks = <&clkc CLKID_SD_EMMC_B>,
+                                       <&clkc CLKID_SD_EMMC_B_CLK0>,
+@@ -179,7 +179,7 @@
+                       sd_emmc_c: mmc@7000 {
+                               compatible = "amlogic,meson-axg-mmc";
+                               reg = <0x0 0x7000 0x0 0x800>;
+-                              interrupts = <GIC_SPI 218 IRQ_TYPE_EDGE_RISING>;
++                              interrupts = <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>;
+                               status = "disabled";
+                               clocks = <&clkc CLKID_SD_EMMC_C>,
+                                       <&clkc CLKID_SD_EMMC_C_CLK0>,
diff --git a/queue-4.19/arm64-dts-meson-gx-make-mmc-host-controller-interrupts-level-sensitive.patch b/queue-4.19/arm64-dts-meson-gx-make-mmc-host-controller-interrupts-level-sensitive.patch
new file mode 100644 (file)
index 0000000..ab2ad59
--- /dev/null
@@ -0,0 +1,55 @@
+From 66e45351f7d6798751f98001d1fcd572024d87f0 Mon Sep 17 00:00:00 2001
+From: Heiner Kallweit <hkallweit1@gmail.com>
+Date: Thu, 9 Feb 2023 21:11:47 +0100
+Subject: arm64: dts: meson-gx: Make mmc host controller interrupts level-sensitive
+
+From: Heiner Kallweit <hkallweit1@gmail.com>
+
+commit 66e45351f7d6798751f98001d1fcd572024d87f0 upstream.
+
+The usage of edge-triggered interrupts lead to lost interrupts under load,
+see [0]. This was confirmed to be fixed by using level-triggered
+interrupts.
+The report was about SDIO. However, as the host controller is the same
+for SD and MMC, apply the change to all mmc controller instances.
+
+[0] https://www.spinics.net/lists/linux-mmc/msg73991.html
+
+Fixes: ef8d2ffedf18 ("ARM64: dts: meson-gxbb: add MMC support")
+Cc: stable@vger.kernel.org
+Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
+Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
+Link: https://lore.kernel.org/r/76e042e0-a610-5ed5-209f-c4d7f879df44@gmail.com
+Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/boot/dts/amlogic/meson-gx.dtsi |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
++++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+@@ -470,21 +470,21 @@
+                       sd_emmc_a: mmc@70000 {
+                               compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc";
+                               reg = <0x0 0x70000 0x0 0x800>;
+-                              interrupts = <GIC_SPI 216 IRQ_TYPE_EDGE_RISING>;
++                              interrupts = <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>;
+                               status = "disabled";
+                       };
+                       sd_emmc_b: mmc@72000 {
+                               compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc";
+                               reg = <0x0 0x72000 0x0 0x800>;
+-                              interrupts = <GIC_SPI 217 IRQ_TYPE_EDGE_RISING>;
++                              interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>;
+                               status = "disabled";
+                       };
+                       sd_emmc_c: mmc@74000 {
+                               compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc";
+                               reg = <0x0 0x74000 0x0 0x800>;
+-                              interrupts = <GIC_SPI 218 IRQ_TYPE_EDGE_RISING>;
++                              interrupts = <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>;
+                               status = "disabled";
+                       };
+               };
diff --git a/queue-4.19/riscv-fixup-race-condition-on-pg_dcache_clean-in-flush_icache_pte.patch b/queue-4.19/riscv-fixup-race-condition-on-pg_dcache_clean-in-flush_icache_pte.patch
new file mode 100644 (file)
index 0000000..4ad1536
--- /dev/null
@@ -0,0 +1,41 @@
+From 950b879b7f0251317d26bae0687e72592d607532 Mon Sep 17 00:00:00 2001
+From: Guo Ren <guoren@linux.alibaba.com>
+Date: Thu, 26 Jan 2023 22:53:06 -0500
+Subject: riscv: Fixup race condition on PG_dcache_clean in flush_icache_pte
+
+From: Guo Ren <guoren@linux.alibaba.com>
+
+commit 950b879b7f0251317d26bae0687e72592d607532 upstream.
+
+In commit 588a513d3425 ("arm64: Fix race condition on PG_dcache_clean
+in __sync_icache_dcache()"), we found RISC-V has the same issue as the
+previous arm64. The previous implementation didn't guarantee the correct
+sequence of operations, which means flush_icache_all() hasn't been
+called when the PG_dcache_clean was set. That would cause a risk of page
+synchronization.
+
+Fixes: 08f051eda33b ("RISC-V: Flush I$ when making a dirty page executable")
+Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
+Signed-off-by: Guo Ren <guoren@kernel.org>
+Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
+Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
+Link: https://lore.kernel.org/r/20230127035306.1819561-1-guoren@kernel.org
+Cc: stable@vger.kernel.org
+Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/riscv/mm/cacheflush.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/arch/riscv/mm/cacheflush.c
++++ b/arch/riscv/mm/cacheflush.c
+@@ -18,6 +18,8 @@ void flush_icache_pte(pte_t pte)
+ {
+       struct page *page = pte_page(pte);
+-      if (!test_and_set_bit(PG_dcache_clean, &page->flags))
++      if (!test_bit(PG_dcache_clean, &page->flags)) {
+               flush_icache_all();
++              set_bit(PG_dcache_clean, &page->flags);
++      }
+ }
index 10f77b49212934177fc8bfdb7c853a23c479b45e..d17d057e12beef90a13462e0947ef1f1b79d15cc 100644 (file)
@@ -54,3 +54,8 @@ pinctrl-single-fix-potential-null-dereference.patch
 pinctrl-intel-convert-unsigned-to-unsigned-int.patch
 pinctrl-intel-restore-the-pins-that-used-to-be-in-di.patch
 net-usb-fix-wrong-direction-warning-in-plusb.c.patch
+usb-core-add-quirk-for-alcor-link-ak9563-smartcard-reader.patch
+usb-typec-altmodes-displayport-fix-probe-pin-assign-check.patch
+riscv-fixup-race-condition-on-pg_dcache_clean-in-flush_icache_pte.patch
+arm64-dts-meson-gx-make-mmc-host-controller-interrupts-level-sensitive.patch
+arm64-dts-meson-axg-make-mmc-host-controller-interrupts-level-sensitive.patch
diff --git a/queue-4.19/usb-core-add-quirk-for-alcor-link-ak9563-smartcard-reader.patch b/queue-4.19/usb-core-add-quirk-for-alcor-link-ak9563-smartcard-reader.patch
new file mode 100644 (file)
index 0000000..62923ea
--- /dev/null
@@ -0,0 +1,38 @@
+From 303e724d7b1e1a0a93daf0b1ab5f7c4f53543b34 Mon Sep 17 00:00:00 2001
+From: Mark Pearson <mpearson-lenovo@squebb.ca>
+Date: Wed, 8 Feb 2023 13:12:23 -0500
+Subject: usb: core: add quirk for Alcor Link AK9563 smartcard reader
+
+From: Mark Pearson <mpearson-lenovo@squebb.ca>
+
+commit 303e724d7b1e1a0a93daf0b1ab5f7c4f53543b34 upstream.
+
+The Alcor Link AK9563 smartcard reader used on some Lenovo platforms
+doesn't work. If LPM is enabled the reader will provide an invalid
+usb config descriptor. Added quirk to disable LPM.
+
+Verified fix on Lenovo P16 G1 and T14 G3
+
+Tested-by: Miroslav Zatko <mzatko@mirexoft.com>
+Tested-by: Dennis Wassenberg <dennis.wassenberg@secunet.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com>
+Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
+Link: https://lore.kernel.org/r/20230208181223.1092654-1-mpearson-lenovo@squebb.ca
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/core/quirks.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -527,6 +527,9 @@ static const struct usb_device_id usb_qu
+       /* DJI CineSSD */
+       { USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM },
++      /* Alcor Link AK9563 SC Reader used in 2022 Lenovo ThinkPads */
++      { USB_DEVICE(0x2ce3, 0x9563), .driver_info = USB_QUIRK_NO_LPM },
++
+       /* DELL USB GEN2 */
+       { USB_DEVICE(0x413c, 0xb062), .driver_info = USB_QUIRK_NO_LPM | USB_QUIRK_RESET_RESUME },
diff --git a/queue-4.19/usb-typec-altmodes-displayport-fix-probe-pin-assign-check.patch b/queue-4.19/usb-typec-altmodes-displayport-fix-probe-pin-assign-check.patch
new file mode 100644 (file)
index 0000000..6521efb
--- /dev/null
@@ -0,0 +1,48 @@
+From 54e5c00a4eb0a4c663445b245f641bbfab142430 Mon Sep 17 00:00:00 2001
+From: Prashant Malani <pmalani@chromium.org>
+Date: Wed, 8 Feb 2023 20:53:19 +0000
+Subject: usb: typec: altmodes/displayport: Fix probe pin assign check
+
+From: Prashant Malani <pmalani@chromium.org>
+
+commit 54e5c00a4eb0a4c663445b245f641bbfab142430 upstream.
+
+While checking Pin Assignments of the port and partner during probe, we
+don't take into account whether the peripheral is a plug or receptacle.
+
+This manifests itself in a mode entry failure on certain docks and
+dongles with captive cables. For instance, the Startech.com Type-C to DP
+dongle (Model #CDP2DP) advertises its DP VDO as 0x405. This would fail
+the Pin Assignment compatibility check, despite it supporting
+Pin Assignment C as a UFP.
+
+Update the check to use the correct DP Pin Assign macros that
+take the peripheral's receptacle bit into account.
+
+Fixes: c1e5c2f0cb8a ("usb: typec: altmodes/displayport: correct pin assignment for UFP receptacles")
+Cc: stable@vger.kernel.org
+Reported-by: Diana Zigterman <dzigterman@chromium.org>
+Signed-off-by: Prashant Malani <pmalani@chromium.org>
+Link: https://lore.kernel.org/r/20230208205318.131385-1-pmalani@chromium.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/typec/altmodes/displayport.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/usb/typec/altmodes/displayport.c
++++ b/drivers/usb/typec/altmodes/displayport.c
+@@ -526,10 +526,10 @@ static int dp_altmode_probe(struct typec
+       /* FIXME: Port can only be DFP_U. */
+       /* Make sure we have compatiple pin configurations */
+-      if (!(DP_CAP_DFP_D_PIN_ASSIGN(port->vdo) &
+-            DP_CAP_UFP_D_PIN_ASSIGN(alt->vdo)) &&
+-          !(DP_CAP_UFP_D_PIN_ASSIGN(port->vdo) &
+-            DP_CAP_DFP_D_PIN_ASSIGN(alt->vdo)))
++      if (!(DP_CAP_PIN_ASSIGN_DFP_D(port->vdo) &
++            DP_CAP_PIN_ASSIGN_UFP_D(alt->vdo)) &&
++          !(DP_CAP_PIN_ASSIGN_UFP_D(port->vdo) &
++            DP_CAP_PIN_ASSIGN_DFP_D(alt->vdo)))
+               return -ENODEV;
+       ret = sysfs_create_group(&alt->dev.kobj, &dp_altmode_group);