From 73f6789ebc0038b5ff2e835dcd79f774589b1bea Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 15 Jul 2024 12:26:26 +0200 Subject: [PATCH] 6.6-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 arm64-dts-qcom-sa8775p-correct-irq-number-of-el2-non-secure-physical-timer.patch arm64-dts-qcom-sc8280xp-x13s-fix-touchscreen-power-on.patch iio-trigger-fix-condition-for-own-trigger.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 tty-serial-ma35d1-add-a-null-check-for-of_node.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 ++++++++++++ ...ber-of-el2-non-secure-physical-timer.patch | 36 ++++++++++ ...8280xp-x13s-fix-touchscreen-power-on.patch | 65 +++++++++++++++++++ ...rigger-fix-condition-for-own-trigger.patch | 41 ++++++++++++ ...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.6/series | 11 ++++ ...-ma35d1-add-a-null-check-for-of_node.patch | 51 +++++++++++++++ 12 files changed, 501 insertions(+) create mode 100644 queue-6.6/alsa-hda-realtek-add-quirk-for-clevo-v50tu.patch create mode 100644 queue-6.6/alsa-hda-realtek-enable-mute-led-on-hp-250-g7.patch create mode 100644 queue-6.6/alsa-hda-realtek-limit-mic-boost-on-vaio-pro-px.patch create mode 100644 queue-6.6/arm64-dts-qcom-sa8775p-correct-irq-number-of-el2-non-secure-physical-timer.patch create mode 100644 queue-6.6/arm64-dts-qcom-sc8280xp-x13s-fix-touchscreen-power-on.patch create mode 100644 queue-6.6/iio-trigger-fix-condition-for-own-trigger.patch create mode 100644 queue-6.6/nvmem-core-only-change-name-to-fram-for-current-attribute.patch create mode 100644 queue-6.6/nvmem-meson-efuse-fix-return-value-of-nvmem-callbacks.patch create mode 100644 queue-6.6/nvmem-rmem-fix-return-value-of-rmem_read.patch create mode 100644 queue-6.6/platform-x86-toshiba_acpi-fix-array-out-of-bounds-access.patch create mode 100644 queue-6.6/tty-serial-ma35d1-add-a-null-check-for-of_node.patch diff --git a/queue-6.6/alsa-hda-realtek-add-quirk-for-clevo-v50tu.patch b/queue-6.6/alsa-hda-realtek-add-quirk-for-clevo-v50tu.patch new file mode 100644 index 00000000000..0d714d4ea10 --- /dev/null +++ b/queue-6.6/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 +@@ -10182,6 +10182,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.6/alsa-hda-realtek-enable-mute-led-on-hp-250-g7.patch b/queue-6.6/alsa-hda-realtek-enable-mute-led-on-hp-250-g7.patch new file mode 100644 index 00000000000..a862aacf2c0 --- /dev/null +++ b/queue-6.6/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 +@@ -9817,6 +9817,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.6/alsa-hda-realtek-limit-mic-boost-on-vaio-pro-px.patch b/queue-6.6/alsa-hda-realtek-limit-mic-boost-on-vaio-pro-px.patch new file mode 100644 index 00000000000..21e6ef59c49 --- /dev/null +++ b/queue-6.6/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 +@@ -10087,6 +10087,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), +@@ -10340,6 +10341,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.6/arm64-dts-qcom-sa8775p-correct-irq-number-of-el2-non-secure-physical-timer.patch b/queue-6.6/arm64-dts-qcom-sa8775p-correct-irq-number-of-el2-non-secure-physical-timer.patch new file mode 100644 index 00000000000..61221a04e3c --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sa8775p-correct-irq-number-of-el2-non-secure-physical-timer.patch @@ -0,0 +1,36 @@ +From 41fca5930afb36453cc90d4002841edd9990d0ad Mon Sep 17 00:00:00 2001 +From: Cong Zhang +Date: Tue, 4 Jun 2024 16:59:29 +0800 +Subject: arm64: dts: qcom: sa8775p: Correct IRQ number of EL2 non-secure physical timer + +From: Cong Zhang + +commit 41fca5930afb36453cc90d4002841edd9990d0ad upstream. + +The INTID of EL2 non-secure physical timer is 26. In linux, the IRQ +number has a fixed 16 offset for PPIs. Therefore, the linux IRQ number +of EL2 non-secure physical timer should be 10 (26 - 16). + +Fixes: 603f96d4c9d0 ("arm64: dts: qcom: add initial support for qcom sa8775p-ride") +Signed-off-by: Cong Zhang +Reviewed-by: Krzysztof Kozlowski +Reviewed-by: Konrad Dybcio +Cc: +Link: https://lore.kernel.org/r/20240604085929.49227-1-quic_congzhan@quicinc.com +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sa8775p.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi ++++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi +@@ -2398,7 +2398,7 @@ + interrupts = , + , + , +- ; ++ ; + }; + + pcie0: pci@1c00000{ diff --git a/queue-6.6/arm64-dts-qcom-sc8280xp-x13s-fix-touchscreen-power-on.patch b/queue-6.6/arm64-dts-qcom-sc8280xp-x13s-fix-touchscreen-power-on.patch new file mode 100644 index 00000000000..53e0a0aa380 --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sc8280xp-x13s-fix-touchscreen-power-on.patch @@ -0,0 +1,65 @@ +From 7bfb6a4289b0a63d67ec7d4ce3018cb4a7442f6a Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Tue, 7 May 2024 16:48:19 +0200 +Subject: arm64: dts: qcom: sc8280xp-x13s: fix touchscreen power on + +From: Johan Hovold + +commit 7bfb6a4289b0a63d67ec7d4ce3018cb4a7442f6a upstream. + +The Elan eKTH5015M touch controller on the X13s requires a 300 ms delay +before sending commands after having deasserted reset during power on. + +Switch to the Elan specific binding so that the OS can determine the +required power-on sequence and make sure that the controller is always +detected during boot. + +Note that the always-on 1.8 V supply (s10b) is not used by the +controller directly and should not be described. + +Fixes: 32c231385ed4 ("arm64: dts: qcom: sc8280xp: add Lenovo Thinkpad X13s devicetree") +Cc: stable@vger.kernel.org # 6.0 +Tested-by: Steev Klimaszewski +Signed-off-by: Johan Hovold +Link: https://lore.kernel.org/r/20240507144821.12275-6-johan+linaro@kernel.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 15 ++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts ++++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +@@ -619,15 +619,16 @@ + + status = "okay"; + +- /* FIXME: verify */ + touchscreen@10 { +- compatible = "hid-over-i2c"; ++ compatible = "elan,ekth5015m", "elan,ekth6915"; + reg = <0x10>; + +- hid-descr-addr = <0x1>; + interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>; +- vdd-supply = <&vreg_misc_3p3>; +- vddl-supply = <&vreg_s10b>; ++ reset-gpios = <&tlmm 99 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; ++ no-reset-on-power-off; ++ ++ vcc33-supply = <&vreg_misc_3p3>; ++ vccio-supply = <&vreg_misc_3p3>; + + pinctrl-names = "default"; + pinctrl-0 = <&ts0_default>; +@@ -1451,8 +1452,8 @@ + reset-n-pins { + pins = "gpio99"; + function = "gpio"; +- output-high; +- drive-strength = <16>; ++ drive-strength = <2>; ++ bias-disable; + }; + }; + diff --git a/queue-6.6/iio-trigger-fix-condition-for-own-trigger.patch b/queue-6.6/iio-trigger-fix-condition-for-own-trigger.patch new file mode 100644 index 00000000000..7c11566422e --- /dev/null +++ b/queue-6.6/iio-trigger-fix-condition-for-own-trigger.patch @@ -0,0 +1,41 @@ +From 74cb21576ea5247efbbb7d92f71cafee12159cd9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Gon=C3=A7alves?= + +Date: Fri, 14 Jun 2024 11:36:58 -0300 +Subject: iio: trigger: Fix condition for own trigger +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: João Paulo Gonçalves + +commit 74cb21576ea5247efbbb7d92f71cafee12159cd9 upstream. + +The condition for checking if triggers belong to the same IIO device to +set attached_own_device is currently inverted, causing +iio_trigger_using_own() to return an incorrect value. Fix it by testing +for the correct return value of iio_validate_own_trigger(). + +Cc: stable@vger.kernel.org +Fixes: 517985ebc531 ("iio: trigger: Add simple trigger_validation helper") +Signed-off-by: João Paulo Gonçalves +Reviewed-by: Francesco Dolcini +Reviewed-by: Matti Vaittinen +Link: https://lore.kernel.org/r/20240614143658.3531097-1-jpaulo.silvagoncalves@gmail.com +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman +--- + drivers/iio/industrialio-trigger.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/iio/industrialio-trigger.c ++++ b/drivers/iio/industrialio-trigger.c +@@ -322,7 +322,7 @@ int iio_trigger_attach_poll_func(struct + * this is the case if the IIO device and the trigger device share the + * same parent device. + */ +- if (iio_validate_own_trigger(pf->indio_dev, trig)) ++ if (!iio_validate_own_trigger(pf->indio_dev, trig)) + trig->attached_own_device = true; + + return ret; diff --git a/queue-6.6/nvmem-core-only-change-name-to-fram-for-current-attribute.patch b/queue-6.6/nvmem-core-only-change-name-to-fram-for-current-attribute.patch new file mode 100644 index 00000000000..3ee58db43cd --- /dev/null +++ b/queue-6.6/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 +@@ -374,10 +374,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.6/nvmem-meson-efuse-fix-return-value-of-nvmem-callbacks.patch b/queue-6.6/nvmem-meson-efuse-fix-return-value-of-nvmem-callbacks.patch new file mode 100644 index 00000000000..299621b3382 --- /dev/null +++ b/queue-6.6/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.6/nvmem-rmem-fix-return-value-of-rmem_read.patch b/queue-6.6/nvmem-rmem-fix-return-value-of-rmem_read.patch new file mode 100644 index 00000000000..a2c2f00aa86 --- /dev/null +++ b/queue-6.6/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.6/platform-x86-toshiba_acpi-fix-array-out-of-bounds-access.patch b/queue-6.6/platform-x86-toshiba_acpi-fix-array-out-of-bounds-access.patch new file mode 100644 index 00000000000..c60b53ef645 --- /dev/null +++ b/queue-6.6/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 +@@ -3303,6 +3303,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.6/series b/queue-6.6/series index 8922a532891..d134f82d6ad 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -73,3 +73,14 @@ mm-vmalloc-check-if-a-hash-index-is-in-cpu_possible_mask.patch mm-filemap-skip-to-create-pmd-sized-page-cache-if-needed.patch mm-filemap-make-max_pagecache_order-acceptable-to-xarray.patch ksmbd-discard-write-access-to-the-directory-open.patch +iio-trigger-fix-condition-for-own-trigger.patch +arm64-dts-qcom-sa8775p-correct-irq-number-of-el2-non-secure-physical-timer.patch +arm64-dts-qcom-sc8280xp-x13s-fix-touchscreen-power-on.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 +tty-serial-ma35d1-add-a-null-check-for-of_node.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 diff --git a/queue-6.6/tty-serial-ma35d1-add-a-null-check-for-of_node.patch b/queue-6.6/tty-serial-ma35d1-add-a-null-check-for-of_node.patch new file mode 100644 index 00000000000..fc07b087876 --- /dev/null +++ b/queue-6.6/tty-serial-ma35d1-add-a-null-check-for-of_node.patch @@ -0,0 +1,51 @@ +From acd09ac253b5de8fd79fc61a482ee19154914c7a Mon Sep 17 00:00:00 2001 +From: Jacky Huang +Date: Tue, 25 Jun 2024 06:41:28 +0000 +Subject: tty: serial: ma35d1: Add a NULL check for of_node + +From: Jacky Huang + +commit acd09ac253b5de8fd79fc61a482ee19154914c7a upstream. + +The pdev->dev.of_node can be NULL if the "serial" node is absent. +Add a NULL check to return an error in such cases. + +Fixes: 930cbf92db01 ("tty: serial: Add Nuvoton ma35d1 serial driver support") +Reported-by: Dan Carpenter +Closes: https://lore.kernel.org/all/8df7ce45-fd58-4235-88f7-43fe7cd67e8f@moroto.mountain/ +Signed-off-by: Jacky Huang +Reviewed-by: Dan Carpenter +Cc: stable +Link: https://lore.kernel.org/r/20240625064128.127-1-ychuang570808@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/tty/serial/ma35d1_serial.c | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/drivers/tty/serial/ma35d1_serial.c b/drivers/tty/serial/ma35d1_serial.c +index 19f0a305cc43..3b4206e815fe 100644 +--- a/drivers/tty/serial/ma35d1_serial.c ++++ b/drivers/tty/serial/ma35d1_serial.c +@@ -688,12 +688,13 @@ static int ma35d1serial_probe(struct platform_device *pdev) + struct uart_ma35d1_port *up; + int ret = 0; + +- if (pdev->dev.of_node) { +- ret = of_alias_get_id(pdev->dev.of_node, "serial"); +- if (ret < 0) { +- dev_err(&pdev->dev, "failed to get alias/pdev id, errno %d\n", ret); +- return ret; +- } ++ if (!pdev->dev.of_node) ++ return -ENODEV; ++ ++ ret = of_alias_get_id(pdev->dev.of_node, "serial"); ++ if (ret < 0) { ++ dev_err(&pdev->dev, "failed to get alias/pdev id, errno %d\n", ret); ++ return ret; + } + up = &ma35d1serial_ports[ret]; + up->port.line = ret; +-- +2.45.2 + -- 2.47.3