]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jul 2024 10:22:04 +0000 (12:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jul 2024 10:22:04 +0000 (12:22 +0200)
added patches:
alsa-hda-realtek-add-quirk-for-clevo-v50tu.patch
alsa-hda-realtek-enable-mute-led-on-hp-250-g7.patch
alsa-hda-realtek-limit-mic-boost-on-vaio-pro-px.patch
nvmem-core-only-change-name-to-fram-for-current-attribute.patch
nvmem-meson-efuse-fix-return-value-of-nvmem-callbacks.patch
nvmem-rmem-fix-return-value-of-rmem_read.patch

queue-5.15/alsa-hda-realtek-add-quirk-for-clevo-v50tu.patch [new file with mode: 0644]
queue-5.15/alsa-hda-realtek-enable-mute-led-on-hp-250-g7.patch [new file with mode: 0644]
queue-5.15/alsa-hda-realtek-limit-mic-boost-on-vaio-pro-px.patch [new file with mode: 0644]
queue-5.15/nvmem-core-only-change-name-to-fram-for-current-attribute.patch [new file with mode: 0644]
queue-5.15/nvmem-meson-efuse-fix-return-value-of-nvmem-callbacks.patch [new file with mode: 0644]
queue-5.15/nvmem-rmem-fix-return-value-of-rmem_read.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/alsa-hda-realtek-add-quirk-for-clevo-v50tu.patch b/queue-5.15/alsa-hda-realtek-add-quirk-for-clevo-v50tu.patch
new file mode 100644 (file)
index 0000000..997f7fc
--- /dev/null
@@ -0,0 +1,33 @@
+From e1c6db864599be341cd3bcc041540383215ce05e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20Kope=C4=87?= <michal.kopec@3mdeb.com>
+Date: Mon, 1 Jul 2024 13:10:09 +0200
+Subject: ALSA: hda/realtek: add quirk for Clevo V5[46]0TU
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Michał Kopeć <michal.kopec@3mdeb.com>
+
+commit e1c6db864599be341cd3bcc041540383215ce05e upstream.
+
+Apply quirk to fix combo jack detection on a new Clevo model: V5[46]0TU
+
+Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
+Cc: <stable@vger.kernel.org>
+Link: https://patch.msgid.link/20240701111010.1496569-1-michal.kopec@3mdeb.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -9359,6 +9359,7 @@ static const struct snd_pci_quirk alc269
+       SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50NU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
+       SND_PCI_QUIRK(0x1558, 0xa650, "Clevo NP[567]0SN[CD]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
+       SND_PCI_QUIRK(0x1558, 0xa671, "Clevo NP70SN[CDE]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
++      SND_PCI_QUIRK(0x1558, 0xa763, "Clevo V54x_6x_TU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
+       SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
+       SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
+       SND_PCI_QUIRK(0x1558, 0xb022, "Clevo NH77D[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
diff --git a/queue-5.15/alsa-hda-realtek-enable-mute-led-on-hp-250-g7.patch b/queue-5.15/alsa-hda-realtek-enable-mute-led-on-hp-250-g7.patch
new file mode 100644 (file)
index 0000000..6f85713
--- /dev/null
@@ -0,0 +1,31 @@
+From b46953029c52bd3a3306ff79f631418b75384656 Mon Sep 17 00:00:00 2001
+From: Nazar Bilinskyi <nbilinskyi@gmail.com>
+Date: Tue, 9 Jul 2024 11:05:46 +0300
+Subject: ALSA: hda/realtek: Enable Mute LED on HP 250 G7
+
+From: Nazar Bilinskyi <nbilinskyi@gmail.com>
+
+commit b46953029c52bd3a3306ff79f631418b75384656 upstream.
+
+HP 250 G7 has a mute LED that can be made to work using quirk
+ALC269_FIXUP_HP_LINE1_MIC1_LED. Enable already existing quirk.
+
+Signed-off-by: Nazar Bilinskyi <nbilinskyi@gmail.com>
+Cc: <stable@vger.kernel.org>
+Link: https://patch.msgid.link/20240709080546.18344-1-nbilinskyi@gmail.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -9122,6 +9122,7 @@ static const struct snd_pci_quirk alc269
+       SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
+       SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3),
+       SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
++      SND_PCI_QUIRK(0x103c, 0x84a6, "HP 250 G7 Notebook PC", ALC269_FIXUP_HP_LINE1_MIC1_LED),
+       SND_PCI_QUIRK(0x103c, 0x84ae, "HP 15-db0403ng", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
+       SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
+       SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
diff --git a/queue-5.15/alsa-hda-realtek-limit-mic-boost-on-vaio-pro-px.patch b/queue-5.15/alsa-hda-realtek-limit-mic-boost-on-vaio-pro-px.patch
new file mode 100644 (file)
index 0000000..b99db97
--- /dev/null
@@ -0,0 +1,40 @@
+From 6db03b1929e207d2c6e84e75a9cd78124b3d6c6d Mon Sep 17 00:00:00 2001
+From: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
+Date: Fri, 5 Jul 2024 11:10:12 -0300
+Subject: ALSA: hda/realtek: Limit mic boost on VAIO PRO PX
+
+From: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
+
+commit 6db03b1929e207d2c6e84e75a9cd78124b3d6c6d upstream.
+
+The internal mic boost on the VAIO models VJFE-CL and VJFE-IL is too high.
+Fix this by applying the ALC269_FIXUP_LIMIT_INT_MIC_BOOST fixup to the machine
+to limit the gain.
+
+Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
+Cc: <stable@vger.kernel.org>
+Link: https://patch.msgid.link/20240705141012.5368-1-edson.drosdeck@gmail.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -9268,6 +9268,7 @@ static const struct snd_pci_quirk alc269
+       SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
+       SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE),
+       SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
++      SND_PCI_QUIRK(0x10ec, 0x11bc, "VAIO VJFE-IL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
+       SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
+       SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
+       SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
+@@ -9481,6 +9482,7 @@ static const struct snd_pci_quirk alc269
+       SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
+       SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC),
+       SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
++      SND_PCI_QUIRK(0x2782, 0x0214, "VAIO VJFE-CL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
+       SND_PCI_QUIRK(0x2782, 0x0232, "CHUWI CoreBook XPro", ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO),
+       SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME),
+       SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
diff --git a/queue-5.15/nvmem-core-only-change-name-to-fram-for-current-attribute.patch b/queue-5.15/nvmem-core-only-change-name-to-fram-for-current-attribute.patch
new file mode 100644 (file)
index 0000000..d86bd97
--- /dev/null
@@ -0,0 +1,43 @@
+From 0ba424c934fd43dccf0d597e1ae8851f07cb2edf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <linux@weissschuh.net>
+Date: Fri, 28 Jun 2024 12:37:03 +0100
+Subject: nvmem: core: only change name to fram for current attribute
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Thomas Weißschuh <linux@weissschuh.net>
+
+commit 0ba424c934fd43dccf0d597e1ae8851f07cb2edf upstream.
+
+bin_attr_nvmem_eeprom_compat is the template from which all future
+compat attributes are created.
+Changing it means to change all subsquent compat attributes, too.
+
+Instead only use the "fram" name for the currently registered attribute.
+
+Fixes: fd307a4ad332 ("nvmem: prepare basics for FRAM support")
+Cc: stable@vger.kernel.org
+Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Link: https://lore.kernel.org/r/20240628113704.13742-4-srinivas.kandagatla@linaro.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/nvmem/core.c |    5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/drivers/nvmem/core.c
++++ b/drivers/nvmem/core.c
+@@ -362,10 +362,9 @@ static int nvmem_sysfs_setup_compat(stru
+       if (!config->base_dev)
+               return -EINVAL;
+-      if (config->type == NVMEM_TYPE_FRAM)
+-              bin_attr_nvmem_eeprom_compat.attr.name = "fram";
+-
+       nvmem->eeprom = bin_attr_nvmem_eeprom_compat;
++      if (config->type == NVMEM_TYPE_FRAM)
++              nvmem->eeprom.attr.name = "fram";
+       nvmem->eeprom.attr.mode = nvmem_bin_attr_get_umode(nvmem);
+       nvmem->eeprom.size = nvmem->size;
+ #ifdef CONFIG_DEBUG_LOCK_ALLOC
diff --git a/queue-5.15/nvmem-meson-efuse-fix-return-value-of-nvmem-callbacks.patch b/queue-5.15/nvmem-meson-efuse-fix-return-value-of-nvmem-callbacks.patch
new file mode 100644 (file)
index 0000000..299621b
--- /dev/null
@@ -0,0 +1,63 @@
+From 7a0a6d0a7c805f9380381f4deedffdf87b93f408 Mon Sep 17 00:00:00 2001
+From: Joy Chakraborty <joychakr@google.com>
+Date: Fri, 28 Jun 2024 12:37:02 +0100
+Subject: nvmem: meson-efuse: Fix return value of nvmem callbacks
+
+From: Joy Chakraborty <joychakr@google.com>
+
+commit 7a0a6d0a7c805f9380381f4deedffdf87b93f408 upstream.
+
+Read/write callbacks registered with nvmem core expect 0 to be returned
+on success and a negative value to be returned on failure.
+
+meson_efuse_read() and meson_efuse_write() call into
+meson_sm_call_read() and meson_sm_call_write() respectively which return
+the number of bytes read or written on success as per their api
+description.
+
+Fix to return error if meson_sm_call_read()/meson_sm_call_write()
+returns an error else return 0.
+
+Fixes: a29a63bdaf6f ("nvmem: meson-efuse: simplify read callback")
+Cc: stable@vger.kernel.org
+Signed-off-by: Joy Chakraborty <joychakr@google.com>
+Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
+Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Link: https://lore.kernel.org/r/20240628113704.13742-3-srinivas.kandagatla@linaro.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/nvmem/meson-efuse.c |   14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+--- a/drivers/nvmem/meson-efuse.c
++++ b/drivers/nvmem/meson-efuse.c
+@@ -18,18 +18,24 @@ static int meson_efuse_read(void *contex
+                           void *val, size_t bytes)
+ {
+       struct meson_sm_firmware *fw = context;
++      int ret;
+-      return meson_sm_call_read(fw, (u8 *)val, bytes, SM_EFUSE_READ, offset,
+-                                bytes, 0, 0, 0);
++      ret = meson_sm_call_read(fw, (u8 *)val, bytes, SM_EFUSE_READ, offset,
++                               bytes, 0, 0, 0);
++
++      return ret < 0 ? ret : 0;
+ }
+ static int meson_efuse_write(void *context, unsigned int offset,
+                            void *val, size_t bytes)
+ {
+       struct meson_sm_firmware *fw = context;
++      int ret;
++
++      ret = meson_sm_call_write(fw, (u8 *)val, bytes, SM_EFUSE_WRITE, offset,
++                                bytes, 0, 0, 0);
+-      return meson_sm_call_write(fw, (u8 *)val, bytes, SM_EFUSE_WRITE, offset,
+-                                 bytes, 0, 0, 0);
++      return ret < 0 ? ret : 0;
+ }
+ static const struct of_device_id meson_efuse_match[] = {
diff --git a/queue-5.15/nvmem-rmem-fix-return-value-of-rmem_read.patch b/queue-5.15/nvmem-rmem-fix-return-value-of-rmem_read.patch
new file mode 100644 (file)
index 0000000..a2c2f00
--- /dev/null
@@ -0,0 +1,47 @@
+From 28b008751aa295612318a0fbb2f22dd4f6a83139 Mon Sep 17 00:00:00 2001
+From: Joy Chakraborty <joychakr@google.com>
+Date: Fri, 28 Jun 2024 12:37:01 +0100
+Subject: nvmem: rmem: Fix return value of rmem_read()
+
+From: Joy Chakraborty <joychakr@google.com>
+
+commit 28b008751aa295612318a0fbb2f22dd4f6a83139 upstream.
+
+reg_read() callback registered with nvmem core expects 0 on success and
+a negative value on error but rmem_read() returns the number of bytes
+read which is treated as an error at the nvmem core.
+
+This does not break when rmem is accessed using sysfs via
+bin_attr_nvmem_read()/write() but causes an error when accessed from
+places like nvmem_access_with_keepouts(), etc.
+
+Change to return 0 on success and error in case
+memory_read_from_buffer() returns an error or -EIO if bytes read do not
+match what was requested.
+
+Fixes: 5a3fa75a4d9c ("nvmem: Add driver to expose reserved memory as nvmem")
+Cc: stable@vger.kernel.org
+Signed-off-by: Joy Chakraborty <joychakr@google.com>
+Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Link: https://lore.kernel.org/r/20240628113704.13742-2-srinivas.kandagatla@linaro.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/nvmem/rmem.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/nvmem/rmem.c
++++ b/drivers/nvmem/rmem.c
+@@ -46,7 +46,10 @@ static int rmem_read(void *context, unsi
+       memunmap(addr);
+-      return count;
++      if (count < 0)
++              return count;
++
++      return count == bytes ? 0 : -EIO;
+ }
+ static int rmem_probe(struct platform_device *pdev)
index fb84905980ddf61cdc7bf8850165173f5ece3db9..6fe88e8ff2420cdd8b56cc5b7883938ec552ed06 100644 (file)
@@ -115,3 +115,9 @@ usb-add-usb_quirk_no_set_intf-quirk-for-start-bp-850k.patch
 usb-gadget-configfs-prevent-oob-read-write-in-usb_string_copy.patch
 usb-core-fix-duplicate-endpoint-bug-by-clearing-reserved-bits-in-the-descriptor.patch
 hpet-support-32-bit-userspace.patch
+nvmem-rmem-fix-return-value-of-rmem_read.patch
+nvmem-meson-efuse-fix-return-value-of-nvmem-callbacks.patch
+nvmem-core-only-change-name-to-fram-for-current-attribute.patch
+alsa-hda-realtek-add-quirk-for-clevo-v50tu.patch
+alsa-hda-realtek-enable-mute-led-on-hp-250-g7.patch
+alsa-hda-realtek-limit-mic-boost-on-vaio-pro-px.patch