From 58a9eed88554209384875ed09119cfa14f74396c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 15 Jul 2024 12:22:16 +0200 Subject: [PATCH] 6.1-stable patches 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 platform-x86-toshiba_acpi-fix-array-out-of-bounds-access.patch --- ...da-realtek-add-quirk-for-clevo-v50tu.patch | 33 ++++++++++ ...realtek-enable-mute-led-on-hp-250-g7.patch | 31 +++++++++ ...altek-limit-mic-boost-on-vaio-pro-px.patch | 40 ++++++++++++ ...e-name-to-fram-for-current-attribute.patch | 43 +++++++++++++ ...-fix-return-value-of-nvmem-callbacks.patch | 63 +++++++++++++++++++ ...m-rmem-fix-return-value-of-rmem_read.patch | 47 ++++++++++++++ ..._acpi-fix-array-out-of-bounds-access.patch | 40 ++++++++++++ queue-6.1/series | 7 +++ 8 files changed, 304 insertions(+) create mode 100644 queue-6.1/alsa-hda-realtek-add-quirk-for-clevo-v50tu.patch create mode 100644 queue-6.1/alsa-hda-realtek-enable-mute-led-on-hp-250-g7.patch create mode 100644 queue-6.1/alsa-hda-realtek-limit-mic-boost-on-vaio-pro-px.patch create mode 100644 queue-6.1/nvmem-core-only-change-name-to-fram-for-current-attribute.patch create mode 100644 queue-6.1/nvmem-meson-efuse-fix-return-value-of-nvmem-callbacks.patch create mode 100644 queue-6.1/nvmem-rmem-fix-return-value-of-rmem_read.patch create mode 100644 queue-6.1/platform-x86-toshiba_acpi-fix-array-out-of-bounds-access.patch diff --git a/queue-6.1/alsa-hda-realtek-add-quirk-for-clevo-v50tu.patch b/queue-6.1/alsa-hda-realtek-add-quirk-for-clevo-v50tu.patch new file mode 100644 index 00000000000..3ccca0ddff5 --- /dev/null +++ b/queue-6.1/alsa-hda-realtek-add-quirk-for-clevo-v50tu.patch @@ -0,0 +1,33 @@ +From e1c6db864599be341cd3bcc041540383215ce05e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20Kope=C4=87?= +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ć + +commit e1c6db864599be341cd3bcc041540383215ce05e upstream. + +Apply quirk to fix combo jack detection on a new Clevo model: V5[46]0TU + +Signed-off-by: Michał Kopeć +Cc: +Link: https://patch.msgid.link/20240701111010.1496569-1-michal.kopec@3mdeb.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -10015,6 +10015,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-6.1/alsa-hda-realtek-enable-mute-led-on-hp-250-g7.patch b/queue-6.1/alsa-hda-realtek-enable-mute-led-on-hp-250-g7.patch new file mode 100644 index 00000000000..e011605ea92 --- /dev/null +++ b/queue-6.1/alsa-hda-realtek-enable-mute-led-on-hp-250-g7.patch @@ -0,0 +1,31 @@ +From b46953029c52bd3a3306ff79f631418b75384656 Mon Sep 17 00:00:00 2001 +From: Nazar Bilinskyi +Date: Tue, 9 Jul 2024 11:05:46 +0300 +Subject: ALSA: hda/realtek: Enable Mute LED on HP 250 G7 + +From: Nazar Bilinskyi + +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 +Cc: +Link: https://patch.msgid.link/20240709080546.18344-1-nbilinskyi@gmail.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -9661,6 +9661,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-6.1/alsa-hda-realtek-limit-mic-boost-on-vaio-pro-px.patch b/queue-6.1/alsa-hda-realtek-limit-mic-boost-on-vaio-pro-px.patch new file mode 100644 index 00000000000..8f38fb16e9d --- /dev/null +++ b/queue-6.1/alsa-hda-realtek-limit-mic-boost-on-vaio-pro-px.patch @@ -0,0 +1,40 @@ +From 6db03b1929e207d2c6e84e75a9cd78124b3d6c6d Mon Sep 17 00:00:00 2001 +From: Edson Juliano Drosdeck +Date: Fri, 5 Jul 2024 11:10:12 -0300 +Subject: ALSA: hda/realtek: Limit mic boost on VAIO PRO PX + +From: Edson Juliano Drosdeck + +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 +Cc: +Link: https://patch.msgid.link/20240705141012.5368-1-edson.drosdeck@gmail.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -9923,6 +9923,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), +@@ -10155,6 +10156,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-6.1/nvmem-core-only-change-name-to-fram-for-current-attribute.patch b/queue-6.1/nvmem-core-only-change-name-to-fram-for-current-attribute.patch new file mode 100644 index 00000000000..eabc95fe4e9 --- /dev/null +++ b/queue-6.1/nvmem-core-only-change-name-to-fram-for-current-attribute.patch @@ -0,0 +1,43 @@ +From 0ba424c934fd43dccf0d597e1ae8851f07cb2edf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +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 + +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 +Signed-off-by: Srinivas Kandagatla +Link: https://lore.kernel.org/r/20240628113704.13742-4-srinivas.kandagatla@linaro.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/nvmem/core.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/drivers/nvmem/core.c ++++ b/drivers/nvmem/core.c +@@ -367,10 +367,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-6.1/nvmem-meson-efuse-fix-return-value-of-nvmem-callbacks.patch b/queue-6.1/nvmem-meson-efuse-fix-return-value-of-nvmem-callbacks.patch new file mode 100644 index 00000000000..299621b3382 --- /dev/null +++ b/queue-6.1/nvmem-meson-efuse-fix-return-value-of-nvmem-callbacks.patch @@ -0,0 +1,63 @@ +From 7a0a6d0a7c805f9380381f4deedffdf87b93f408 Mon Sep 17 00:00:00 2001 +From: Joy Chakraborty +Date: Fri, 28 Jun 2024 12:37:02 +0100 +Subject: nvmem: meson-efuse: Fix return value of nvmem callbacks + +From: Joy Chakraborty + +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 +Reviewed-by: Dan Carpenter +Reviewed-by: Neil Armstrong +Signed-off-by: Srinivas Kandagatla +Link: https://lore.kernel.org/r/20240628113704.13742-3-srinivas.kandagatla@linaro.org +Signed-off-by: Greg Kroah-Hartman +--- + 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-6.1/nvmem-rmem-fix-return-value-of-rmem_read.patch b/queue-6.1/nvmem-rmem-fix-return-value-of-rmem_read.patch new file mode 100644 index 00000000000..a2c2f00aa86 --- /dev/null +++ b/queue-6.1/nvmem-rmem-fix-return-value-of-rmem_read.patch @@ -0,0 +1,47 @@ +From 28b008751aa295612318a0fbb2f22dd4f6a83139 Mon Sep 17 00:00:00 2001 +From: Joy Chakraborty +Date: Fri, 28 Jun 2024 12:37:01 +0100 +Subject: nvmem: rmem: Fix return value of rmem_read() + +From: Joy Chakraborty + +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 +Reviewed-by: Dan Carpenter +Signed-off-by: Srinivas Kandagatla +Link: https://lore.kernel.org/r/20240628113704.13742-2-srinivas.kandagatla@linaro.org +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Greg Kroah-Hartman +--- + 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) diff --git a/queue-6.1/platform-x86-toshiba_acpi-fix-array-out-of-bounds-access.patch b/queue-6.1/platform-x86-toshiba_acpi-fix-array-out-of-bounds-access.patch new file mode 100644 index 00000000000..3f8f7702b24 --- /dev/null +++ b/queue-6.1/platform-x86-toshiba_acpi-fix-array-out-of-bounds-access.patch @@ -0,0 +1,40 @@ +From b6e02c6b0377d4339986e07aeb696c632cd392aa Mon Sep 17 00:00:00 2001 +From: Armin Wolf +Date: Tue, 9 Jul 2024 16:38:51 +0200 +Subject: platform/x86: toshiba_acpi: Fix array out-of-bounds access + +From: Armin Wolf + +commit b6e02c6b0377d4339986e07aeb696c632cd392aa upstream. + +In order to use toshiba_dmi_quirks[] together with the standard DMI +matching functions, it must be terminated by a empty entry. + +Since this entry is missing, an array out-of-bounds access occurs +every time the quirk list is processed. + +Fix this by adding the terminating empty entry. + +Reported-by: kernel test robot +Closes: https://lore.kernel.org/oe-lkp/202407091536.8b116b3d-lkp@intel.com +Fixes: 3cb1f40dfdc3 ("drivers/platform: toshiba_acpi: Call HCI_PANEL_POWER_ON on resume on some models") +Cc: stable@vger.kernel.org +Signed-off-by: Armin Wolf +Link: https://lore.kernel.org/r/20240709143851.10097-1-W_Armin@gmx.de +Reviewed-by: Hans de Goede +Signed-off-by: Hans de Goede +Signed-off-by: Greg Kroah-Hartman +--- + drivers/platform/x86/toshiba_acpi.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/platform/x86/toshiba_acpi.c ++++ b/drivers/platform/x86/toshiba_acpi.c +@@ -3305,6 +3305,7 @@ static const struct dmi_system_id toshib + }, + .driver_data = (void *)(QUIRK_TURN_ON_PANEL_ON_RESUME | QUIRK_HCI_HOTKEY_QUICKSTART), + }, ++ { } + }; + + static int toshiba_acpi_add(struct acpi_device *acpi_dev) diff --git a/queue-6.1/series b/queue-6.1/series index 235abac03d0..be542d79d7d 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -60,3 +60,10 @@ usb-core-fix-duplicate-endpoint-bug-by-clearing-reserved-bits-in-the-descriptor. hpet-support-32-bit-userspace.patch xhci-always-resume-roothubs-if-xhc-was-reset-during-resume.patch ksmbd-discard-write-access-to-the-directory-open.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 +platform-x86-toshiba_acpi-fix-array-out-of-bounds-access.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 -- 2.47.3