From: Greg Kroah-Hartman Date: Fri, 29 Mar 2024 09:44:54 +0000 (+0100) Subject: 6.8-stable patches X-Git-Tag: v6.7.12~180 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ed99e74f11f120509354b901594513031cc63f2;p=thirdparty%2Fkernel%2Fstable-queue.git 6.8-stable patches added patches: asoc-amd-yc-revert-add-new-yc-platform-variant-0x63-support.patch asoc-amd-yc-revert-fix-non-functional-mic-on-lenovo-21j2.patch fix-memory-leak-in-posix_clock_open.patch wifi-rtw88-8821cu-fix-connection-failure.patch --- diff --git a/queue-6.8/asoc-amd-yc-revert-add-new-yc-platform-variant-0x63-support.patch b/queue-6.8/asoc-amd-yc-revert-add-new-yc-platform-variant-0x63-support.patch new file mode 100644 index 00000000000..b6d6c52e807 --- /dev/null +++ b/queue-6.8/asoc-amd-yc-revert-add-new-yc-platform-variant-0x63-support.patch @@ -0,0 +1,37 @@ +From 37bee1855d0e3b6dbeb8de71895f6f68cad137be Mon Sep 17 00:00:00 2001 +From: Jiawei Wang +Date: Wed, 13 Mar 2024 09:58:53 +0800 +Subject: ASoC: amd: yc: Revert "add new YC platform variant (0x63) support" + +From: Jiawei Wang + +commit 37bee1855d0e3b6dbeb8de71895f6f68cad137be upstream. + +This reverts commit 316a784839b21b122e1761cdca54677bb19a47fa, +that enabled Yellow Carp (YC) driver for PCI revision id 0x63. + +Mukunda Vijendar [1] points out that revision 0x63 is Pink +Sardine platform, not Yellow Carp. The YC driver should not +be enabled for this platform. This patch prevents the YC +driver from being incorrectly enabled. + +Link: https://lore.kernel.org/linux-sound/023092e1-689c-4b00-b93f-4092c3724fb6@amd.com/ [1] + +Signed-off-by: Jiawei Wang +Link: https://msgid.link/r/20240313015853.3573242-3-me@jwang.link +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/amd/yc/pci-acp6x.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/sound/soc/amd/yc/pci-acp6x.c ++++ b/sound/soc/amd/yc/pci-acp6x.c +@@ -162,7 +162,6 @@ static int snd_acp6x_probe(struct pci_de + /* Yellow Carp device check */ + switch (pci->revision) { + case 0x60: +- case 0x63: + case 0x6f: + break; + default: diff --git a/queue-6.8/asoc-amd-yc-revert-fix-non-functional-mic-on-lenovo-21j2.patch b/queue-6.8/asoc-amd-yc-revert-fix-non-functional-mic-on-lenovo-21j2.patch new file mode 100644 index 00000000000..c0b3ed3cd67 --- /dev/null +++ b/queue-6.8/asoc-amd-yc-revert-fix-non-functional-mic-on-lenovo-21j2.patch @@ -0,0 +1,52 @@ +From 861b3415e4dee06cc00cd1754808a7827b9105bf Mon Sep 17 00:00:00 2001 +From: Jiawei Wang +Date: Wed, 13 Mar 2024 09:58:52 +0800 +Subject: ASoC: amd: yc: Revert "Fix non-functional mic on Lenovo 21J2" + +From: Jiawei Wang + +commit 861b3415e4dee06cc00cd1754808a7827b9105bf upstream. + +This reverts commit ed00a6945dc32462c2d3744a3518d2316da66fcc, +which added a quirk entry to enable the Yellow Carp (YC) +driver for the Lenovo 21J2 laptop. + +Although the microphone functioned with the YC driver, it +resulted in incorrect driver usage. The Lenovo 21J2 is not a +Yellow Carp platform, but a Pink Sardine platform, which +already has an upstreamed driver. + +The microphone on the Lenovo 21J2 operates correctly with the +CONFIG_SND_SOC_AMD_PS flag enabled and does not require the +quirk entry. So this patch removes the quirk entry. + +Thanks to Mukunda Vijendar [1] for pointing this out. + +Link: https://lore.kernel.org/linux-sound/023092e1-689c-4b00-b93f-4092c3724fb6@amd.com/ [1] + +Signed-off-by: Jiawei Wang +Link: https://lore.kernel.org/linux-sound/023092e1-689c-4b00-b93f-4092c3724fb6@amd.com/ [1] +Link: https://msgid.link/r/20240313015853.3573242-2-me@jwang.link +Signed-off-by: Mark Brown +Cc: Luca Stefani +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/amd/yc/acp6x-mach.c | 7 ------- + 1 file changed, 7 deletions(-) + +--- a/sound/soc/amd/yc/acp6x-mach.c ++++ b/sound/soc/amd/yc/acp6x-mach.c +@@ -203,13 +203,6 @@ static const struct dmi_system_id yc_acp + .driver_data = &acp6x_card, + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), +- DMI_MATCH(DMI_PRODUCT_NAME, "21J2"), +- } +- }, +- { +- .driver_data = &acp6x_card, +- .matches = { +- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "21J0"), + } + }, diff --git a/queue-6.8/fix-memory-leak-in-posix_clock_open.patch b/queue-6.8/fix-memory-leak-in-posix_clock_open.patch new file mode 100644 index 00000000000..c332da42759 --- /dev/null +++ b/queue-6.8/fix-memory-leak-in-posix_clock_open.patch @@ -0,0 +1,53 @@ +From 5b4cdd9c5676559b8a7c944ac5269b914b8c0bb8 Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Tue, 26 Mar 2024 14:59:48 -0700 +Subject: Fix memory leak in posix_clock_open() + +From: Linus Torvalds + +commit 5b4cdd9c5676559b8a7c944ac5269b914b8c0bb8 upstream. + +If the clk ops.open() function returns an error, we don't release the +pccontext we allocated for this clock. + +Re-organize the code slightly to make it all more obvious. + +Reported-by: Rohit Keshri +Acked-by: Oleg Nesterov +Fixes: 60c6946675fc ("posix-clock: introduce posix_clock_context concept") +Cc: Jakub Kicinski +Cc: David S. Miller +Cc: Thomas Gleixner +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman +--- + kernel/time/posix-clock.c | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +--- a/kernel/time/posix-clock.c ++++ b/kernel/time/posix-clock.c +@@ -129,15 +129,17 @@ static int posix_clock_open(struct inode + goto out; + } + pccontext->clk = clk; +- fp->private_data = pccontext; +- if (clk->ops.open) ++ if (clk->ops.open) { + err = clk->ops.open(pccontext, fp->f_mode); +- else +- err = 0; +- +- if (!err) { +- get_device(clk->dev); ++ if (err) { ++ kfree(pccontext); ++ goto out; ++ } + } ++ ++ fp->private_data = pccontext; ++ get_device(clk->dev); ++ err = 0; + out: + up_read(&clk->rwsem); + return err; diff --git a/queue-6.8/series b/queue-6.8/series index 80056d7226d..b50e5907861 100644 --- a/queue-6.8/series +++ b/queue-6.8/series @@ -244,3 +244,7 @@ drm-amd-display-use-freesync-when-drm_edid_feature_continuous_freq-found.patch netfilter-nf_tables-reject-constant-set-with-timeout.patch revert-crypto-pkcs7-remove-sha1-support.patch x86-efistub-call-mixed-mode-boot-services-on-the-firmware-s-stack.patch +asoc-amd-yc-revert-fix-non-functional-mic-on-lenovo-21j2.patch +asoc-amd-yc-revert-add-new-yc-platform-variant-0x63-support.patch +fix-memory-leak-in-posix_clock_open.patch +wifi-rtw88-8821cu-fix-connection-failure.patch diff --git a/queue-6.8/wifi-rtw88-8821cu-fix-connection-failure.patch b/queue-6.8/wifi-rtw88-8821cu-fix-connection-failure.patch new file mode 100644 index 00000000000..0a70ee7c90c --- /dev/null +++ b/queue-6.8/wifi-rtw88-8821cu-fix-connection-failure.patch @@ -0,0 +1,53 @@ +From 605d7c0b05eecb985273b1647070497142c470d3 Mon Sep 17 00:00:00 2001 +From: Bitterblue Smith +Date: Fri, 1 Mar 2024 00:34:13 +0200 +Subject: wifi: rtw88: 8821cu: Fix connection failure + +From: Bitterblue Smith + +commit 605d7c0b05eecb985273b1647070497142c470d3 upstream. + +Clear bit 8 of REG_SYS_STATUS1 after MAC power on. + +Without this, some RTL8821CU and RTL8811CU cannot connect to any +network: + +Feb 19 13:33:11 ideapad2 kernel: wlp3s0f3u2: send auth to + 90:55:de:__:__:__ (try 1/3) +Feb 19 13:33:13 ideapad2 kernel: wlp3s0f3u2: send auth to + 90:55:de:__:__:__ (try 2/3) +Feb 19 13:33:14 ideapad2 kernel: wlp3s0f3u2: send auth to + 90:55:de:__:__:__ (try 3/3) +Feb 19 13:33:15 ideapad2 kernel: wlp3s0f3u2: authentication with + 90:55:de:__:__:__ timed out + +The RTL8822CU and RTL8822BU out-of-tree drivers do this as well, so do +it for all three types of chips. + +Tested with RTL8811CU (Tenda U9 V2.0). + +Signed-off-by: Bitterblue Smith +Acked-by: Ping-Ke Shih +Signed-off-by: Kalle Valo +Link: https://msgid.link/aeeefad9-27c8-4506-a510-ef9a9a8731a4@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/wireless/realtek/rtw88/mac.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/net/wireless/realtek/rtw88/mac.c ++++ b/drivers/net/wireless/realtek/rtw88/mac.c +@@ -309,6 +309,13 @@ static int rtw_mac_power_switch(struct r + pwr_seq = pwr_on ? chip->pwr_on_seq : chip->pwr_off_seq; + ret = rtw_pwr_seq_parser(rtwdev, pwr_seq); + ++ if (pwr_on && rtw_hci_type(rtwdev) == RTW_HCI_TYPE_USB) { ++ if (chip->id == RTW_CHIP_TYPE_8822C || ++ chip->id == RTW_CHIP_TYPE_8822B || ++ chip->id == RTW_CHIP_TYPE_8821C) ++ rtw_write8_clr(rtwdev, REG_SYS_STATUS1 + 1, BIT(0)); ++ } ++ + if (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_SDIO) + rtw_write32(rtwdev, REG_SDIO_HIMR, imr); +