From 4cf677bc19b62e3a1d2646092fea76132cba5572 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Sat, 23 Nov 2024 05:44:06 -0500 Subject: [PATCH] Fixes for 6.1 Signed-off-by: Sasha Levin --- ...-add-subwoofer-quirk-for-infinix-zer.patch | 67 ++++++++ ...b-audio-fix-yamaha-p-125-quirk-entry.patch | 56 +++++++ ...m-9420-1-smp-fix-smp-for-xip-kernels.patch | 84 ++++++++++ ...ort-dmic-on-another-model-of-lenovo-.patch | 42 +++++ ...-card2-purge-absent-supplies-for-dev.patch | 54 +++++++ ..._rt5640-add-dmi-quirk-for-vexia-edu-.patch | 53 +++++++ ..._rt5640-add-support-for-non-acpi-ins.patch | 93 +++++++++++ ...c-intel-sst-support-lpe0f28-acpi-hid.patch | 146 ++++++++++++++++++ ...-potential-division-by-zero-in-stm32.patch | 40 +++++ ...ntial-division-by-zero-in-stm32.patch-7602 | 39 +++++ .../bpf-fix-filed-access-without-lock.patch | 64 ++++++++ ...939-fix-error-in-j1939-documentation.patch | 40 +++++ ...ation-quirks-make-lenovo-yoga-tab-3-.patch | 42 +++++ ...-to-mfc_cache_list-without-lock-held.patch | 76 +++++++++ ...-a-default-value-for-vm_data_default.patch | 42 +++++ ...ix-user-power-when-emulating-chanctx.patch | 37 +++++ .../net-usb-qmi_wwan-add-quectel-rg650v.patch | 65 ++++++++ ...l-smbios-base-extends-support-to-ali.patch | 51 ++++++ ...l-wmi-base-handle-meta-key-lock-unlo.patch | 52 +++++++ ...nkpad_acpi-fix-for-thinkpad-s-with-e.patch | 111 +++++++++++++ ...place-seq_printf-with-seq_put_decima.patch | 39 +++++ ...808-add-apply_bit-for-buck3-on-rk809.patch | 43 ++++++ ...og-test-fix-system-accidentally-rese.patch | 58 +++++++ queue-6.1/series | 28 ++++ ...-check-devm_kasprintf-returned-value.patch | 45 ++++++ ...l-remove-the-thermal.h-soft-link-whe.patch | 39 +++++ ...for-new-usb-device-id-0x17ef-0x3098-.patch | 41 +++++ ...-use-the-sync-timepoint-api-in-suspe.patch | 64 ++++++++ ...ompile-testing-without-config_amd_nb.patch | 53 +++++++ 29 files changed, 1664 insertions(+) create mode 100644 queue-6.1/alsa-hda-realtek-add-subwoofer-quirk-for-infinix-zer.patch create mode 100644 queue-6.1/alsa-usb-audio-fix-yamaha-p-125-quirk-entry.patch create mode 100644 queue-6.1/arm-9420-1-smp-fix-smp-for-xip-kernels.patch create mode 100644 queue-6.1/asoc-amd-yc-support-dmic-on-another-model-of-lenovo-.patch create mode 100644 queue-6.1/asoc-audio-graph-card2-purge-absent-supplies-for-dev.patch create mode 100644 queue-6.1/asoc-intel-bytcr_rt5640-add-dmi-quirk-for-vexia-edu-.patch create mode 100644 queue-6.1/asoc-intel-bytcr_rt5640-add-support-for-non-acpi-ins.patch create mode 100644 queue-6.1/asoc-intel-sst-support-lpe0f28-acpi-hid.patch create mode 100644 queue-6.1/asoc-stm-prevent-potential-division-by-zero-in-stm32.patch create mode 100644 queue-6.1/asoc-stm-prevent-potential-division-by-zero-in-stm32.patch-7602 create mode 100644 queue-6.1/bpf-fix-filed-access-without-lock.patch create mode 100644 queue-6.1/can-j1939-fix-error-in-j1939-documentation.patch create mode 100644 queue-6.1/drm-panel-orientation-quirks-make-lenovo-yoga-tab-3-.patch create mode 100644 queue-6.1/ipmr-fix-access-to-mfc_cache_list-without-lock-held.patch create mode 100644 queue-6.1/loongarch-define-a-default-value-for-vm_data_default.patch create mode 100644 queue-6.1/mac80211-fix-user-power-when-emulating-chanctx.patch create mode 100644 queue-6.1/net-usb-qmi_wwan-add-quectel-rg650v.patch create mode 100644 queue-6.1/platform-x86-dell-smbios-base-extends-support-to-ali.patch create mode 100644 queue-6.1/platform-x86-dell-wmi-base-handle-meta-key-lock-unlo.patch create mode 100644 queue-6.1/platform-x86-thinkpad_acpi-fix-for-thinkpad-s-with-e.patch create mode 100644 queue-6.1/proc-softirqs-replace-seq_printf-with-seq_put_decima.patch create mode 100644 queue-6.1/regulator-rk808-add-apply_bit-for-buck3-on-rk809.patch create mode 100644 queue-6.1/selftests-watchdog-test-fix-system-accidentally-rese.patch create mode 100644 queue-6.1/series create mode 100644 queue-6.1/soc-qcom-add-check-devm_kasprintf-returned-value.patch create mode 100644 queue-6.1/tools-lib-thermal-remove-the-thermal.h-soft-link-whe.patch create mode 100644 queue-6.1/usb-add-support-for-new-usb-device-id-0x17ef-0x3098-.patch create mode 100644 queue-6.1/wifi-iwlwifi-mvm-use-the-sync-timepoint-api-in-suspe.patch create mode 100644 queue-6.1/x86-amd_nb-fix-compile-testing-without-config_amd_nb.patch diff --git a/queue-6.1/alsa-hda-realtek-add-subwoofer-quirk-for-infinix-zer.patch b/queue-6.1/alsa-hda-realtek-add-subwoofer-quirk-for-infinix-zer.patch new file mode 100644 index 00000000000..e777fe00b3c --- /dev/null +++ b/queue-6.1/alsa-hda-realtek-add-subwoofer-quirk-for-infinix-zer.patch @@ -0,0 +1,67 @@ +From b7f1717c9abee402462ca0f158b922c80bc39f98 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 28 Oct 2024 15:55:16 +0000 +Subject: ALSA: hda/realtek: Add subwoofer quirk for Infinix ZERO BOOK 13 + +From: Piyush Raj Chouhan + +[ Upstream commit ef5fbdf732a158ec27eeba69d8be851351f29f73 ] + +Infinix ZERO BOOK 13 has a 2+2 speaker system which isn't probed correctly. +This patch adds a quirk with the proper pin connections. +Also The mic in this laptop suffers too high gain resulting in mostly +fan noise being recorded, +This patch Also limit mic boost. + +HW Probe for device; https://linux-hardware.org/?probe=a2e892c47b + +Test: All 4 speaker works, Mic has low noise. + +Signed-off-by: Piyush Raj Chouhan +Link: https://patch.msgid.link/20241028155516.15552-1-piyuschouhan1598@gmail.com +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/pci/hda/patch_realtek.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index a56ec9bd90fae..f3e368f82be9b 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -7190,6 +7190,7 @@ enum { + ALC290_FIXUP_SUBWOOFER_HSJACK, + ALC269_FIXUP_THINKPAD_ACPI, + ALC269_FIXUP_DMIC_THINKPAD_ACPI, ++ ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13, + ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO, + ALC255_FIXUP_ACER_MIC_NO_PRESENCE, + ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, +@@ -7542,6 +7543,16 @@ static const struct hda_fixup alc269_fixups[] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc269_fixup_pincfg_U7x7_headset_mic, + }, ++ [ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13] = { ++ .type = HDA_FIXUP_PINS, ++ .v.pins = (const struct hda_pintbl[]) { ++ { 0x14, 0x90170151 }, /* use as internal speaker (LFE) */ ++ { 0x1b, 0x90170152 }, /* use as internal speaker (back) */ ++ { } ++ }, ++ .chained = true, ++ .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST ++ }, + [ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl[]) { +@@ -10224,6 +10235,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { + 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, 0x0228, "Infinix ZERO BOOK 13", ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13), + 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), +-- +2.43.0 + diff --git a/queue-6.1/alsa-usb-audio-fix-yamaha-p-125-quirk-entry.patch b/queue-6.1/alsa-usb-audio-fix-yamaha-p-125-quirk-entry.patch new file mode 100644 index 00000000000..60eb666fd33 --- /dev/null +++ b/queue-6.1/alsa-usb-audio-fix-yamaha-p-125-quirk-entry.patch @@ -0,0 +1,56 @@ +From 6b2b8e6cb80263ad3826eb610ee1f9636cf3a572 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 11 Nov 2024 11:45:21 -0500 +Subject: ALSA: usb-audio: Fix Yamaha P-125 Quirk Entry + +From: Eryk Zagorski + +[ Upstream commit 6f891ca15b017707840c9e7f5afd9fc6cfd7d8b1 ] + +This patch switches the P-125 quirk entry to use a composite quirk as the +P-125 supplies both MIDI and Audio like many of the other Yamaha +keyboards + +Signed-off-by: Eryk Zagorski +Link: https://patch.msgid.link/20241111164520.9079-2-erykzagorski@gmail.com +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/usb/quirks-table.h | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h +index 75cde5779f38d..d1bd8e0d60252 100644 +--- a/sound/usb/quirks-table.h ++++ b/sound/usb/quirks-table.h +@@ -324,7 +324,6 @@ YAMAHA_DEVICE(0x105a, NULL), + YAMAHA_DEVICE(0x105b, NULL), + YAMAHA_DEVICE(0x105c, NULL), + YAMAHA_DEVICE(0x105d, NULL), +-YAMAHA_DEVICE(0x1718, "P-125"), + { + USB_DEVICE(0x0499, 0x1503), + QUIRK_DRIVER_INFO { +@@ -391,6 +390,19 @@ YAMAHA_DEVICE(0x1718, "P-125"), + } + } + }, ++{ ++ USB_DEVICE(0x0499, 0x1718), ++ QUIRK_DRIVER_INFO { ++ /* .vendor_name = "Yamaha", */ ++ /* .product_name = "P-125", */ ++ QUIRK_DATA_COMPOSITE { ++ { QUIRK_DATA_STANDARD_AUDIO(1) }, ++ { QUIRK_DATA_STANDARD_AUDIO(2) }, ++ { QUIRK_DATA_MIDI_YAMAHA(3) }, ++ QUIRK_COMPOSITE_END ++ } ++ } ++}, + YAMAHA_DEVICE(0x2000, "DGP-7"), + YAMAHA_DEVICE(0x2001, "DGP-5"), + YAMAHA_DEVICE(0x2002, NULL), +-- +2.43.0 + diff --git a/queue-6.1/arm-9420-1-smp-fix-smp-for-xip-kernels.patch b/queue-6.1/arm-9420-1-smp-fix-smp-for-xip-kernels.patch new file mode 100644 index 00000000000..f16a19e4c07 --- /dev/null +++ b/queue-6.1/arm-9420-1-smp-fix-smp-for-xip-kernels.patch @@ -0,0 +1,84 @@ +From 0bd474cc8c7a4e06c536bfd4cbda4b744b873ff4 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 18 Sep 2024 06:57:53 +0100 +Subject: ARM: 9420/1: smp: Fix SMP for xip kernels + +From: Harith G + +[ Upstream commit 9e9b0cf9319b4db143014477b0bc4b39894248f1 ] + +Fix the physical address calculation of the following to get smp working +on xip kernels. +- secondary_data needed for secondary cpu bootup. +- secondary_startup address passed through psci. +- identity mapped code region needed for enabling mmu for secondary cpus. + +Signed-off-by: Harith George +Reviewed-by: Linus Walleij +Signed-off-by: Russell King (Oracle) +Signed-off-by: Sasha Levin +--- + arch/arm/kernel/head.S | 4 ++++ + arch/arm/kernel/psci_smp.c | 7 +++++++ + arch/arm/mm/idmap.c | 7 +++++++ + 3 files changed, 18 insertions(+) + +diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S +index b97da9e069a06..21930b9ac1c4c 100644 +--- a/arch/arm/kernel/head.S ++++ b/arch/arm/kernel/head.S +@@ -411,7 +411,11 @@ ENTRY(secondary_startup) + /* + * Use the page tables supplied from __cpu_up. + */ ++#ifdef CONFIG_XIP_KERNEL ++ ldr r3, =(secondary_data + PLAT_PHYS_OFFSET - PAGE_OFFSET) ++#else + adr_l r3, secondary_data ++#endif + mov_l r12, __secondary_switched + ldrd r4, r5, [r3, #0] @ get secondary_data.pgdir + ARM_BE8(eor r4, r4, r5) @ Swap r5 and r4 in BE: +diff --git a/arch/arm/kernel/psci_smp.c b/arch/arm/kernel/psci_smp.c +index d4392e1774848..3bb0c4dcfc5c9 100644 +--- a/arch/arm/kernel/psci_smp.c ++++ b/arch/arm/kernel/psci_smp.c +@@ -45,8 +45,15 @@ extern void secondary_startup(void); + static int psci_boot_secondary(unsigned int cpu, struct task_struct *idle) + { + if (psci_ops.cpu_on) ++#ifdef CONFIG_XIP_KERNEL ++ return psci_ops.cpu_on(cpu_logical_map(cpu), ++ ((phys_addr_t)(&secondary_startup) ++ - XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR) ++ + CONFIG_XIP_PHYS_ADDR)); ++#else + return psci_ops.cpu_on(cpu_logical_map(cpu), + virt_to_idmap(&secondary_startup)); ++#endif + return -ENODEV; + } + +diff --git a/arch/arm/mm/idmap.c b/arch/arm/mm/idmap.c +index 448e57c6f6534..4a833e89782aa 100644 +--- a/arch/arm/mm/idmap.c ++++ b/arch/arm/mm/idmap.c +@@ -84,8 +84,15 @@ static void identity_mapping_add(pgd_t *pgd, const char *text_start, + unsigned long addr, end; + unsigned long next; + ++#ifdef CONFIG_XIP_KERNEL ++ addr = (phys_addr_t)(text_start) - XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR) ++ + CONFIG_XIP_PHYS_ADDR; ++ end = (phys_addr_t)(text_end) - XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR) ++ + CONFIG_XIP_PHYS_ADDR; ++#else + addr = virt_to_idmap(text_start); + end = virt_to_idmap(text_end); ++#endif + pr_info("Setting up static identity map for 0x%lx - 0x%lx\n", addr, end); + + prot |= PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AF; +-- +2.43.0 + diff --git a/queue-6.1/asoc-amd-yc-support-dmic-on-another-model-of-lenovo-.patch b/queue-6.1/asoc-amd-yc-support-dmic-on-another-model-of-lenovo-.patch new file mode 100644 index 00000000000..085d7a77041 --- /dev/null +++ b/queue-6.1/asoc-amd-yc-support-dmic-on-another-model-of-lenovo-.patch @@ -0,0 +1,42 @@ +From 50894a9fbd1ea2556819866417a0367fc7afe9d4 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 7 Nov 2024 10:40:20 +0100 +Subject: ASoC: amd: yc: Support dmic on another model of Lenovo Thinkpad E14 + Gen 6 + +From: Markus Petri + +[ Upstream commit 8c21e40e1e481f7fef6e570089e317068b972c45 ] + +Another model of Thinkpad E14 Gen 6 (21M4) +needs a quirk entry for the dmic to be detected. + +Signed-off-by: Markus Petri +Link: https://patch.msgid.link/20241107094020.1050935-1-mp@localhost +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/amd/yc/acp6x-mach.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c +index c18549759eab1..f46158b840a51 100644 +--- a/sound/soc/amd/yc/acp6x-mach.c ++++ b/sound/soc/amd/yc/acp6x-mach.c +@@ -227,6 +227,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = { + DMI_MATCH(DMI_PRODUCT_NAME, "21M3"), + } + }, ++ { ++ .driver_data = &acp6x_card, ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "21M4"), ++ } ++ }, + { + .driver_data = &acp6x_card, + .matches = { +-- +2.43.0 + diff --git a/queue-6.1/asoc-audio-graph-card2-purge-absent-supplies-for-dev.patch b/queue-6.1/asoc-audio-graph-card2-purge-absent-supplies-for-dev.patch new file mode 100644 index 00000000000..5b96fedac79 --- /dev/null +++ b/queue-6.1/asoc-audio-graph-card2-purge-absent-supplies-for-dev.patch @@ -0,0 +1,54 @@ +From ee7eeb463cbf998bc9c0a62eec017e646dfe9d87 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 8 Nov 2024 12:37:15 +1100 +Subject: ASoC: audio-graph-card2: Purge absent supplies for device tree nodes + +From: John Watts + +[ Upstream commit f8da001ae7af0abd9f6250c02c01a1121074ca60 ] + +The audio graph card doesn't mark its subnodes such as multi {}, dpcm {} +and c2c {} as not requiring any suppliers. This causes a hang as Linux +waits for these phantom suppliers to show up on boot. +Make it clear these nodes have no suppliers. + +Example error message: +[ 15.208558] platform 2034000.i2s: deferred probe pending: platform: wait for supplier /sound/multi +[ 15.208584] platform sound: deferred probe pending: asoc-audio-graph-card2: parse error + +Signed-off-by: John Watts +Acked-by: Kuninori Morimoto +Link: https://patch.msgid.link/20241108-graph_dt_fix-v1-1-173e2f9603d6@jookia.org +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/generic/audio-graph-card2.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c +index 8ac6df645ee6c..33f35eaa76a8b 100644 +--- a/sound/soc/generic/audio-graph-card2.c ++++ b/sound/soc/generic/audio-graph-card2.c +@@ -249,16 +249,19 @@ static enum graph_type __graph_get_type(struct device_node *lnk) + + if (of_node_name_eq(np, GRAPH_NODENAME_MULTI)) { + ret = GRAPH_MULTI; ++ fw_devlink_purge_absent_suppliers(&np->fwnode); + goto out_put; + } + + if (of_node_name_eq(np, GRAPH_NODENAME_DPCM)) { + ret = GRAPH_DPCM; ++ fw_devlink_purge_absent_suppliers(&np->fwnode); + goto out_put; + } + + if (of_node_name_eq(np, GRAPH_NODENAME_C2C)) { + ret = GRAPH_C2C; ++ fw_devlink_purge_absent_suppliers(&np->fwnode); + goto out_put; + } + +-- +2.43.0 + diff --git a/queue-6.1/asoc-intel-bytcr_rt5640-add-dmi-quirk-for-vexia-edu-.patch b/queue-6.1/asoc-intel-bytcr_rt5640-add-dmi-quirk-for-vexia-edu-.patch new file mode 100644 index 00000000000..638bded3b91 --- /dev/null +++ b/queue-6.1/asoc-intel-bytcr_rt5640-add-dmi-quirk-for-vexia-edu-.patch @@ -0,0 +1,53 @@ +From 7dc96ae3add65aa8f42d5aa9c18f1e77bef9b34b Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 24 Oct 2024 23:16:15 +0200 +Subject: ASoC: Intel: bytcr_rt5640: Add DMI quirk for Vexia Edu Atla 10 tablet + +From: Hans de Goede + +[ Upstream commit 0107f28f135231da22a9ad5756bb16bd5cada4d5 ] + +The Vexia Edu Atla 10 tablet mostly uses the BYTCR tablet defaults, +but as happens on more models it is using IN1 instead of IN3 for +its internal mic and JD_SRC_JD2_IN4N instead of JD_SRC_JD1_IN4P +for jack-detection. + +Add a DMI quirk for this to fix the internal-mic and jack-detection. + +Signed-off-by: Hans de Goede +Link: https://patch.msgid.link/20241024211615.79518-2-hdegoede@redhat.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/intel/boards/bytcr_rt5640.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c +index 7a57d7abd3803..e7d20011e2884 100644 +--- a/sound/soc/intel/boards/bytcr_rt5640.c ++++ b/sound/soc/intel/boards/bytcr_rt5640.c +@@ -1122,6 +1122,21 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = { + BYT_RT5640_SSP0_AIF2 | + BYT_RT5640_MCLK_EN), + }, ++ { /* Vexia Edu Atla 10 tablet */ ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), ++ DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"), ++ /* Above strings are too generic, also match on BIOS date */ ++ DMI_MATCH(DMI_BIOS_DATE, "08/25/2014"), ++ }, ++ .driver_data = (void *)(BYT_RT5640_IN1_MAP | ++ BYT_RT5640_JD_SRC_JD2_IN4N | ++ BYT_RT5640_OVCD_TH_2000UA | ++ BYT_RT5640_OVCD_SF_0P75 | ++ BYT_RT5640_DIFF_MIC | ++ BYT_RT5640_SSP0_AIF2 | ++ BYT_RT5640_MCLK_EN), ++ }, + { /* Voyo Winpad A15 */ + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), +-- +2.43.0 + diff --git a/queue-6.1/asoc-intel-bytcr_rt5640-add-support-for-non-acpi-ins.patch b/queue-6.1/asoc-intel-bytcr_rt5640-add-support-for-non-acpi-ins.patch new file mode 100644 index 00000000000..9b06f5b2a5c --- /dev/null +++ b/queue-6.1/asoc-intel-bytcr_rt5640-add-support-for-non-acpi-ins.patch @@ -0,0 +1,93 @@ +From 89d4c7e4eee19294502400987046f531b5a54215 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 24 Oct 2024 23:16:14 +0200 +Subject: ASoC: Intel: bytcr_rt5640: Add support for non ACPI instantiated + codec +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Hans de Goede + +[ Upstream commit d48696b915527b5bcdd207a299aec03fb037eb17 ] + +On some x86 Bay Trail tablets which shipped with Android as factory OS, +the DSDT is so broken that the codec needs to be manually instantatiated +by the special x86-android-tablets.ko "fixup" driver for cases like this. + +This means that the codec-dev cannot be retrieved through its ACPI fwnode, +add support to the bytcr_rt5640 machine driver for such manually +instantiated rt5640 i2c_clients. + +An example of a tablet which needs this is the Vexia EDU ATLA 10 tablet, +which has been distributed to schools in the Spanish Andalucía region. + +Signed-off-by: Hans de Goede +Link: https://patch.msgid.link/20241024211615.79518-1-hdegoede@redhat.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/intel/boards/bytcr_rt5640.c | 33 ++++++++++++++++++++++++--- + 1 file changed, 30 insertions(+), 3 deletions(-) + +diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c +index ff879e173d51d..7a57d7abd3803 100644 +--- a/sound/soc/intel/boards/bytcr_rt5640.c ++++ b/sound/soc/intel/boards/bytcr_rt5640.c +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -32,6 +33,8 @@ + #include "../atom/sst-atom-controls.h" + #include "../common/soc-intel-quirks.h" + ++#define BYT_RT5640_FALLBACK_CODEC_DEV_NAME "i2c-rt5640" ++ + enum { + BYT_RT5640_DMIC1_MAP, + BYT_RT5640_DMIC2_MAP, +@@ -1687,9 +1690,33 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) + + codec_dev = acpi_get_first_physical_node(adev); + acpi_dev_put(adev); +- if (!codec_dev) +- return -EPROBE_DEFER; +- priv->codec_dev = get_device(codec_dev); ++ ++ if (codec_dev) { ++ priv->codec_dev = get_device(codec_dev); ++ } else { ++ /* ++ * Special case for Android tablets where the codec i2c_client ++ * has been manually instantiated by x86_android_tablets.ko due ++ * to a broken DSDT. ++ */ ++ codec_dev = bus_find_device_by_name(&i2c_bus_type, NULL, ++ BYT_RT5640_FALLBACK_CODEC_DEV_NAME); ++ if (!codec_dev) ++ return -EPROBE_DEFER; ++ ++ if (!i2c_verify_client(codec_dev)) { ++ dev_err(dev, "Error '%s' is not an i2c_client\n", ++ BYT_RT5640_FALLBACK_CODEC_DEV_NAME); ++ put_device(codec_dev); ++ } ++ ++ /* fixup codec name */ ++ strscpy(byt_rt5640_codec_name, BYT_RT5640_FALLBACK_CODEC_DEV_NAME, ++ sizeof(byt_rt5640_codec_name)); ++ ++ /* bus_find_device() returns a reference no need to get() */ ++ priv->codec_dev = codec_dev; ++ } + + /* + * swap SSP0 if bytcr is detected +-- +2.43.0 + diff --git a/queue-6.1/asoc-intel-sst-support-lpe0f28-acpi-hid.patch b/queue-6.1/asoc-intel-sst-support-lpe0f28-acpi-hid.patch new file mode 100644 index 00000000000..546f5826a81 --- /dev/null +++ b/queue-6.1/asoc-intel-sst-support-lpe0f28-acpi-hid.patch @@ -0,0 +1,146 @@ +From 2dcb1c5079707dd814873b64ec9a758e4c4785aa Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 25 Oct 2024 11:02:21 +0200 +Subject: ASoC: Intel: sst: Support LPE0F28 ACPI HID +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Hans de Goede + +[ Upstream commit 6668610b4d8ce9a3ee3ed61a9471f62fb5f05bf9 ] + +Some old Bay Trail tablets which shipped with Android as factory OS +have the SST/LPE audio engine described by an ACPI device with a +HID (Hardware-ID) of LPE0F28 instead of 80860F28. + +Add support for this. Note this uses a new sst_res_info for just +the LPE0F28 case because it has a different layout for the IO-mem ACPI +resources then the 80860F28. + +An example of a tablet which needs this is the Vexia EDU ATLA 10 tablet, +which has been distributed to schools in the Spanish Andalucía region. + +Signed-off-by: Hans de Goede +Link: https://patch.msgid.link/20241025090221.52198-1-hdegoede@redhat.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/hda/intel-dsp-config.c | 4 ++ + sound/soc/intel/atom/sst/sst_acpi.c | 64 +++++++++++++++++++++++++---- + 2 files changed, 59 insertions(+), 9 deletions(-) + +diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c +index 5ada28b5515c9..b02c45e939e7c 100644 +--- a/sound/hda/intel-dsp-config.c ++++ b/sound/hda/intel-dsp-config.c +@@ -675,6 +675,10 @@ static const struct config_entry acpi_config_table[] = { + #if IS_ENABLED(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI) || \ + IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL) + /* BayTrail */ ++ { ++ .flags = FLAG_SST_OR_SOF_BYT, ++ .acpi_hid = "LPE0F28", ++ }, + { + .flags = FLAG_SST_OR_SOF_BYT, + .acpi_hid = "80860F28", +diff --git a/sound/soc/intel/atom/sst/sst_acpi.c b/sound/soc/intel/atom/sst/sst_acpi.c +index 3be64430c2567..53d04c7ff6831 100644 +--- a/sound/soc/intel/atom/sst/sst_acpi.c ++++ b/sound/soc/intel/atom/sst/sst_acpi.c +@@ -126,6 +126,28 @@ static const struct sst_res_info bytcr_res_info = { + .acpi_ipc_irq_index = 0 + }; + ++/* For "LPE0F28" ACPI device found on some Android factory OS models */ ++static const struct sst_res_info lpe8086_res_info = { ++ .shim_offset = 0x140000, ++ .shim_size = 0x000100, ++ .shim_phy_addr = SST_BYT_SHIM_PHY_ADDR, ++ .ssp0_offset = 0xa0000, ++ .ssp0_size = 0x1000, ++ .dma0_offset = 0x98000, ++ .dma0_size = 0x4000, ++ .dma1_offset = 0x9c000, ++ .dma1_size = 0x4000, ++ .iram_offset = 0x0c0000, ++ .iram_size = 0x14000, ++ .dram_offset = 0x100000, ++ .dram_size = 0x28000, ++ .mbox_offset = 0x144000, ++ .mbox_size = 0x1000, ++ .acpi_lpe_res_index = 1, ++ .acpi_ddr_index = 0, ++ .acpi_ipc_irq_index = 0 ++}; ++ + static struct sst_platform_info byt_rvp_platform_data = { + .probe_data = &byt_fwparse_info, + .ipc_info = &byt_ipc_info, +@@ -269,10 +291,38 @@ static int sst_acpi_probe(struct platform_device *pdev) + mach->pdata = &chv_platform_data; + pdata = mach->pdata; + +- ret = kstrtouint(id->id, 16, &dev_id); +- if (ret < 0) { +- dev_err(dev, "Unique device id conversion error: %d\n", ret); +- return ret; ++ if (!strcmp(id->id, "LPE0F28")) { ++ struct resource *rsrc; ++ ++ /* Use regular BYT SST PCI VID:PID */ ++ dev_id = 0x80860F28; ++ byt_rvp_platform_data.res_info = &lpe8086_res_info; ++ ++ /* ++ * The "LPE0F28" ACPI device has separate IO-mem resources for: ++ * DDR, SHIM, MBOX, IRAM, DRAM, CFG ++ * None of which covers the entire LPE base address range. ++ * lpe8086_res_info.acpi_lpe_res_index points to the SHIM. ++ * Patch this to cover the entire base address range as expected ++ * by sst_platform_get_resources(). ++ */ ++ rsrc = platform_get_resource(pdev, IORESOURCE_MEM, ++ pdata->res_info->acpi_lpe_res_index); ++ if (!rsrc) { ++ dev_err(ctx->dev, "Invalid SHIM base\n"); ++ return -EIO; ++ } ++ rsrc->start -= pdata->res_info->shim_offset; ++ rsrc->end = rsrc->start + 0x200000 - 1; ++ } else { ++ ret = kstrtouint(id->id, 16, &dev_id); ++ if (ret < 0) { ++ dev_err(dev, "Unique device id conversion error: %d\n", ret); ++ return ret; ++ } ++ ++ if (soc_intel_is_byt_cr(pdev)) ++ byt_rvp_platform_data.res_info = &bytcr_res_info; + } + + dev_dbg(dev, "ACPI device id: %x\n", dev_id); +@@ -281,11 +331,6 @@ static int sst_acpi_probe(struct platform_device *pdev) + if (ret < 0) + return ret; + +- if (soc_intel_is_byt_cr(pdev)) { +- /* override resource info */ +- byt_rvp_platform_data.res_info = &bytcr_res_info; +- } +- + /* update machine parameters */ + mach->mach_params.acpi_ipc_irq_index = + pdata->res_info->acpi_ipc_irq_index; +@@ -346,6 +391,7 @@ static int sst_acpi_remove(struct platform_device *pdev) + } + + static const struct acpi_device_id sst_acpi_ids[] = { ++ { "LPE0F28", (unsigned long)&snd_soc_acpi_intel_baytrail_machines}, + { "80860F28", (unsigned long)&snd_soc_acpi_intel_baytrail_machines}, + { "808622A8", (unsigned long)&snd_soc_acpi_intel_cherrytrail_machines}, + { }, +-- +2.43.0 + diff --git a/queue-6.1/asoc-stm-prevent-potential-division-by-zero-in-stm32.patch b/queue-6.1/asoc-stm-prevent-potential-division-by-zero-in-stm32.patch new file mode 100644 index 00000000000..3b84a00a8d1 --- /dev/null +++ b/queue-6.1/asoc-stm-prevent-potential-division-by-zero-in-stm32.patch @@ -0,0 +1,40 @@ +From 0f0c4fca970b2219a4c94831475afdefe117e1b3 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 6 Nov 2024 09:46:54 +0800 +Subject: ASoC: stm: Prevent potential division by zero in + stm32_sai_mclk_round_rate() + +From: Luo Yifan + +[ Upstream commit 63c1c87993e0e5bb11bced3d8224446a2bc62338 ] + +This patch checks if div is less than or equal to zero (div <= 0). If +div is zero or negative, the function returns -EINVAL, ensuring the +division operation (*prate / div) is safe to perform. + +Signed-off-by: Luo Yifan +Link: https://patch.msgid.link/20241106014654.206860-1-luoyifan@cmss.chinamobile.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/stm/stm32_sai_sub.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c +index eb31b49e65978..3d237f75e81f5 100644 +--- a/sound/soc/stm/stm32_sai_sub.c ++++ b/sound/soc/stm/stm32_sai_sub.c +@@ -378,8 +378,8 @@ static long stm32_sai_mclk_round_rate(struct clk_hw *hw, unsigned long rate, + int div; + + div = stm32_sai_get_clk_div(sai, *prate, rate); +- if (div < 0) +- return div; ++ if (div <= 0) ++ return -EINVAL; + + mclk->freq = *prate / div; + +-- +2.43.0 + diff --git a/queue-6.1/asoc-stm-prevent-potential-division-by-zero-in-stm32.patch-7602 b/queue-6.1/asoc-stm-prevent-potential-division-by-zero-in-stm32.patch-7602 new file mode 100644 index 00000000000..bfa702222ea --- /dev/null +++ b/queue-6.1/asoc-stm-prevent-potential-division-by-zero-in-stm32.patch-7602 @@ -0,0 +1,39 @@ +From 7088564a42a9752aa11acdc453fc16d393c0fb88 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 7 Nov 2024 09:59:36 +0800 +Subject: ASoC: stm: Prevent potential division by zero in + stm32_sai_get_clk_div() + +From: Luo Yifan + +[ Upstream commit 23569c8b314925bdb70dd1a7b63cfe6100868315 ] + +This patch checks if div is less than or equal to zero (div <= 0). If +div is zero or negative, the function returns -EINVAL, ensuring the +division operation is safe to perform. + +Signed-off-by: Luo Yifan +Reviewed-by: Olivier Moysan +Link: https://patch.msgid.link/20241107015936.211902-1-luoyifan@cmss.chinamobile.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/stm/stm32_sai_sub.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c +index 3d237f75e81f5..0629aa5f2fe4b 100644 +--- a/sound/soc/stm/stm32_sai_sub.c ++++ b/sound/soc/stm/stm32_sai_sub.c +@@ -317,7 +317,7 @@ static int stm32_sai_get_clk_div(struct stm32_sai_sub_data *sai, + int div; + + div = DIV_ROUND_CLOSEST(input_rate, output_rate); +- if (div > SAI_XCR1_MCKDIV_MAX(version)) { ++ if (div > SAI_XCR1_MCKDIV_MAX(version) || div <= 0) { + dev_err(&sai->pdev->dev, "Divider %d out of range\n", div); + return -EINVAL; + } +-- +2.43.0 + diff --git a/queue-6.1/bpf-fix-filed-access-without-lock.patch b/queue-6.1/bpf-fix-filed-access-without-lock.patch new file mode 100644 index 00000000000..bdea0e64279 --- /dev/null +++ b/queue-6.1/bpf-fix-filed-access-without-lock.patch @@ -0,0 +1,64 @@ +From 9d2818f4a07ae5dcf3dc5a99d08356bb1dd93d1f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 28 Oct 2024 14:52:26 +0800 +Subject: bpf: fix filed access without lock + +From: Jiayuan Chen + +[ Upstream commit a32aee8f0d987a7cba7fcc28002553361a392048 ] + +The tcp_bpf_recvmsg_parser() function, running in user context, +retrieves seq_copied from tcp_sk without holding the socket lock, and +stores it in a local variable seq. However, the softirq context can +modify tcp_sk->seq_copied concurrently, for example, n tcp_read_sock(). + +As a result, the seq value is stale when it is assigned back to +tcp_sk->copied_seq at the end of tcp_bpf_recvmsg_parser(), leading to +incorrect behavior. + +Due to concurrency, the copied_seq field in tcp_bpf_recvmsg_parser() +might be set to an incorrect value (less than the actual copied_seq) at +the end of function: 'WRITE_ONCE(tcp->copied_seq, seq)'. This causes the +'offset' to be negative in tcp_read_sock()->tcp_recv_skb() when +processing new incoming packets (sk->copied_seq - skb->seq becomes less +than 0), and all subsequent packets will be dropped. + +Signed-off-by: Jiayuan Chen +Link: https://lore.kernel.org/r/20241028065226.35568-1-mrpre@163.com +Signed-off-by: Martin KaFai Lau +Signed-off-by: Sasha Levin +--- + net/ipv4/tcp_bpf.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/net/ipv4/tcp_bpf.c b/net/ipv4/tcp_bpf.c +index 07a896685d0d3..f67e4c9f8d40e 100644 +--- a/net/ipv4/tcp_bpf.c ++++ b/net/ipv4/tcp_bpf.c +@@ -216,11 +216,11 @@ static int tcp_bpf_recvmsg_parser(struct sock *sk, + int flags, + int *addr_len) + { +- struct tcp_sock *tcp = tcp_sk(sk); + int peek = flags & MSG_PEEK; +- u32 seq = tcp->copied_seq; + struct sk_psock *psock; ++ struct tcp_sock *tcp; + int copied = 0; ++ u32 seq; + + if (unlikely(flags & MSG_ERRQUEUE)) + return inet_recv_error(sk, msg, len, addr_len); +@@ -233,7 +233,8 @@ static int tcp_bpf_recvmsg_parser(struct sock *sk, + return tcp_recvmsg(sk, msg, len, flags, addr_len); + + lock_sock(sk); +- ++ tcp = tcp_sk(sk); ++ seq = tcp->copied_seq; + /* We may have received data on the sk_receive_queue pre-accept and + * then we can not use read_skb in this context because we haven't + * assigned a sk_socket yet so have no link to the ops. The work-around +-- +2.43.0 + diff --git a/queue-6.1/can-j1939-fix-error-in-j1939-documentation.patch b/queue-6.1/can-j1939-fix-error-in-j1939-documentation.patch new file mode 100644 index 00000000000..fda3c423b4a --- /dev/null +++ b/queue-6.1/can-j1939-fix-error-in-j1939-documentation.patch @@ -0,0 +1,40 @@ +From d469836dfae095abb268c8e7e5ce4ac9ff0d3a0f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 23 Oct 2024 16:52:57 +0200 +Subject: can: j1939: fix error in J1939 documentation. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Alexander Hölzl + +[ Upstream commit b6ec62e01aa4229bc9d3861d1073806767ea7838 ] + +The description of PDU1 format usage mistakenly referred to PDU2 format. + +Signed-off-by: Alexander Hölzl +Acked-by: Oleksij Rempel +Acked-by: Vincent Mailhol +Link: https://patch.msgid.link/20241023145257.82709-1-alexander.hoelzl@gmx.net +Signed-off-by: Marc Kleine-Budde +Signed-off-by: Sasha Levin +--- + Documentation/networking/j1939.rst | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Documentation/networking/j1939.rst b/Documentation/networking/j1939.rst +index b705d2801e9c3..80b1c5e19fd53 100644 +--- a/Documentation/networking/j1939.rst ++++ b/Documentation/networking/j1939.rst +@@ -121,7 +121,7 @@ format, the Group Extension is set in the PS-field. + + On the other hand, when using PDU1 format, the PS-field contains a so-called + Destination Address, which is _not_ part of the PGN. When communicating a PGN +-from user space to kernel (or vice versa) and PDU2 format is used, the PS-field ++from user space to kernel (or vice versa) and PDU1 format is used, the PS-field + of the PGN shall be set to zero. The Destination Address shall be set + elsewhere. + +-- +2.43.0 + diff --git a/queue-6.1/drm-panel-orientation-quirks-make-lenovo-yoga-tab-3-.patch b/queue-6.1/drm-panel-orientation-quirks-make-lenovo-yoga-tab-3-.patch new file mode 100644 index 00000000000..20ef31d2669 --- /dev/null +++ b/queue-6.1/drm-panel-orientation-quirks-make-lenovo-yoga-tab-3-.patch @@ -0,0 +1,42 @@ +From 581848c26f9e5763123a1cea0191648a23fb2221 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 25 Aug 2024 15:21:31 +0200 +Subject: drm: panel-orientation-quirks: Make Lenovo Yoga Tab 3 X90F DMI match + less strict + +From: Hans de Goede + +[ Upstream commit 052ef642bd6c108a24f375f9ad174b97b425a50b ] + +There are 2G and 4G RAM versions of the Lenovo Yoga Tab 3 X90F and it +turns out that the 2G version has a DMI product name of +"CHERRYVIEW D1 PLATFORM" where as the 4G version has +"CHERRYVIEW C0 PLATFORM". The sys-vendor + product-version check are +unique enough that the product-name check is not necessary. + +Drop the product-name check so that the existing DMI match for the 4G +RAM version also matches the 2G RAM version. + +Signed-off-by: Hans de Goede +Acked-by: Jani Nikula +Link: https://patchwork.freedesktop.org/patch/msgid/20240825132131.6643-1-hdegoede@redhat.com +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/drm_panel_orientation_quirks.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c +index 5b2506c65e952..259a0c765bafb 100644 +--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c ++++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c +@@ -403,7 +403,6 @@ static const struct dmi_system_id orientation_data[] = { + }, { /* Lenovo Yoga Tab 3 X90F */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"), +- DMI_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"), + DMI_MATCH(DMI_PRODUCT_VERSION, "Blade3-10A-001"), + }, + .driver_data = (void *)&lcd1600x2560_rightside_up, +-- +2.43.0 + diff --git a/queue-6.1/ipmr-fix-access-to-mfc_cache_list-without-lock-held.patch b/queue-6.1/ipmr-fix-access-to-mfc_cache_list-without-lock-held.patch new file mode 100644 index 00000000000..5b7ca5a05e4 --- /dev/null +++ b/queue-6.1/ipmr-fix-access-to-mfc_cache_list-without-lock-held.patch @@ -0,0 +1,76 @@ +From 9858181c18152355b46edfc98687004231b6d62b Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 8 Nov 2024 06:08:36 -0800 +Subject: ipmr: Fix access to mfc_cache_list without lock held + +From: Breno Leitao + +[ Upstream commit e28acc9c1ccfcb24c08e020828f69d0a915b06ae ] + +Accessing `mr_table->mfc_cache_list` is protected by an RCU lock. In the +following code flow, the RCU read lock is not held, causing the +following error when `RCU_PROVE` is not held. The same problem might +show up in the IPv6 code path. + + 6.12.0-rc5-kbuilder-01145-gbac17284bdcb #33 Tainted: G E N + ----------------------------- + net/ipv4/ipmr_base.c:313 RCU-list traversed in non-reader section!! + + rcu_scheduler_active = 2, debug_locks = 1 + 2 locks held by RetransmitAggre/3519: + #0: ffff88816188c6c0 (nlk_cb_mutex-ROUTE){+.+.}-{3:3}, at: __netlink_dump_start+0x8a/0x290 + #1: ffffffff83fcf7a8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_dumpit+0x6b/0x90 + + stack backtrace: + lockdep_rcu_suspicious + mr_table_dump + ipmr_rtm_dumproute + rtnl_dump_all + rtnl_dumpit + netlink_dump + __netlink_dump_start + rtnetlink_rcv_msg + netlink_rcv_skb + netlink_unicast + netlink_sendmsg + +This is not a problem per see, since the RTNL lock is held here, so, it +is safe to iterate in the list without the RCU read lock, as suggested +by Eric. + +To alleviate the concern, modify the code to use +list_for_each_entry_rcu() with the RTNL-held argument. + +The annotation will raise an error only if RTNL or RCU read lock are +missing during iteration, signaling a legitimate problem, otherwise it +will avoid this false positive. + +This will solve the IPv6 case as well, since ip6mr_rtm_dumproute() calls +this function as well. + +Signed-off-by: Breno Leitao +Reviewed-by: David Ahern +Link: https://patch.msgid.link/20241108-ipmr_rcu-v2-1-c718998e209b@debian.org +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + net/ipv4/ipmr_base.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/net/ipv4/ipmr_base.c b/net/ipv4/ipmr_base.c +index 271dc03fc6dbd..f0af12a2f70bc 100644 +--- a/net/ipv4/ipmr_base.c ++++ b/net/ipv4/ipmr_base.c +@@ -310,7 +310,8 @@ int mr_table_dump(struct mr_table *mrt, struct sk_buff *skb, + if (filter->filter_set) + flags |= NLM_F_DUMP_FILTERED; + +- list_for_each_entry_rcu(mfc, &mrt->mfc_cache_list, list) { ++ list_for_each_entry_rcu(mfc, &mrt->mfc_cache_list, list, ++ lockdep_rtnl_is_held()) { + if (e < s_e) + goto next_entry; + if (filter->dev && +-- +2.43.0 + diff --git a/queue-6.1/loongarch-define-a-default-value-for-vm_data_default.patch b/queue-6.1/loongarch-define-a-default-value-for-vm_data_default.patch new file mode 100644 index 00000000000..38f87f3dbef --- /dev/null +++ b/queue-6.1/loongarch-define-a-default-value-for-vm_data_default.patch @@ -0,0 +1,42 @@ +From 6a5855b56edb1ae58b7ad58f67eb803e89ce3072 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 12 Nov 2024 16:35:39 +0800 +Subject: LoongArch: Define a default value for VM_DATA_DEFAULT_FLAGS + +From: Yuli Wang + +[ Upstream commit c859900a841b0a6cd9a73d16426465e44cdde29c ] + +This is a trivial cleanup, commit c62da0c35d58518d ("mm/vma: define a +default value for VM_DATA_DEFAULT_FLAGS") has unified default values of +VM_DATA_DEFAULT_FLAGS across different platforms. + +Apply the same consistency to LoongArch. + +Suggested-by: Wentao Guan +Signed-off-by: Yuli Wang +Signed-off-by: Huacai Chen +Signed-off-by: Sasha Levin +--- + arch/loongarch/include/asm/page.h | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/arch/loongarch/include/asm/page.h b/arch/loongarch/include/asm/page.h +index bbac81dd73788..9919253804e61 100644 +--- a/arch/loongarch/include/asm/page.h ++++ b/arch/loongarch/include/asm/page.h +@@ -102,10 +102,7 @@ static inline int pfn_valid(unsigned long pfn) + extern int __virt_addr_valid(volatile void *kaddr); + #define virt_addr_valid(kaddr) __virt_addr_valid((volatile void *)(kaddr)) + +-#define VM_DATA_DEFAULT_FLAGS \ +- (VM_READ | VM_WRITE | \ +- ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \ +- VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) ++#define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC + + #include + #include +-- +2.43.0 + diff --git a/queue-6.1/mac80211-fix-user-power-when-emulating-chanctx.patch b/queue-6.1/mac80211-fix-user-power-when-emulating-chanctx.patch new file mode 100644 index 00000000000..e212fb2a7a9 --- /dev/null +++ b/queue-6.1/mac80211-fix-user-power-when-emulating-chanctx.patch @@ -0,0 +1,37 @@ +From fe1734e792926e84ce09bc3ec5f45d6c3c0d0e08 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 10 Oct 2024 13:39:54 -0700 +Subject: mac80211: fix user-power when emulating chanctx + +From: Ben Greear + +[ Upstream commit 9b15c6cf8d2e82c8427cd06f535d8de93b5b995c ] + +ieee80211_calc_hw_conf_chan was ignoring the configured +user_txpower. If it is set, use it to potentially decrease +txpower as requested. + +Signed-off-by: Ben Greear +Link: https://patch.msgid.link/20241010203954.1219686-1-greearb@candelatech.com +Signed-off-by: Johannes Berg +Signed-off-by: Sasha Levin +--- + net/mac80211/main.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/net/mac80211/main.c b/net/mac80211/main.c +index 1eec4e2eb74cc..683301d9f5084 100644 +--- a/net/mac80211/main.c ++++ b/net/mac80211/main.c +@@ -144,6 +144,8 @@ static u32 ieee80211_hw_conf_chan(struct ieee80211_local *local) + } + + power = ieee80211_chandef_max_power(&chandef); ++ if (local->user_power_level != IEEE80211_UNSET_POWER_LEVEL) ++ power = min(local->user_power_level, power); + + rcu_read_lock(); + list_for_each_entry_rcu(sdata, &local->interfaces, list) { +-- +2.43.0 + diff --git a/queue-6.1/net-usb-qmi_wwan-add-quectel-rg650v.patch b/queue-6.1/net-usb-qmi_wwan-add-quectel-rg650v.patch new file mode 100644 index 00000000000..89bfac72e65 --- /dev/null +++ b/queue-6.1/net-usb-qmi_wwan-add-quectel-rg650v.patch @@ -0,0 +1,65 @@ +From 82081846f9adc8f821162e9f276e49cee5f7298a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 24 Oct 2024 17:11:13 +0200 +Subject: net: usb: qmi_wwan: add Quectel RG650V +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Benoît Monin + +[ Upstream commit 6b3f18a76be6bbd237c7594cf0bf2912b68084fe ] + +Add support for Quectel RG650V which is based on Qualcomm SDX65 chip. +The composition is DIAG / NMEA / AT / AT / QMI. + +T: Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 4 Spd=5000 MxCh= 0 +D: Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 1 +P: Vendor=2c7c ProdID=0122 Rev=05.15 +S: Manufacturer=Quectel +S: Product=RG650V-EU +S: SerialNumber=xxxxxxx +C: #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=896mA +I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option +E: Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms +I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms +I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=03(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=83(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=9ms +I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=04(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=85(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=9ms +I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan +E: Ad=05(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=87(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=88(I) Atr=03(Int.) MxPS= 8 Ivl=9ms + +Signed-off-by: Benoît Monin +Reviewed-by: Simon Horman +Link: https://patch.msgid.link/20241024151113.53203-1-benoit.monin@gmx.fr +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + drivers/net/usb/qmi_wwan.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c +index fe9abc4ea3afe..8b9e2888b310e 100644 +--- a/drivers/net/usb/qmi_wwan.c ++++ b/drivers/net/usb/qmi_wwan.c +@@ -1083,6 +1083,7 @@ static const struct usb_device_id products[] = { + USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x581d, USB_CLASS_VENDOR_SPEC, 1, 7), + .driver_info = (unsigned long)&qmi_wwan_info, + }, ++ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0122)}, /* Quectel RG650V */ + {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0125)}, /* Quectel EC25, EC20 R2.0 Mini PCIe */ + {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0306)}, /* Quectel EP06/EG06/EM06 */ + {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0512)}, /* Quectel EG12/EM12 */ +-- +2.43.0 + diff --git a/queue-6.1/platform-x86-dell-smbios-base-extends-support-to-ali.patch b/queue-6.1/platform-x86-dell-smbios-base-extends-support-to-ali.patch new file mode 100644 index 00000000000..b113dd85789 --- /dev/null +++ b/queue-6.1/platform-x86-dell-smbios-base-extends-support-to-ali.patch @@ -0,0 +1,51 @@ +From a0b2a0db6eaa6088117b426a0492ca5eeeb974ab Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 31 Oct 2024 12:40:24 -0300 +Subject: platform/x86: dell-smbios-base: Extends support to Alienware products +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Kurt Borja + +[ Upstream commit a36b8b84ac4327b90ef5a22bc97cc96a92073330 ] + +Fixes the following error: + +dell_smbios: Unable to run on non-Dell system + +Which is triggered after dell-wmi driver fails to initialize on +Alienware systems, as it depends on dell-smbios. + +This effectively extends dell-wmi, dell-smbios and dcdbas support to +Alienware devices, that might share some features of the SMBIOS intereface +calling interface with other Dell products. + +Tested on an Alienware X15 R1. + +Signed-off-by: Kurt Borja +Reviewed-by: Mario Limonciello +Acked-by: Pali Rohár +Link: https://lore.kernel.org/r/20241031154023.6149-2-kuurtb@gmail.com +Reviewed-by: Hans de Goede +Signed-off-by: Hans de Goede +Signed-off-by: Sasha Levin +--- + drivers/platform/x86/dell/dell-smbios-base.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c +index 6fb538a138689..9a9b9feac4166 100644 +--- a/drivers/platform/x86/dell/dell-smbios-base.c ++++ b/drivers/platform/x86/dell/dell-smbios-base.c +@@ -544,6 +544,7 @@ static int __init dell_smbios_init(void) + int ret, wmi, smm; + + if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) && ++ !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Alienware", NULL) && + !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) { + pr_err("Unable to run on non-Dell system\n"); + return -ENODEV; +-- +2.43.0 + diff --git a/queue-6.1/platform-x86-dell-wmi-base-handle-meta-key-lock-unlo.patch b/queue-6.1/platform-x86-dell-wmi-base-handle-meta-key-lock-unlo.patch new file mode 100644 index 00000000000..5a93082d54e --- /dev/null +++ b/queue-6.1/platform-x86-dell-wmi-base-handle-meta-key-lock-unlo.patch @@ -0,0 +1,52 @@ +From f62717b3c978d0eda86c61535d06ff6e3f1b9e54 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 31 Oct 2024 12:44:42 -0300 +Subject: platform/x86: dell-wmi-base: Handle META key Lock/Unlock events +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Kurt Borja + +[ Upstream commit ec61f0bb4feec3345626a2b93b970b6719743997 ] + +Some Alienware devices have a key that locks/unlocks the Meta key. This +key triggers a WMI event that should be ignored by the kernel, as it's +handled by internally the firmware. + +There is no known way of changing this default behavior. The firmware +would lock/unlock the Meta key, regardless of how the event is handled. + +Tested on an Alienware x15 R1. + +Signed-off-by: Kurt Borja +Reviewed-by: Mario Limonciello +Acked-by: Pali Rohár +Link: https://lore.kernel.org/r/20241031154441.6663-2-kuurtb@gmail.com +Reviewed-by: Hans de Goede +Signed-off-by: Hans de Goede +Signed-off-by: Sasha Levin +--- + drivers/platform/x86/dell/dell-wmi-base.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/drivers/platform/x86/dell/dell-wmi-base.c b/drivers/platform/x86/dell/dell-wmi-base.c +index 24fd7ffadda95..841a5414d28a6 100644 +--- a/drivers/platform/x86/dell/dell-wmi-base.c ++++ b/drivers/platform/x86/dell/dell-wmi-base.c +@@ -80,6 +80,12 @@ static const struct dmi_system_id dell_wmi_smbios_list[] __initconst = { + static const struct key_entry dell_wmi_keymap_type_0000[] = { + { KE_IGNORE, 0x003a, { KEY_CAPSLOCK } }, + ++ /* Meta key lock */ ++ { KE_IGNORE, 0xe000, { KEY_RIGHTMETA } }, ++ ++ /* Meta key unlock */ ++ { KE_IGNORE, 0xe001, { KEY_RIGHTMETA } }, ++ + /* Key code is followed by brightness level */ + { KE_KEY, 0xe005, { KEY_BRIGHTNESSDOWN } }, + { KE_KEY, 0xe006, { KEY_BRIGHTNESSUP } }, +-- +2.43.0 + diff --git a/queue-6.1/platform-x86-thinkpad_acpi-fix-for-thinkpad-s-with-e.patch b/queue-6.1/platform-x86-thinkpad_acpi-fix-for-thinkpad-s-with-e.patch new file mode 100644 index 00000000000..f9504dccb08 --- /dev/null +++ b/queue-6.1/platform-x86-thinkpad_acpi-fix-for-thinkpad-s-with-e.patch @@ -0,0 +1,111 @@ +From 046365b4a09524ca7eec431dbfd24938d2a09892 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 6 Nov 2024 08:55:05 +0900 +Subject: platform/x86: thinkpad_acpi: Fix for ThinkPad's with ECFW showing + incorrect fan speed + +From: Vishnu Sankar + +[ Upstream commit 1be765b292577c752e0b87bf8c0e92aff6699d8e ] + +Fix for Thinkpad's with ECFW showing incorrect fan speed. Some models use +decimal instead of hexadecimal for the speed stored in the EC registers. +For example the rpm register will have 0x4200 instead of 0x1068, here +the actual RPM is "4200" in decimal. + +Add a quirk to handle this. + +Signed-off-by: Vishnu Sankar +Suggested-by: Mark Pearson +Link: https://lore.kernel.org/r/20241105235505.8493-1-vishnuocv@gmail.com +Reviewed-by: Hans de Goede +Signed-off-by: Hans de Goede +Signed-off-by: Sasha Levin +--- + drivers/platform/x86/thinkpad_acpi.c | 28 +++++++++++++++++++++++++--- + 1 file changed, 25 insertions(+), 3 deletions(-) + +diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c +index c2fb19af10705..bedc6cd51f399 100644 +--- a/drivers/platform/x86/thinkpad_acpi.c ++++ b/drivers/platform/x86/thinkpad_acpi.c +@@ -8213,6 +8213,7 @@ static u8 fan_control_resume_level; + static int fan_watchdog_maxinterval; + + static bool fan_with_ns_addr; ++static bool ecfw_with_fan_dec_rpm; + + static struct mutex fan_mutex; + +@@ -8856,7 +8857,11 @@ static ssize_t fan_fan1_input_show(struct device *dev, + if (res < 0) + return res; + +- return sysfs_emit(buf, "%u\n", speed); ++ /* Check for fan speeds displayed in hexadecimal */ ++ if (!ecfw_with_fan_dec_rpm) ++ return sysfs_emit(buf, "%u\n", speed); ++ else ++ return sysfs_emit(buf, "%x\n", speed); + } + + static DEVICE_ATTR(fan1_input, S_IRUGO, fan_fan1_input_show, NULL); +@@ -8873,7 +8878,11 @@ static ssize_t fan_fan2_input_show(struct device *dev, + if (res < 0) + return res; + +- return sysfs_emit(buf, "%u\n", speed); ++ /* Check for fan speeds displayed in hexadecimal */ ++ if (!ecfw_with_fan_dec_rpm) ++ return sysfs_emit(buf, "%u\n", speed); ++ else ++ return sysfs_emit(buf, "%x\n", speed); + } + + static DEVICE_ATTR(fan2_input, S_IRUGO, fan_fan2_input_show, NULL); +@@ -8949,6 +8958,7 @@ static const struct attribute_group fan_driver_attr_group = { + #define TPACPI_FAN_2CTL 0x0004 /* selects fan2 control */ + #define TPACPI_FAN_NOFAN 0x0008 /* no fan available */ + #define TPACPI_FAN_NS 0x0010 /* For EC with non-Standard register addresses */ ++#define TPACPI_FAN_DECRPM 0x0020 /* For ECFW's with RPM in register as decimal */ + + static const struct tpacpi_quirk fan_quirk_table[] __initconst = { + TPACPI_QEC_IBM('1', 'Y', TPACPI_FAN_Q1), +@@ -8970,6 +8980,7 @@ static const struct tpacpi_quirk fan_quirk_table[] __initconst = { + TPACPI_Q_LNV3('R', '1', 'F', TPACPI_FAN_NS), /* L13 Yoga Gen 2 */ + TPACPI_Q_LNV3('N', '2', 'U', TPACPI_FAN_NS), /* X13 Yoga Gen 2*/ + TPACPI_Q_LNV3('N', '1', 'O', TPACPI_FAN_NOFAN), /* X1 Tablet (2nd gen) */ ++ TPACPI_Q_LNV3('R', '0', 'Q', TPACPI_FAN_DECRPM),/* L480 */ + }; + + static int __init fan_init(struct ibm_init_struct *iibm) +@@ -9010,6 +9021,13 @@ static int __init fan_init(struct ibm_init_struct *iibm) + tp_features.fan_ctrl_status_undef = 1; + } + ++ /* Check for the EC/BIOS with RPM reported in decimal*/ ++ if (quirks & TPACPI_FAN_DECRPM) { ++ pr_info("ECFW with fan RPM as decimal in EC register\n"); ++ ecfw_with_fan_dec_rpm = 1; ++ tp_features.fan_ctrl_status_undef = 1; ++ } ++ + if (gfan_handle) { + /* 570, 600e/x, 770e, 770x */ + fan_status_access_mode = TPACPI_FAN_RD_ACPI_GFAN; +@@ -9221,7 +9239,11 @@ static int fan_read(struct seq_file *m) + if (rc < 0) + return rc; + +- seq_printf(m, "speed:\t\t%d\n", speed); ++ /* Check for fan speeds displayed in hexadecimal */ ++ if (!ecfw_with_fan_dec_rpm) ++ seq_printf(m, "speed:\t\t%d\n", speed); ++ else ++ seq_printf(m, "speed:\t\t%x\n", speed); + + if (fan_status_access_mode == TPACPI_FAN_RD_TPEC_NS) { + /* +-- +2.43.0 + diff --git a/queue-6.1/proc-softirqs-replace-seq_printf-with-seq_put_decima.patch b/queue-6.1/proc-softirqs-replace-seq_printf-with-seq_put_decima.patch new file mode 100644 index 00000000000..74780a853b0 --- /dev/null +++ b/queue-6.1/proc-softirqs-replace-seq_printf-with-seq_put_decima.patch @@ -0,0 +1,39 @@ +From e5d488a883ee630d940df078c288f84566d07f87 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 6 Nov 2024 10:12:28 +0800 +Subject: proc/softirqs: replace seq_printf with seq_put_decimal_ull_width + +From: David Wang <00107082@163.com> + +[ Upstream commit 84b9749a3a704dcc824a88aa8267247c801d51e4 ] + +seq_printf is costy, on a system with n CPUs, reading /proc/softirqs +would yield 10*n decimal values, and the extra cost parsing format string +grows linearly with number of cpus. Replace seq_printf with +seq_put_decimal_ull_width have significant performance improvement. +On an 8CPUs system, reading /proc/softirqs show ~40% performance +gain with this patch. + +Signed-off-by: David Wang <00107082@163.com> +Signed-off-by: Linus Torvalds +Signed-off-by: Sasha Levin +--- + fs/proc/softirqs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fs/proc/softirqs.c b/fs/proc/softirqs.c +index f4616083faef3..04bb29721419b 100644 +--- a/fs/proc/softirqs.c ++++ b/fs/proc/softirqs.c +@@ -20,7 +20,7 @@ static int show_softirqs(struct seq_file *p, void *v) + for (i = 0; i < NR_SOFTIRQS; i++) { + seq_printf(p, "%12s:", softirq_to_name[i]); + for_each_possible_cpu(j) +- seq_printf(p, " %10u", kstat_softirqs_cpu(i, j)); ++ seq_put_decimal_ull_width(p, " ", kstat_softirqs_cpu(i, j), 10); + seq_putc(p, '\n'); + } + return 0; +-- +2.43.0 + diff --git a/queue-6.1/regulator-rk808-add-apply_bit-for-buck3-on-rk809.patch b/queue-6.1/regulator-rk808-add-apply_bit-for-buck3-on-rk809.patch new file mode 100644 index 00000000000..067c81cacca --- /dev/null +++ b/queue-6.1/regulator-rk808-add-apply_bit-for-buck3-on-rk809.patch @@ -0,0 +1,43 @@ +From 50c54fe411900f31b9f60f326ca15e770e30139e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 17 Oct 2024 21:37:28 +0300 +Subject: regulator: rk808: Add apply_bit for BUCK3 on RK809 + +From: Mikhail Rudenko + +[ Upstream commit 5e53e4a66bc7430dd2d11c18a86410e3a38d2940 ] + +Currently, RK809's BUCK3 regulator is modelled in the driver as a +configurable regulator with 0.5-2.4V voltage range. But the voltage +setting is not actually applied, because when bit 6 of +PMIC_POWER_CONFIG register is set to 0 (default), BUCK3 output voltage +is determined by the external feedback resistor. Fix this, by setting +bit 6 when voltage selection is set. Existing users which do not +specify voltage constraints in their device trees will not be affected +by this change, since no voltage setting is applied in those cases, +and bit 6 is not enabled. + +Signed-off-by: Mikhail Rudenko +Link: https://patch.msgid.link/20241017-rk809-dcdc3-v1-1-e3c3de92f39c@gmail.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + drivers/regulator/rk808-regulator.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c +index 127dc2e2e6903..0763a5bbee2f5 100644 +--- a/drivers/regulator/rk808-regulator.c ++++ b/drivers/regulator/rk808-regulator.c +@@ -906,6 +906,8 @@ static const struct regulator_desc rk809_reg[] = { + .n_linear_ranges = ARRAY_SIZE(rk817_buck1_voltage_ranges), + .vsel_reg = RK817_BUCK3_ON_VSEL_REG, + .vsel_mask = RK817_BUCK_VSEL_MASK, ++ .apply_reg = RK817_POWER_CONFIG, ++ .apply_bit = RK817_BUCK3_FB_RES_INTER, + .enable_reg = RK817_POWER_EN_REG(0), + .enable_mask = ENABLE_MASK(RK817_ID_DCDC3), + .enable_val = ENABLE_MASK(RK817_ID_DCDC3), +-- +2.43.0 + diff --git a/queue-6.1/selftests-watchdog-test-fix-system-accidentally-rese.patch b/queue-6.1/selftests-watchdog-test-fix-system-accidentally-rese.patch new file mode 100644 index 00000000000..07cfa339210 --- /dev/null +++ b/queue-6.1/selftests-watchdog-test-fix-system-accidentally-rese.patch @@ -0,0 +1,58 @@ +From b490fc46c66a4dfdc2a959f5e041d3b1503d55b3 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 29 Oct 2024 11:13:24 +0800 +Subject: selftests/watchdog-test: Fix system accidentally reset after + watchdog-test + +From: Li Zhijian + +[ Upstream commit dc1308bee1ed03b4d698d77c8bd670d399dcd04d ] + +When running watchdog-test with 'make run_tests', the watchdog-test will +be terminated by a timeout signal(SIGTERM) due to the test timemout. + +And then, a system reboot would happen due to watchdog not stop. see +the dmesg as below: +``` +[ 1367.185172] watchdog: watchdog0: watchdog did not stop! +``` + +Fix it by registering more signals(including SIGTERM) in watchdog-test, +where its signal handler will stop the watchdog. + +After that + # timeout 1 ./watchdog-test + Watchdog Ticking Away! + . + Stopping watchdog ticks... + +Link: https://lore.kernel.org/all/20241029031324.482800-1-lizhijian@fujitsu.com/ +Signed-off-by: Li Zhijian +Reviewed-by: Shuah Khan +Signed-off-by: Shuah Khan +Signed-off-by: Sasha Levin +--- + tools/testing/selftests/watchdog/watchdog-test.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/tools/testing/selftests/watchdog/watchdog-test.c b/tools/testing/selftests/watchdog/watchdog-test.c +index f45e510500c0d..09773695d219f 100644 +--- a/tools/testing/selftests/watchdog/watchdog-test.c ++++ b/tools/testing/selftests/watchdog/watchdog-test.c +@@ -242,7 +242,13 @@ int main(int argc, char *argv[]) + + printf("Watchdog Ticking Away!\n"); + ++ /* ++ * Register the signals ++ */ + signal(SIGINT, term); ++ signal(SIGTERM, term); ++ signal(SIGKILL, term); ++ signal(SIGQUIT, term); + + while (1) { + keep_alive(); +-- +2.43.0 + diff --git a/queue-6.1/series b/queue-6.1/series new file mode 100644 index 00000000000..3cbb0fc4e7a --- /dev/null +++ b/queue-6.1/series @@ -0,0 +1,28 @@ +asoc-intel-bytcr_rt5640-add-support-for-non-acpi-ins.patch +asoc-intel-bytcr_rt5640-add-dmi-quirk-for-vexia-edu-.patch +asoc-intel-sst-support-lpe0f28-acpi-hid.patch +wifi-iwlwifi-mvm-use-the-sync-timepoint-api-in-suspe.patch +mac80211-fix-user-power-when-emulating-chanctx.patch +usb-add-support-for-new-usb-device-id-0x17ef-0x3098-.patch +selftests-watchdog-test-fix-system-accidentally-rese.patch +alsa-hda-realtek-add-subwoofer-quirk-for-infinix-zer.patch +x86-amd_nb-fix-compile-testing-without-config_amd_nb.patch +bpf-fix-filed-access-without-lock.patch +net-usb-qmi_wwan-add-quectel-rg650v.patch +soc-qcom-add-check-devm_kasprintf-returned-value.patch +regulator-rk808-add-apply_bit-for-buck3-on-rk809.patch +platform-x86-dell-smbios-base-extends-support-to-ali.patch +platform-x86-dell-wmi-base-handle-meta-key-lock-unlo.patch +tools-lib-thermal-remove-the-thermal.h-soft-link-whe.patch +can-j1939-fix-error-in-j1939-documentation.patch +platform-x86-thinkpad_acpi-fix-for-thinkpad-s-with-e.patch +asoc-amd-yc-support-dmic-on-another-model-of-lenovo-.patch +asoc-stm-prevent-potential-division-by-zero-in-stm32.patch +asoc-stm-prevent-potential-division-by-zero-in-stm32.patch-7602 +drm-panel-orientation-quirks-make-lenovo-yoga-tab-3-.patch +proc-softirqs-replace-seq_printf-with-seq_put_decima.patch +asoc-audio-graph-card2-purge-absent-supplies-for-dev.patch +loongarch-define-a-default-value-for-vm_data_default.patch +alsa-usb-audio-fix-yamaha-p-125-quirk-entry.patch +arm-9420-1-smp-fix-smp-for-xip-kernels.patch +ipmr-fix-access-to-mfc_cache_list-without-lock-held.patch diff --git a/queue-6.1/soc-qcom-add-check-devm_kasprintf-returned-value.patch b/queue-6.1/soc-qcom-add-check-devm_kasprintf-returned-value.patch new file mode 100644 index 00000000000..ddf5e9b8161 --- /dev/null +++ b/queue-6.1/soc-qcom-add-check-devm_kasprintf-returned-value.patch @@ -0,0 +1,45 @@ +From 635becb1bdc9f7648756c1a6394cf27f3e432b98 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 29 Sep 2024 15:23:49 +0800 +Subject: soc: qcom: Add check devm_kasprintf() returned value + +From: Charles Han + +[ Upstream commit e694d2b5c58ba2d1e995d068707c8d966e7f5f2a ] + +devm_kasprintf() can return a NULL pointer on failure but this +returned value in qcom_socinfo_probe() is not checked. + +Signed-off-by: Charles Han +Link: https://lore.kernel.org/r/20240929072349.202520-1-hanchunchao@inspur.com +Signed-off-by: Bjorn Andersson +Signed-off-by: Sasha Levin +--- + drivers/soc/qcom/socinfo.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c +index aa37e1bad095c..66219ccd8d47f 100644 +--- a/drivers/soc/qcom/socinfo.c ++++ b/drivers/soc/qcom/socinfo.c +@@ -649,10 +649,16 @@ static int qcom_socinfo_probe(struct platform_device *pdev) + qs->attr.revision = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%u.%u", + SOCINFO_MAJOR(le32_to_cpu(info->ver)), + SOCINFO_MINOR(le32_to_cpu(info->ver))); +- if (offsetof(struct socinfo, serial_num) <= item_size) ++ if (!qs->attr.soc_id || qs->attr.revision) ++ return -ENOMEM; ++ ++ if (offsetof(struct socinfo, serial_num) <= item_size) { + qs->attr.serial_number = devm_kasprintf(&pdev->dev, GFP_KERNEL, + "%u", + le32_to_cpu(info->serial_num)); ++ if (!qs->attr.serial_number) ++ return -ENOMEM; ++ } + + qs->soc_dev = soc_device_register(&qs->attr); + if (IS_ERR(qs->soc_dev)) +-- +2.43.0 + diff --git a/queue-6.1/tools-lib-thermal-remove-the-thermal.h-soft-link-whe.patch b/queue-6.1/tools-lib-thermal-remove-the-thermal.h-soft-link-whe.patch new file mode 100644 index 00000000000..52065b1d599 --- /dev/null +++ b/queue-6.1/tools-lib-thermal-remove-the-thermal.h-soft-link-whe.patch @@ -0,0 +1,39 @@ +From 0dc3de190fd1bef03087bff83961029e8e0ddb0c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 12 Sep 2024 12:50:31 +0800 +Subject: tools/lib/thermal: Remove the thermal.h soft link when doing make + clean + +From: zhang jiao + +[ Upstream commit c5426dcc5a3a064bbd2de383e29035a14fe933e0 ] + +Run "make -C tools thermal" can create a soft link for thermal.h in +tools/include/uapi/linux. Just rm it when make clean. + +Signed-off-by: zhang jiao +Link: https://lore.kernel.org/r/20240912045031.18426-1-zhangjiao2@cmss.chinamobile.com +Signed-off-by: Daniel Lezcano +Signed-off-by: Sasha Levin +--- + tools/lib/thermal/Makefile | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/tools/lib/thermal/Makefile b/tools/lib/thermal/Makefile +index 2d0d255fd0e1c..8890fd57b110c 100644 +--- a/tools/lib/thermal/Makefile ++++ b/tools/lib/thermal/Makefile +@@ -121,7 +121,9 @@ all: fixdep + + clean: + $(call QUIET_CLEAN, libthermal) $(RM) $(LIBTHERMAL_A) \ +- *.o *~ *.a *.so *.so.$(VERSION) *.so.$(LIBTHERMAL_VERSION) .*.d .*.cmd LIBTHERMAL-CFLAGS $(LIBTHERMAL_PC) ++ *.o *~ *.a *.so *.so.$(VERSION) *.so.$(LIBTHERMAL_VERSION) \ ++ .*.d .*.cmd LIBTHERMAL-CFLAGS $(LIBTHERMAL_PC) \ ++ $(srctree)/tools/$(THERMAL_UAPI) + + $(LIBTHERMAL_PC): + $(QUIET_GEN)sed -e "s|@PREFIX@|$(prefix)|" \ +-- +2.43.0 + diff --git a/queue-6.1/usb-add-support-for-new-usb-device-id-0x17ef-0x3098-.patch b/queue-6.1/usb-add-support-for-new-usb-device-id-0x17ef-0x3098-.patch new file mode 100644 index 00000000000..b2c3a606dff --- /dev/null +++ b/queue-6.1/usb-add-support-for-new-usb-device-id-0x17ef-0x3098-.patch @@ -0,0 +1,41 @@ +From 17cfa58be87ec3676754bbcc32c7bf889fc81cee Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 20 Oct 2024 18:41:28 +0100 +Subject: usb: add support for new USB device ID 0x17EF:0x3098 for the r8152 + driver +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Benjamin Große + +[ Upstream commit 94c11e852955b2eef5c4f0b36cfeae7dcf11a759 ] + +This patch adds support for another Lenovo Mini dock 0x17EF:0x3098 to the +r8152 driver. The device has been tested on NixOS, hotplugging and sleep +included. + +Signed-off-by: Benjamin Große +Reviewed-by: Simon Horman +Link: https://patch.msgid.link/20241020174128.160898-1-ste3ls@gmail.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + drivers/net/usb/r8152.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c +index 958a02b19554d..061a7a9afad04 100644 +--- a/drivers/net/usb/r8152.c ++++ b/drivers/net/usb/r8152.c +@@ -9870,6 +9870,7 @@ static const struct usb_device_id rtl8152_table[] = { + { USB_DEVICE(VENDOR_ID_LENOVO, 0x3062) }, + { USB_DEVICE(VENDOR_ID_LENOVO, 0x3069) }, + { USB_DEVICE(VENDOR_ID_LENOVO, 0x3082) }, ++ { USB_DEVICE(VENDOR_ID_LENOVO, 0x3098) }, + { USB_DEVICE(VENDOR_ID_LENOVO, 0x7205) }, + { USB_DEVICE(VENDOR_ID_LENOVO, 0x720c) }, + { USB_DEVICE(VENDOR_ID_LENOVO, 0x7214) }, +-- +2.43.0 + diff --git a/queue-6.1/wifi-iwlwifi-mvm-use-the-sync-timepoint-api-in-suspe.patch b/queue-6.1/wifi-iwlwifi-mvm-use-the-sync-timepoint-api-in-suspe.patch new file mode 100644 index 00000000000..1f3c2f6b583 --- /dev/null +++ b/queue-6.1/wifi-iwlwifi-mvm-use-the-sync-timepoint-api-in-suspe.patch @@ -0,0 +1,64 @@ +From 025757b84351451c6a2ec095eb84f2ea9bc2307a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 10 Oct 2024 14:05:03 +0300 +Subject: wifi: iwlwifi: mvm: Use the sync timepoint API in suspend + +From: Daniel Gabay + +[ Upstream commit 9715246ca0bfc9feaec1b4ff5b3d38de65a7025d ] + +When starting the suspend flow, HOST_D3_START triggers an _async_ +firmware dump collection for debugging purposes. The async worker +may race with suspend flow and fail to get NIC access, resulting in +the following warning: +"Timeout waiting for hardware access (CSR_GP_CNTRL 0xffffffff)" + +Fix this by switching to the sync version to ensure the dump +completes before proceeding with the suspend flow, avoiding +potential race issues. + +Signed-off-by: Daniel Gabay +Signed-off-by: Miri Korenblit +Link: https://patch.msgid.link/20241010140328.9aae318cd593.I4b322009f39489c0b1d8893495c887870f73ed9c@changeid +Signed-off-by: Johannes Berg +Signed-off-by: Sasha Levin +--- + drivers/net/wireless/intel/iwlwifi/fw/init.c | 4 +++- + drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 2 ++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/intel/iwlwifi/fw/init.c b/drivers/net/wireless/intel/iwlwifi/fw/init.c +index 135bd48bfe9fa..cf02a2afbee56 100644 +--- a/drivers/net/wireless/intel/iwlwifi/fw/init.c ++++ b/drivers/net/wireless/intel/iwlwifi/fw/init.c +@@ -39,10 +39,12 @@ void iwl_fw_runtime_init(struct iwl_fw_runtime *fwrt, struct iwl_trans *trans, + } + IWL_EXPORT_SYMBOL(iwl_fw_runtime_init); + ++/* Assumes the appropriate lock is held by the caller */ + void iwl_fw_runtime_suspend(struct iwl_fw_runtime *fwrt) + { + iwl_fw_suspend_timestamp(fwrt); +- iwl_dbg_tlv_time_point(fwrt, IWL_FW_INI_TIME_POINT_HOST_D3_START, NULL); ++ iwl_dbg_tlv_time_point_sync(fwrt, IWL_FW_INI_TIME_POINT_HOST_D3_START, ++ NULL); + } + IWL_EXPORT_SYMBOL(iwl_fw_runtime_suspend); + +diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +index 425588605a262..53302c29c2291 100644 +--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c ++++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +@@ -1375,7 +1375,9 @@ int iwl_mvm_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) + + iwl_mvm_pause_tcm(mvm, true); + ++ mutex_lock(&mvm->mutex); + iwl_fw_runtime_suspend(&mvm->fwrt); ++ mutex_unlock(&mvm->mutex); + + return __iwl_mvm_suspend(hw, wowlan, false); + } +-- +2.43.0 + diff --git a/queue-6.1/x86-amd_nb-fix-compile-testing-without-config_amd_nb.patch b/queue-6.1/x86-amd_nb-fix-compile-testing-without-config_amd_nb.patch new file mode 100644 index 00000000000..6eb92f7f703 --- /dev/null +++ b/queue-6.1/x86-amd_nb-fix-compile-testing-without-config_amd_nb.patch @@ -0,0 +1,53 @@ +From 3b9ca49039fc3fefe0283917f0a93d06508a254c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 29 Oct 2024 09:23:20 +0000 +Subject: x86/amd_nb: Fix compile-testing without CONFIG_AMD_NB +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Arnd Bergmann + +[ Upstream commit fce9642c765a18abd1db0339a7d832c29b68456a ] + +node_to_amd_nb() is defined to NULL in non-AMD configs: + + drivers/platform/x86/amd/hsmp/plat.c: In function 'init_platform_device': + drivers/platform/x86/amd/hsmp/plat.c:165:68: error: dereferencing 'void *' pointer [-Werror] + 165 | sock->root = node_to_amd_nb(i)->root; + | ^~ + drivers/platform/x86/amd/hsmp/plat.c:165:68: error: request for member 'root' in something not a structure or union + +Users of the interface who also allow COMPILE_TEST will cause the above build +error so provide an inline stub to fix that. + + [ bp: Massage commit message. ] + +Signed-off-by: Arnd Bergmann +Signed-off-by: Borislav Petkov (AMD) +Reviewed-by: Ilpo Järvinen +Link: https://lore.kernel.org/r/20241029092329.3857004-1-arnd@kernel.org +Signed-off-by: Sasha Levin +--- + arch/x86/include/asm/amd_nb.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/arch/x86/include/asm/amd_nb.h b/arch/x86/include/asm/amd_nb.h +index ed0eaf65c4372..c8cdc69aae098 100644 +--- a/arch/x86/include/asm/amd_nb.h ++++ b/arch/x86/include/asm/amd_nb.h +@@ -116,7 +116,10 @@ static inline bool amd_gart_present(void) + + #define amd_nb_num(x) 0 + #define amd_nb_has_feature(x) false +-#define node_to_amd_nb(x) NULL ++static inline struct amd_northbridge *node_to_amd_nb(int node) ++{ ++ return NULL; ++} + #define amd_gart_present(x) false + + #endif +-- +2.43.0 + -- 2.47.3