]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.7-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Mar 2024 09:44:43 +0000 (10:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Mar 2024 09:44:43 +0000 (10:44 +0100)
added patches:
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

queue-6.7/asoc-amd-yc-revert-fix-non-functional-mic-on-lenovo-21j2.patch [new file with mode: 0644]
queue-6.7/fix-memory-leak-in-posix_clock_open.patch [new file with mode: 0644]
queue-6.7/series
queue-6.7/wifi-rtw88-8821cu-fix-connection-failure.patch [new file with mode: 0644]

diff --git a/queue-6.7/asoc-amd-yc-revert-fix-non-functional-mic-on-lenovo-21j2.patch b/queue-6.7/asoc-amd-yc-revert-fix-non-functional-mic-on-lenovo-21j2.patch
new file mode 100644 (file)
index 0000000..c0b3ed3
--- /dev/null
@@ -0,0 +1,52 @@
+From 861b3415e4dee06cc00cd1754808a7827b9105bf Mon Sep 17 00:00:00 2001
+From: Jiawei Wang <me@jwang.link>
+Date: Wed, 13 Mar 2024 09:58:52 +0800
+Subject: ASoC: amd: yc: Revert "Fix non-functional mic on Lenovo 21J2"
+
+From: Jiawei Wang <me@jwang.link>
+
+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 <me@jwang.link>
+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 <broonie@kernel.org>
+Cc: Luca Stefani <luca.stefani.ge1@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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.7/fix-memory-leak-in-posix_clock_open.patch b/queue-6.7/fix-memory-leak-in-posix_clock_open.patch
new file mode 100644 (file)
index 0000000..c332da4
--- /dev/null
@@ -0,0 +1,53 @@
+From 5b4cdd9c5676559b8a7c944ac5269b914b8c0bb8 Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Tue, 26 Mar 2024 14:59:48 -0700
+Subject: Fix memory leak in posix_clock_open()
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+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 <rkeshri@redhat.com>
+Acked-by: Oleg Nesterov <oleg@redhat.com>
+Fixes: 60c6946675fc ("posix-clock: introduce posix_clock_context concept")
+Cc: Jakub Kicinski <kuba@kernel.org>
+Cc: David S. Miller <davem@davemloft.net>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Linus Torvalds <torvalds@linuxfoundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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;
index 965b7d30a1348af194dcc7b38303eb3106949897..acf43da75b50dfa27fe111c9fdf8266a67d4d752 100644 (file)
@@ -289,3 +289,6 @@ drm-i915-don-t-explode-when-the-dig-port-we-don-t-have-an-aux-ch.patch
 drm-amd-display-handle-range-offsets-in-vrr-ranges.patch
 drm-amd-swsmu-modify-the-gfx-activity-scaling.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
+fix-memory-leak-in-posix_clock_open.patch
+wifi-rtw88-8821cu-fix-connection-failure.patch
diff --git a/queue-6.7/wifi-rtw88-8821cu-fix-connection-failure.patch b/queue-6.7/wifi-rtw88-8821cu-fix-connection-failure.patch
new file mode 100644 (file)
index 0000000..0a70ee7
--- /dev/null
@@ -0,0 +1,53 @@
+From 605d7c0b05eecb985273b1647070497142c470d3 Mon Sep 17 00:00:00 2001
+From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
+Date: Fri, 1 Mar 2024 00:34:13 +0200
+Subject: wifi: rtw88: 8821cu: Fix connection failure
+
+From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
+
+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 <rtl8821cerfe2@gmail.com>
+Acked-by: Ping-Ke Shih <pkshih@realtek.com>
+Signed-off-by: Kalle Valo <kvalo@kernel.org>
+Link: https://msgid.link/aeeefad9-27c8-4506-a510-ef9a9a8731a4@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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);