From: Greg Kroah-Hartman Date: Mon, 13 Feb 2023 11:48:04 +0000 (+0100) Subject: 5.4-stable patches X-Git-Tag: v6.1.12~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3767e3cbff76044bc1efbd209ccd05c7c354eec;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: arm64-dts-meson-axg-make-mmc-host-controller-interrupts-level-sensitive.patch arm64-dts-meson-g12-common-make-mmc-host-controller-interrupts-level-sensitive.patch arm64-dts-meson-gx-make-mmc-host-controller-interrupts-level-sensitive.patch ceph-flush-cap-releases-when-the-session-is-flushed.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 --- diff --git a/queue-5.4/arm64-dts-meson-axg-make-mmc-host-controller-interrupts-level-sensitive.patch b/queue-5.4/arm64-dts-meson-axg-make-mmc-host-controller-interrupts-level-sensitive.patch new file mode 100644 index 00000000000..59fa8caa707 --- /dev/null +++ b/queue-5.4/arm64-dts-meson-axg-make-mmc-host-controller-interrupts-level-sensitive.patch @@ -0,0 +1,51 @@ +From d182bcf300772d8b2e5f43e47fa0ebda2b767cc4 Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Thu, 9 Feb 2023 21:10:31 +0100 +Subject: arm64: dts: meson-axg: Make mmc host controller interrupts level-sensitive + +From: Heiner Kallweit + +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 +Tested-by: Vyacheslav Bocharov +Tested-by: Peter Suti +Cc: stable@vger.kernel.org +Signed-off-by: Heiner Kallweit +Acked-by: Neil Armstrong +Link: https://lore.kernel.org/r/c00655d3-02f8-6f5f-4239-ca2412420cad@gmail.com +Signed-off-by: Neil Armstrong +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -1705,7 +1705,7 @@ + sd_emmc_b: sd@5000 { + compatible = "amlogic,meson-axg-mmc"; + reg = <0x0 0x5000 0x0 0x800>; +- interrupts = ; ++ interrupts = ; + status = "disabled"; + clocks = <&clkc CLKID_SD_EMMC_B>, + <&clkc CLKID_SD_EMMC_B_CLK0>, +@@ -1717,7 +1717,7 @@ + sd_emmc_c: mmc@7000 { + compatible = "amlogic,meson-axg-mmc"; + reg = <0x0 0x7000 0x0 0x800>; +- interrupts = ; ++ interrupts = ; + status = "disabled"; + clocks = <&clkc CLKID_SD_EMMC_C>, + <&clkc CLKID_SD_EMMC_C_CLK0>, diff --git a/queue-5.4/arm64-dts-meson-g12-common-make-mmc-host-controller-interrupts-level-sensitive.patch b/queue-5.4/arm64-dts-meson-g12-common-make-mmc-host-controller-interrupts-level-sensitive.patch new file mode 100644 index 00000000000..56f380bc3d4 --- /dev/null +++ b/queue-5.4/arm64-dts-meson-g12-common-make-mmc-host-controller-interrupts-level-sensitive.patch @@ -0,0 +1,60 @@ +From ac8db4cceed218cca21c84f9d75ce88182d8b04f Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Thu, 9 Feb 2023 21:11:10 +0100 +Subject: arm64: dts: meson-g12-common: Make mmc host controller interrupts level-sensitive + +From: Heiner Kallweit + +commit ac8db4cceed218cca21c84f9d75ce88182d8b04f 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: 4759fd87b928 ("arm64: dts: meson: g12a: add mmc nodes") +Tested-by: FUKAUMI Naoki +Tested-by: Martin Blumenstingl +Tested-by: Jerome Brunet +Cc: stable@vger.kernel.org +Signed-off-by: Heiner Kallweit +Acked-by: Neil Armstrong +Link: https://lore.kernel.org/r/27d89baa-b8fa-baca-541b-ef17a97cde3c@gmail.com +Signed-off-by: Neil Armstrong +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi ++++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +@@ -2317,7 +2317,7 @@ + sd_emmc_a: sd@ffe03000 { + compatible = "amlogic,meson-axg-mmc"; + reg = <0x0 0xffe03000 0x0 0x800>; +- interrupts = ; ++ interrupts = ; + status = "disabled"; + clocks = <&clkc CLKID_SD_EMMC_A>, + <&clkc CLKID_SD_EMMC_A_CLK0>, +@@ -2329,7 +2329,7 @@ + sd_emmc_b: sd@ffe05000 { + compatible = "amlogic,meson-axg-mmc"; + reg = <0x0 0xffe05000 0x0 0x800>; +- interrupts = ; ++ interrupts = ; + status = "disabled"; + clocks = <&clkc CLKID_SD_EMMC_B>, + <&clkc CLKID_SD_EMMC_B_CLK0>, +@@ -2341,7 +2341,7 @@ + sd_emmc_c: mmc@ffe07000 { + compatible = "amlogic,meson-axg-mmc"; + reg = <0x0 0xffe07000 0x0 0x800>; +- interrupts = ; ++ interrupts = ; + status = "disabled"; + clocks = <&clkc CLKID_SD_EMMC_C>, + <&clkc CLKID_SD_EMMC_C_CLK0>, diff --git a/queue-5.4/arm64-dts-meson-gx-make-mmc-host-controller-interrupts-level-sensitive.patch b/queue-5.4/arm64-dts-meson-gx-make-mmc-host-controller-interrupts-level-sensitive.patch new file mode 100644 index 00000000000..d372c3d3bc6 --- /dev/null +++ b/queue-5.4/arm64-dts-meson-gx-make-mmc-host-controller-interrupts-level-sensitive.patch @@ -0,0 +1,55 @@ +From 66e45351f7d6798751f98001d1fcd572024d87f0 Mon Sep 17 00:00:00 2001 +From: Heiner Kallweit +Date: Thu, 9 Feb 2023 21:11:47 +0100 +Subject: arm64: dts: meson-gx: Make mmc host controller interrupts level-sensitive + +From: Heiner Kallweit + +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 +Acked-by: Neil Armstrong +Link: https://lore.kernel.org/r/76e042e0-a610-5ed5-209f-c4d7f879df44@gmail.com +Signed-off-by: Neil Armstrong +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -528,21 +528,21 @@ + sd_emmc_a: mmc@70000 { + compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc"; + reg = <0x0 0x70000 0x0 0x800>; +- interrupts = ; ++ interrupts = ; + status = "disabled"; + }; + + sd_emmc_b: mmc@72000 { + compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc"; + reg = <0x0 0x72000 0x0 0x800>; +- interrupts = ; ++ interrupts = ; + status = "disabled"; + }; + + sd_emmc_c: mmc@74000 { + compatible = "amlogic,meson-gx-mmc", "amlogic,meson-gxbb-mmc"; + reg = <0x0 0x74000 0x0 0x800>; +- interrupts = ; ++ interrupts = ; + status = "disabled"; + }; + }; diff --git a/queue-5.4/ceph-flush-cap-releases-when-the-session-is-flushed.patch b/queue-5.4/ceph-flush-cap-releases-when-the-session-is-flushed.patch new file mode 100644 index 00000000000..b9c12253141 --- /dev/null +++ b/queue-5.4/ceph-flush-cap-releases-when-the-session-is-flushed.patch @@ -0,0 +1,38 @@ +From e7d84c6a1296d059389f7342d9b4b7defb518d3a Mon Sep 17 00:00:00 2001 +From: Xiubo Li +Date: Tue, 7 Feb 2023 13:04:52 +0800 +Subject: ceph: flush cap releases when the session is flushed + +From: Xiubo Li + +commit e7d84c6a1296d059389f7342d9b4b7defb518d3a upstream. + +MDS expects the completed cap release prior to responding to the +session flush for cache drop. + +Cc: stable@vger.kernel.org +Link: http://tracker.ceph.com/issues/38009 +Signed-off-by: Xiubo Li +Reviewed-by: Venky Shankar +Reviewed-by: Jeff Layton +Signed-off-by: Ilya Dryomov +Signed-off-by: Greg Kroah-Hartman +--- + fs/ceph/mds_client.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/fs/ceph/mds_client.c ++++ b/fs/ceph/mds_client.c +@@ -3151,6 +3151,12 @@ static void handle_session(struct ceph_m + break; + + case CEPH_SESSION_FLUSHMSG: ++ /* flush cap releases */ ++ spin_lock(&session->s_cap_lock); ++ if (session->s_num_cap_releases) ++ ceph_flush_cap_releases(mdsc, session); ++ spin_unlock(&session->s_cap_lock); ++ + send_flushmsg_ack(mdsc, session, seq); + break; + diff --git a/queue-5.4/riscv-fixup-race-condition-on-pg_dcache_clean-in-flush_icache_pte.patch b/queue-5.4/riscv-fixup-race-condition-on-pg_dcache_clean-in-flush_icache_pte.patch new file mode 100644 index 00000000000..f142466b8db --- /dev/null +++ b/queue-5.4/riscv-fixup-race-condition-on-pg_dcache_clean-in-flush_icache_pte.patch @@ -0,0 +1,41 @@ +From 950b879b7f0251317d26bae0687e72592d607532 Mon Sep 17 00:00:00 2001 +From: Guo Ren +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 + +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 +Signed-off-by: Guo Ren +Reviewed-by: Andrew Jones +Reviewed-by: Conor Dooley +Link: https://lore.kernel.org/r/20230127035306.1819561-1-guoren@kernel.org +Cc: stable@vger.kernel.org +Signed-off-by: Palmer Dabbelt +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -71,6 +71,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); ++ } + } diff --git a/queue-5.4/series b/queue-5.4/series index 3d214fc544c..2b70ed3ebf7 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -78,3 +78,10 @@ pinctrl-aspeed-fix-confusing-types-in-return-value.patch pinctrl-single-fix-potential-null-dereference.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 +ceph-flush-cap-releases-when-the-session-is-flushed.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-g12-common-make-mmc-host-controller-interrupts-level-sensitive.patch +arm64-dts-meson-axg-make-mmc-host-controller-interrupts-level-sensitive.patch diff --git a/queue-5.4/usb-core-add-quirk-for-alcor-link-ak9563-smartcard-reader.patch b/queue-5.4/usb-core-add-quirk-for-alcor-link-ak9563-smartcard-reader.patch new file mode 100644 index 00000000000..62923ea8856 --- /dev/null +++ b/queue-5.4/usb-core-add-quirk-for-alcor-link-ak9563-smartcard-reader.patch @@ -0,0 +1,38 @@ +From 303e724d7b1e1a0a93daf0b1ab5f7c4f53543b34 Mon Sep 17 00:00:00 2001 +From: Mark Pearson +Date: Wed, 8 Feb 2023 13:12:23 -0500 +Subject: usb: core: add quirk for Alcor Link AK9563 smartcard reader + +From: Mark Pearson + +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 +Tested-by: Dennis Wassenberg +Cc: stable@vger.kernel.org +Signed-off-by: Dennis Wassenberg +Signed-off-by: Mark Pearson +Link: https://lore.kernel.org/r/20230208181223.1092654-1-mpearson-lenovo@squebb.ca +Signed-off-by: Greg Kroah-Hartman +--- + 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-5.4/usb-typec-altmodes-displayport-fix-probe-pin-assign-check.patch b/queue-5.4/usb-typec-altmodes-displayport-fix-probe-pin-assign-check.patch new file mode 100644 index 00000000000..f7bd4f33e23 --- /dev/null +++ b/queue-5.4/usb-typec-altmodes-displayport-fix-probe-pin-assign-check.patch @@ -0,0 +1,48 @@ +From 54e5c00a4eb0a4c663445b245f641bbfab142430 Mon Sep 17 00:00:00 2001 +From: Prashant Malani +Date: Wed, 8 Feb 2023 20:53:19 +0000 +Subject: usb: typec: altmodes/displayport: Fix probe pin assign check + +From: Prashant Malani + +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 +Signed-off-by: Prashant Malani +Link: https://lore.kernel.org/r/20230208205318.131385-1-pmalani@chromium.org +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -522,10 +522,10 @@ int dp_altmode_probe(struct typec_altmod + /* 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);