]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 6.6
authorSasha Levin <sashal@kernel.org>
Sat, 23 Nov 2024 10:44:05 +0000 (05:44 -0500)
committerSasha Levin <sashal@kernel.org>
Sat, 23 Nov 2024 10:44:05 +0000 (05:44 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
34 files changed:
queue-6.6/alsa-hda-realtek-add-subwoofer-quirk-for-infinix-zer.patch [new file with mode: 0644]
queue-6.6/alsa-usb-audio-fix-yamaha-p-125-quirk-entry.patch [new file with mode: 0644]
queue-6.6/arm-9420-1-smp-fix-smp-for-xip-kernels.patch [new file with mode: 0644]
queue-6.6/asoc-amd-yc-support-dmic-on-another-model-of-lenovo-.patch [new file with mode: 0644]
queue-6.6/asoc-audio-graph-card2-purge-absent-supplies-for-dev.patch [new file with mode: 0644]
queue-6.6/asoc-codecs-rt5640-always-disable-irqs-from-rt5640_c.patch [new file with mode: 0644]
queue-6.6/asoc-intel-bytcr_rt5640-add-dmi-quirk-for-vexia-edu-.patch [new file with mode: 0644]
queue-6.6/asoc-intel-bytcr_rt5640-add-support-for-non-acpi-ins.patch [new file with mode: 0644]
queue-6.6/asoc-intel-sst-support-lpe0f28-acpi-hid.patch [new file with mode: 0644]
queue-6.6/asoc-stm-prevent-potential-division-by-zero-in-stm32.patch [new file with mode: 0644]
queue-6.6/asoc-stm-prevent-potential-division-by-zero-in-stm32.patch-3000 [new file with mode: 0644]
queue-6.6/asoc-tas2781-add-new-driver-version-for-tas2563-tas2.patch [new file with mode: 0644]
queue-6.6/bpf-fix-filed-access-without-lock.patch [new file with mode: 0644]
queue-6.6/can-j1939-fix-error-in-j1939-documentation.patch [new file with mode: 0644]
queue-6.6/drm-panel-orientation-quirks-make-lenovo-yoga-tab-3-.patch [new file with mode: 0644]
queue-6.6/firmware-arm_scmi-reject-clear-channel-request-on-a2.patch [new file with mode: 0644]
queue-6.6/ipmr-fix-access-to-mfc_cache_list-without-lock-held.patch [new file with mode: 0644]
queue-6.6/loongarch-define-a-default-value-for-vm_data_default.patch [new file with mode: 0644]
queue-6.6/mac80211-fix-user-power-when-emulating-chanctx.patch [new file with mode: 0644]
queue-6.6/net-usb-qmi_wwan-add-quectel-rg650v.patch [new file with mode: 0644]
queue-6.6/platform-x86-dell-smbios-base-extends-support-to-ali.patch [new file with mode: 0644]
queue-6.6/platform-x86-dell-wmi-base-handle-meta-key-lock-unlo.patch [new file with mode: 0644]
queue-6.6/platform-x86-thinkpad_acpi-fix-for-thinkpad-s-with-e.patch [new file with mode: 0644]
queue-6.6/proc-softirqs-replace-seq_printf-with-seq_put_decima.patch [new file with mode: 0644]
queue-6.6/regulator-rk808-add-apply_bit-for-buck3-on-rk809.patch [new file with mode: 0644]
queue-6.6/selftests-watchdog-test-fix-system-accidentally-rese.patch [new file with mode: 0644]
queue-6.6/series [new file with mode: 0644]
queue-6.6/soc-qcom-add-check-devm_kasprintf-returned-value.patch [new file with mode: 0644]
queue-6.6/tools-lib-thermal-remove-the-thermal.h-soft-link-whe.patch [new file with mode: 0644]
queue-6.6/usb-add-support-for-new-usb-device-id-0x17ef-0x3098-.patch [new file with mode: 0644]
queue-6.6/usb-typec-use-cleanup-facility-for-altmodes_node.patch [new file with mode: 0644]
queue-6.6/wifi-iwlwifi-mvm-use-the-sync-timepoint-api-in-suspe.patch [new file with mode: 0644]
queue-6.6/wifi-radiotap-avoid-wflex-array-member-not-at-end-wa.patch [new file with mode: 0644]
queue-6.6/x86-amd_nb-fix-compile-testing-without-config_amd_nb.patch [new file with mode: 0644]

diff --git a/queue-6.6/alsa-hda-realtek-add-subwoofer-quirk-for-infinix-zer.patch b/queue-6.6/alsa-hda-realtek-add-subwoofer-quirk-for-infinix-zer.patch
new file mode 100644 (file)
index 0000000..3681e23
--- /dev/null
@@ -0,0 +1,67 @@
+From 498bbddfa15a45dc23d491f68042fcb7981ea554 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <piyushchouhan1598@gmail.com>
+
+[ 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 <piyushchouhan1598@gmail.com>
+Link: https://patch.msgid.link/20241028155516.15552-1-piyuschouhan1598@gmail.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 ffe298eb7b369..75be41086b462 100644
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -7265,6 +7265,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,
+@@ -7644,6 +7645,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[]) {
+@@ -10412,6 +10423,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.6/alsa-usb-audio-fix-yamaha-p-125-quirk-entry.patch b/queue-6.6/alsa-usb-audio-fix-yamaha-p-125-quirk-entry.patch
new file mode 100644 (file)
index 0000000..994ffa1
--- /dev/null
@@ -0,0 +1,56 @@
+From f456ea2a4f2403fcf996c5ed0c7df57945df18e8 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 11 Nov 2024 11:45:21 -0500
+Subject: ALSA: usb-audio: Fix Yamaha P-125 Quirk Entry
+
+From: Eryk Zagorski <erykzagorski@gmail.com>
+
+[ 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 <erykzagorski@gmail.com>
+Link: https://patch.msgid.link/20241111164520.9079-2-erykzagorski@gmail.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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.6/arm-9420-1-smp-fix-smp-for-xip-kernels.patch b/queue-6.6/arm-9420-1-smp-fix-smp-for-xip-kernels.patch
new file mode 100644 (file)
index 0000000..6ff6e04
--- /dev/null
@@ -0,0 +1,84 @@
+From 3a613fbb1743d1f501f4ee7ec5735f3b99ad4599 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 18 Sep 2024 06:57:53 +0100
+Subject: ARM: 9420/1: smp: Fix SMP for xip kernels
+
+From: Harith G <harith.g@alifsemi.com>
+
+[ 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 <harith.g@alifsemi.com>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 28873cda464f5..f22c50d4bd417 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.6/asoc-amd-yc-support-dmic-on-another-model-of-lenovo-.patch b/queue-6.6/asoc-amd-yc-support-dmic-on-another-model-of-lenovo-.patch
new file mode 100644 (file)
index 0000000..1d65a5d
--- /dev/null
@@ -0,0 +1,42 @@
+From 304b0c80b47d1d67111ed82bac61485d14c2d49d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <mp@mpetri.org>
+
+[ 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 <mp@mpetri.org>
+Link: https://patch.msgid.link/20241107094020.1050935-1-mp@localhost
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 08f823cd88699..04700e7471ca5 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.6/asoc-audio-graph-card2-purge-absent-supplies-for-dev.patch b/queue-6.6/asoc-audio-graph-card2-purge-absent-supplies-for-dev.patch
new file mode 100644 (file)
index 0000000..329b072
--- /dev/null
@@ -0,0 +1,54 @@
+From d4e3372e87dbccbd4fe6c0734061f2ea0ec5ebf1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 8 Nov 2024 12:37:15 +1100
+Subject: ASoC: audio-graph-card2: Purge absent supplies for device tree nodes
+
+From: John Watts <contact@jookia.org>
+
+[ 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 <contact@jookia.org>
+Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Link: https://patch.msgid.link/20241108-graph_dt_fix-v1-1-173e2f9603d6@jookia.org
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 b1c675c6b6db6..686e0dea2bc75 100644
+--- a/sound/soc/generic/audio-graph-card2.c
++++ b/sound/soc/generic/audio-graph-card2.c
+@@ -261,16 +261,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.6/asoc-codecs-rt5640-always-disable-irqs-from-rt5640_c.patch b/queue-6.6/asoc-codecs-rt5640-always-disable-irqs-from-rt5640_c.patch
new file mode 100644 (file)
index 0000000..4dc752a
--- /dev/null
@@ -0,0 +1,104 @@
+From 516100fd65fa9bcf2ea86026c80adb4327a6a437 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 24 Oct 2024 23:56:12 +0200
+Subject: ASoC: codecs: rt5640: Always disable IRQs from rt5640_cancel_work()
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+[ Upstream commit 032532f91a1d06d0750f16c49a9698ef5374a68f ]
+
+Disable IRQs from rt5640_cancel_work(), this fixes a crash caused by
+the IRQ never getting freed when the driver is unbound from the i2c_client
+with jack-detection active:
+
+[  193.138780] rt5640 i2c-rt5640: ASoC: unknown pin LDO2
+[  193.138830] rt5640 i2c-rt5640: ASoC: unknown pin MICBIAS1
+[  193.671218] BUG: kernel NULL pointer dereference, address: 0000000000000078
+[  193.671239] #PF: supervisor read access in kernel mode
+[  193.671248] #PF: error_code(0x0000) - not-present page
+...
+[  193.671531]  ? asm_exc_page_fault+0x22/0x30
+[  193.671551]  ? rt5640_jack_inserted+0x10/0x80 [snd_soc_rt5640]
+[  193.671574]  rt5640_detect_headset+0x93/0x130 [snd_soc_rt5640]
+[  193.671596]  rt5640_jack_work+0x93/0x355 [snd_soc_rt5640]
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://patch.msgid.link/20241024215612.92147-1-hdegoede@redhat.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/codecs/rt5640.c | 27 +++++++++++++++------------
+ 1 file changed, 15 insertions(+), 12 deletions(-)
+
+diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
+index e8cdc166bdaa9..1955d77cffd99 100644
+--- a/sound/soc/codecs/rt5640.c
++++ b/sound/soc/codecs/rt5640.c
+@@ -2422,10 +2422,20 @@ static irqreturn_t rt5640_jd_gpio_irq(int irq, void *data)
+       return IRQ_HANDLED;
+ }
+-static void rt5640_cancel_work(void *data)
++static void rt5640_disable_irq_and_cancel_work(void *data)
+ {
+       struct rt5640_priv *rt5640 = data;
++      if (rt5640->jd_gpio_irq_requested) {
++              free_irq(rt5640->jd_gpio_irq, rt5640);
++              rt5640->jd_gpio_irq_requested = false;
++      }
++
++      if (rt5640->irq_requested) {
++              free_irq(rt5640->irq, rt5640);
++              rt5640->irq_requested = false;
++      }
++
+       cancel_delayed_work_sync(&rt5640->jack_work);
+       cancel_delayed_work_sync(&rt5640->bp_work);
+ }
+@@ -2466,13 +2476,7 @@ static void rt5640_disable_jack_detect(struct snd_soc_component *component)
+       if (!rt5640->jack)
+               return;
+-      if (rt5640->jd_gpio_irq_requested)
+-              free_irq(rt5640->jd_gpio_irq, rt5640);
+-
+-      if (rt5640->irq_requested)
+-              free_irq(rt5640->irq, rt5640);
+-
+-      rt5640_cancel_work(rt5640);
++      rt5640_disable_irq_and_cancel_work(rt5640);
+       if (rt5640->jack->status & SND_JACK_MICROPHONE) {
+               rt5640_disable_micbias1_ovcd_irq(component);
+@@ -2480,8 +2484,6 @@ static void rt5640_disable_jack_detect(struct snd_soc_component *component)
+               snd_soc_jack_report(rt5640->jack, 0, SND_JACK_BTN_0);
+       }
+-      rt5640->jd_gpio_irq_requested = false;
+-      rt5640->irq_requested = false;
+       rt5640->jd_gpio = NULL;
+       rt5640->jack = NULL;
+ }
+@@ -2801,7 +2803,8 @@ static int rt5640_suspend(struct snd_soc_component *component)
+       if (rt5640->jack) {
+               /* disable jack interrupts during system suspend */
+               disable_irq(rt5640->irq);
+-              rt5640_cancel_work(rt5640);
++              cancel_delayed_work_sync(&rt5640->jack_work);
++              cancel_delayed_work_sync(&rt5640->bp_work);
+       }
+       snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF);
+@@ -3035,7 +3038,7 @@ static int rt5640_i2c_probe(struct i2c_client *i2c)
+       INIT_DELAYED_WORK(&rt5640->jack_work, rt5640_jack_work);
+       /* Make sure work is stopped on probe-error / remove */
+-      ret = devm_add_action_or_reset(&i2c->dev, rt5640_cancel_work, rt5640);
++      ret = devm_add_action_or_reset(&i2c->dev, rt5640_disable_irq_and_cancel_work, rt5640);
+       if (ret)
+               return ret;
+-- 
+2.43.0
+
diff --git a/queue-6.6/asoc-intel-bytcr_rt5640-add-dmi-quirk-for-vexia-edu-.patch b/queue-6.6/asoc-intel-bytcr_rt5640-add-dmi-quirk-for-vexia-edu-.patch
new file mode 100644 (file)
index 0000000..ef80c93
--- /dev/null
@@ -0,0 +1,53 @@
+From d7f5f2add78d3ef203be6c970edba7df5e0897b3 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <hdegoede@redhat.com>
+
+[ 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 <hdegoede@redhat.com>
+Link: https://patch.msgid.link/20241024211615.79518-2-hdegoede@redhat.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 79c50498144ec..ddf68be0af14a 100644
+--- a/sound/soc/intel/boards/bytcr_rt5640.c
++++ b/sound/soc/intel/boards/bytcr_rt5640.c
+@@ -1132,6 +1132,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.6/asoc-intel-bytcr_rt5640-add-support-for-non-acpi-ins.patch b/queue-6.6/asoc-intel-bytcr_rt5640-add-support-for-non-acpi-ins.patch
new file mode 100644 (file)
index 0000000..83d4923
--- /dev/null
@@ -0,0 +1,93 @@
+From 08a3cfc93ea8f97977493badab8cd0bf9bbc7797 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <hdegoede@redhat.com>
+
+[ 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 <hdegoede@redhat.com>
+Link: https://patch.msgid.link/20241024211615.79518-1-hdegoede@redhat.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 5b8b21ade9cfe..79c50498144ec 100644
+--- a/sound/soc/intel/boards/bytcr_rt5640.c
++++ b/sound/soc/intel/boards/bytcr_rt5640.c
+@@ -17,6 +17,7 @@
+ #include <linux/acpi.h>
+ #include <linux/clk.h>
+ #include <linux/device.h>
++#include <linux/device/bus.h>
+ #include <linux/dmi.h>
+ #include <linux/gpio/consumer.h>
+ #include <linux/gpio/machine.h>
+@@ -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,
+@@ -1697,9 +1700,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.6/asoc-intel-sst-support-lpe0f28-acpi-hid.patch b/queue-6.6/asoc-intel-sst-support-lpe0f28-acpi-hid.patch
new file mode 100644 (file)
index 0000000..f12a3d1
--- /dev/null
@@ -0,0 +1,146 @@
+From 016fc77824b5df6095c4202bb78b4152b3632c25 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <hdegoede@redhat.com>
+
+[ 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 <hdegoede@redhat.com>
+Link: https://patch.msgid.link/20241025090221.52198-1-hdegoede@redhat.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 e7c2ef6c6b4cb..16a3e478e50b9 100644
+--- a/sound/hda/intel-dsp-config.c
++++ b/sound/hda/intel-dsp-config.c
+@@ -721,6 +721,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 29d44c989e5fc..1f9bb1b84949d 100644
+--- a/sound/soc/intel/atom/sst/sst_acpi.c
++++ b/sound/soc/intel/atom/sst/sst_acpi.c
+@@ -125,6 +125,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,
+@@ -268,10 +290,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);
+@@ -280,11 +330,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;
+@@ -344,6 +389,7 @@ static void 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.6/asoc-stm-prevent-potential-division-by-zero-in-stm32.patch b/queue-6.6/asoc-stm-prevent-potential-division-by-zero-in-stm32.patch
new file mode 100644 (file)
index 0000000..06ab2db
--- /dev/null
@@ -0,0 +1,40 @@
+From 43edd760ab2e8af14440e652996240f9abb1a03e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <luoyifan@cmss.chinamobile.com>
+
+[ 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 <luoyifan@cmss.chinamobile.com>
+Link: https://patch.msgid.link/20241106014654.206860-1-luoyifan@cmss.chinamobile.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 0acc848c1f004..1b61110cb9174 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.6/asoc-stm-prevent-potential-division-by-zero-in-stm32.patch-3000 b/queue-6.6/asoc-stm-prevent-potential-division-by-zero-in-stm32.patch-3000
new file mode 100644 (file)
index 0000000..aca71a4
--- /dev/null
@@ -0,0 +1,39 @@
+From 1976cef676ac432b252522da2a695a1fc756af8b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <luoyifan@cmss.chinamobile.com>
+
+[ 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 <luoyifan@cmss.chinamobile.com>
+Reviewed-by: Olivier Moysan <olivier.moysan@foss.st.com>
+Link: https://patch.msgid.link/20241107015936.211902-1-luoyifan@cmss.chinamobile.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 1b61110cb9174..dcbcd1a59a3aa 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.6/asoc-tas2781-add-new-driver-version-for-tas2563-tas2.patch b/queue-6.6/asoc-tas2781-add-new-driver-version-for-tas2563-tas2.patch
new file mode 100644 (file)
index 0000000..3a62c41
--- /dev/null
@@ -0,0 +1,34 @@
+From ccd494c85dd7b92ca3d3bc09283a19b0b27d1d85 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 4 Nov 2024 18:00:55 +0800
+Subject: ASoC: tas2781: Add new driver version for tas2563 & tas2781 qfn chip
+
+From: Shenghao Ding <shenghao-ding@ti.com>
+
+[ Upstream commit fe09de2db2365eed8b44b572cff7d421eaf1754a ]
+
+Add new driver version to support tas2563 & tas2781 qfn chip
+
+Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
+Link: https://patch.msgid.link/20241104100055.48-1-shenghao-ding@ti.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/codecs/tas2781-fmwlib.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/sound/soc/codecs/tas2781-fmwlib.c b/sound/soc/codecs/tas2781-fmwlib.c
+index 629e2195a890b..1cc64ed8de6da 100644
+--- a/sound/soc/codecs/tas2781-fmwlib.c
++++ b/sound/soc/codecs/tas2781-fmwlib.c
+@@ -2022,6 +2022,7 @@ static int tasdevice_dspfw_ready(const struct firmware *fmw,
+               break;
+       case 0x202:
+       case 0x400:
++      case 0x401:
+               tas_priv->fw_parse_variable_header =
+                       fw_parse_variable_header_git;
+               tas_priv->fw_parse_program_data =
+-- 
+2.43.0
+
diff --git a/queue-6.6/bpf-fix-filed-access-without-lock.patch b/queue-6.6/bpf-fix-filed-access-without-lock.patch
new file mode 100644 (file)
index 0000000..4ba4c9d
--- /dev/null
@@ -0,0 +1,64 @@
+From d1706ff7744dff32c58f470258bd724d082d19d2 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 28 Oct 2024 14:52:26 +0800
+Subject: bpf: fix filed access without lock
+
+From: Jiayuan Chen <mrpre@163.com>
+
+[ 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 <mrpre@163.com>
+Link: https://lore.kernel.org/r/20241028065226.35568-1-mrpre@163.com
+Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 fe6178715ba05..915286c3615a2 100644
+--- a/net/ipv4/tcp_bpf.c
++++ b/net/ipv4/tcp_bpf.c
+@@ -221,11 +221,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);
+@@ -238,7 +238,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.6/can-j1939-fix-error-in-j1939-documentation.patch b/queue-6.6/can-j1939-fix-error-in-j1939-documentation.patch
new file mode 100644 (file)
index 0000000..52fad35
--- /dev/null
@@ -0,0 +1,40 @@
+From f753e74ab2270ee166263effdda09509968a0bac Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <alexander.hoelzl@gmx.net>
+
+[ Upstream commit b6ec62e01aa4229bc9d3861d1073806767ea7838 ]
+
+The description of PDU1 format usage mistakenly referred to PDU2 format.
+
+Signed-off-by: Alexander Hölzl <alexander.hoelzl@gmx.net>
+Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
+Acked-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
+Link: https://patch.msgid.link/20241023145257.82709-1-alexander.hoelzl@gmx.net
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 e4bd7aa1f5aa9..544bad175aae2 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.6/drm-panel-orientation-quirks-make-lenovo-yoga-tab-3-.patch b/queue-6.6/drm-panel-orientation-quirks-make-lenovo-yoga-tab-3-.patch
new file mode 100644 (file)
index 0000000..e10cf19
--- /dev/null
@@ -0,0 +1,42 @@
+From 656cfefe40f60490f4d53cf1bd520f31c793a8e9 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <hdegoede@redhat.com>
+
+[ 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 <hdegoede@redhat.com>
+Acked-by: Jani Nikula <jani.nikula@intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20240825132131.6643-1-hdegoede@redhat.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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.6/firmware-arm_scmi-reject-clear-channel-request-on-a2.patch b/queue-6.6/firmware-arm_scmi-reject-clear-channel-request-on-a2.patch
new file mode 100644 (file)
index 0000000..a264ff3
--- /dev/null
@@ -0,0 +1,73 @@
+From e2adaa798b90a163fa4e17f1ef826b68f43131f1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 21 Oct 2024 18:15:44 +0100
+Subject: firmware: arm_scmi: Reject clear channel request on A2P
+
+From: Cristian Marussi <cristian.marussi@arm.com>
+
+[ Upstream commit a0a18e91eb3a6ef75a6de69dc00f206b913e3848 ]
+
+The clear channel transport operation is supposed to be called exclusively
+on the P2A channel from the agent, since it relinquishes the ownership of
+the channel to the platform, after this latter has initiated some sort of
+P2A communication.
+
+Make sure that, if it is ever called on a A2P, is logged and ignored.
+
+Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
+Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
+Message-Id: <20241021171544.2579551-1-cristian.marussi@arm.com>
+Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/firmware/arm_scmi/common.h | 2 ++
+ drivers/firmware/arm_scmi/driver.c | 6 ++++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h
+index 00b165d1f502d..039f686f4580d 100644
+--- a/drivers/firmware/arm_scmi/common.h
++++ b/drivers/firmware/arm_scmi/common.h
+@@ -163,6 +163,7 @@ void scmi_protocol_release(const struct scmi_handle *handle, u8 protocol_id);
+  *      used to initialize this channel
+  * @dev: Reference to device in the SCMI hierarchy corresponding to this
+  *     channel
++ * @is_p2a: A flag to identify a channel as P2A (RX)
+  * @rx_timeout_ms: The configured RX timeout in milliseconds.
+  * @handle: Pointer to SCMI entity handle
+  * @no_completion_irq: Flag to indicate that this channel has no completion
+@@ -174,6 +175,7 @@ void scmi_protocol_release(const struct scmi_handle *handle, u8 protocol_id);
+ struct scmi_chan_info {
+       int id;
+       struct device *dev;
++      bool is_p2a;
+       unsigned int rx_timeout_ms;
+       struct scmi_handle *handle;
+       bool no_completion_irq;
+diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
+index 3962683e2af9d..efa9698c876a0 100644
+--- a/drivers/firmware/arm_scmi/driver.c
++++ b/drivers/firmware/arm_scmi/driver.c
+@@ -855,6 +855,11 @@ static inline void scmi_xfer_command_release(struct scmi_info *info,
+ static inline void scmi_clear_channel(struct scmi_info *info,
+                                     struct scmi_chan_info *cinfo)
+ {
++      if (!cinfo->is_p2a) {
++              dev_warn(cinfo->dev, "Invalid clear on A2P channel !\n");
++              return;
++      }
++
+       if (info->desc->ops->clear_channel)
+               info->desc->ops->clear_channel(cinfo);
+ }
+@@ -2319,6 +2324,7 @@ static int scmi_chan_setup(struct scmi_info *info, struct device_node *of_node,
+       if (!cinfo)
+               return -ENOMEM;
++      cinfo->is_p2a = !tx;
+       cinfo->rx_timeout_ms = info->desc->max_rx_timeout_ms;
+       /* Create a unique name for this transport device */
+-- 
+2.43.0
+
diff --git a/queue-6.6/ipmr-fix-access-to-mfc_cache_list-without-lock-held.patch b/queue-6.6/ipmr-fix-access-to-mfc_cache_list-without-lock-held.patch
new file mode 100644 (file)
index 0000000..08ce9a9
--- /dev/null
@@ -0,0 +1,76 @@
+From 544ea55270b683eba071c32ce9872da091831515 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 8 Nov 2024 06:08:36 -0800
+Subject: ipmr: Fix access to mfc_cache_list without lock held
+
+From: Breno Leitao <leitao@debian.org>
+
+[ 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 <leitao@debian.org>
+Reviewed-by: David Ahern <dsahern@kernel.org>
+Link: https://patch.msgid.link/20241108-ipmr_rcu-v2-1-c718998e209b@debian.org
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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.6/loongarch-define-a-default-value-for-vm_data_default.patch b/queue-6.6/loongarch-define-a-default-value-for-vm_data_default.patch
new file mode 100644 (file)
index 0000000..28e409d
--- /dev/null
@@ -0,0 +1,42 @@
+From 0d6bb2809755e5a60cdcdc81d97424440bc4a888 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 12 Nov 2024 16:35:39 +0800
+Subject: LoongArch: Define a default value for VM_DATA_DEFAULT_FLAGS
+
+From: Yuli Wang <wangyuli@uniontech.com>
+
+[ 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 <guanwentao@uniontech.com>
+Signed-off-by: Yuli Wang <wangyuli@uniontech.com>
+Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 63f137ce82a41..f49c2782c5c4d 100644
+--- a/arch/loongarch/include/asm/page.h
++++ b/arch/loongarch/include/asm/page.h
+@@ -94,10 +94,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
+ 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 <asm-generic/memory_model.h>
+ #include <asm-generic/getorder.h>
+-- 
+2.43.0
+
diff --git a/queue-6.6/mac80211-fix-user-power-when-emulating-chanctx.patch b/queue-6.6/mac80211-fix-user-power-when-emulating-chanctx.patch
new file mode 100644 (file)
index 0000000..1ebe1c8
--- /dev/null
@@ -0,0 +1,37 @@
+From ca47cfabc531b8e8a8b644ce0cd6a7ab2371ee19 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 10 Oct 2024 13:39:54 -0700
+Subject: mac80211: fix user-power when emulating chanctx
+
+From: Ben Greear <greearb@candelatech.com>
+
+[ 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 <greearb@candelatech.com>
+Link: https://patch.msgid.link/20241010203954.1219686-1-greearb@candelatech.com
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/mac80211/main.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/net/mac80211/main.c b/net/mac80211/main.c
+index 71d60f57a886c..d1046f495e63f 100644
+--- a/net/mac80211/main.c
++++ b/net/mac80211/main.c
+@@ -145,6 +145,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.6/net-usb-qmi_wwan-add-quectel-rg650v.patch b/queue-6.6/net-usb-qmi_wwan-add-quectel-rg650v.patch
new file mode 100644 (file)
index 0000000..b6b017d
--- /dev/null
@@ -0,0 +1,65 @@
+From f58f99c65a953b81b61625d69823ecd5b9353341 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <benoit.monin@gmx.fr>
+
+[ 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 <benoit.monin@gmx.fr>
+Reviewed-by: Simon Horman <horms@kernel.org>
+Link: https://patch.msgid.link/20241024151113.53203-1-benoit.monin@gmx.fr
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 2cf4324a12fd1..89775b6d0699a 100644
+--- a/drivers/net/usb/qmi_wwan.c
++++ b/drivers/net/usb/qmi_wwan.c
+@@ -1084,6 +1084,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.6/platform-x86-dell-smbios-base-extends-support-to-ali.patch b/queue-6.6/platform-x86-dell-smbios-base-extends-support-to-ali.patch
new file mode 100644 (file)
index 0000000..531118a
--- /dev/null
@@ -0,0 +1,51 @@
+From 8e5ad290a949e6d06247eccc48e7fc6b50587942 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <kuurtb@gmail.com>
+
+[ 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 <kuurtb@gmail.com>
+Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
+Acked-by: Pali Rohár <pali@kernel.org>
+Link: https://lore.kernel.org/r/20241031154023.6149-2-kuurtb@gmail.com
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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.6/platform-x86-dell-wmi-base-handle-meta-key-lock-unlo.patch b/queue-6.6/platform-x86-dell-wmi-base-handle-meta-key-lock-unlo.patch
new file mode 100644 (file)
index 0000000..85dd25a
--- /dev/null
@@ -0,0 +1,52 @@
+From c4c661ce63f88e4baf06887adc968f9ae0580fea Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <kuurtb@gmail.com>
+
+[ 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 <kuurtb@gmail.com>
+Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
+Acked-by: Pali Rohár <pali@kernel.org>
+Link: https://lore.kernel.org/r/20241031154441.6663-2-kuurtb@gmail.com
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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.6/platform-x86-thinkpad_acpi-fix-for-thinkpad-s-with-e.patch b/queue-6.6/platform-x86-thinkpad_acpi-fix-for-thinkpad-s-with-e.patch
new file mode 100644 (file)
index 0000000..a28151c
--- /dev/null
@@ -0,0 +1,111 @@
+From cabe433b8128dc9516ac8655af1c2a3a7b7872a6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <vishnuocv@gmail.com>
+
+[ 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 <vishnuocv@gmail.com>
+Suggested-by: Mark Pearson <mpearson-lenovo@squebb.ca>
+Link: https://lore.kernel.org/r/20241105235505.8493-1-vishnuocv@gmail.com
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 5b1f08eabd923..964670d4ca1e2 100644
+--- a/drivers/platform/x86/thinkpad_acpi.c
++++ b/drivers/platform/x86/thinkpad_acpi.c
+@@ -8013,6 +8013,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;
+@@ -8655,7 +8656,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);
+@@ -8672,7 +8677,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);
+@@ -8748,6 +8757,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),
+@@ -8769,6 +8779,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)
+@@ -8809,6 +8820,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;
+@@ -9020,7 +9038,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.6/proc-softirqs-replace-seq_printf-with-seq_put_decima.patch b/queue-6.6/proc-softirqs-replace-seq_printf-with-seq_put_decima.patch
new file mode 100644 (file)
index 0000000..9181b60
--- /dev/null
@@ -0,0 +1,39 @@
+From ed6c0aca4d4449b536bd9a43998ad50bd46c52f1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <torvalds@linux-foundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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.6/regulator-rk808-add-apply_bit-for-buck3-on-rk809.patch b/queue-6.6/regulator-rk808-add-apply_bit-for-buck3-on-rk809.patch
new file mode 100644 (file)
index 0000000..4383e76
--- /dev/null
@@ -0,0 +1,43 @@
+From 68d4e12c56ede5ad1ba3a121851f5023660b37d7 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 17 Oct 2024 21:37:28 +0300
+Subject: regulator: rk808: Add apply_bit for BUCK3 on RK809
+
+From: Mikhail Rudenko <mike.rudenko@gmail.com>
+
+[ 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 <mike.rudenko@gmail.com>
+Link: https://patch.msgid.link/20241017-rk809-dcdc3-v1-1-e3c3de92f39c@gmail.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 867a2cf243f68..2c83cb18d60dc 100644
+--- a/drivers/regulator/rk808-regulator.c
++++ b/drivers/regulator/rk808-regulator.c
+@@ -1286,6 +1286,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.6/selftests-watchdog-test-fix-system-accidentally-rese.patch b/queue-6.6/selftests-watchdog-test-fix-system-accidentally-rese.patch
new file mode 100644 (file)
index 0000000..d27e942
--- /dev/null
@@ -0,0 +1,58 @@
+From 0a9c167bbb10369e83b22027f2b167fe5b7fd0f6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 29 Oct 2024 11:13:24 +0800
+Subject: selftests/watchdog-test: Fix system accidentally reset after
+ watchdog-test
+
+From: Li Zhijian <lizhijian@fujitsu.com>
+
+[ 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 <lizhijian@fujitsu.com>
+Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
+Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 bc71cbca0dde7..a1f506ba55786 100644
+--- a/tools/testing/selftests/watchdog/watchdog-test.c
++++ b/tools/testing/selftests/watchdog/watchdog-test.c
+@@ -334,7 +334,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.6/series b/queue-6.6/series
new file mode 100644 (file)
index 0000000..f12fd1b
--- /dev/null
@@ -0,0 +1,33 @@
+wifi-radiotap-avoid-wflex-array-member-not-at-end-wa.patch
+asoc-codecs-rt5640-always-disable-irqs-from-rt5640_c.patch
+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
+usb-typec-use-cleanup-facility-for-altmodes_node.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
+firmware-arm_scmi-reject-clear-channel-request-on-a2.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
+asoc-tas2781-add-new-driver-version-for-tas2563-tas2.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-3000
+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.6/soc-qcom-add-check-devm_kasprintf-returned-value.patch b/queue-6.6/soc-qcom-add-check-devm_kasprintf-returned-value.patch
new file mode 100644 (file)
index 0000000..c3f38ea
--- /dev/null
@@ -0,0 +1,45 @@
+From 7e7f38aff6bb0d3808ada4eb650c7922f825c07a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 29 Sep 2024 15:23:49 +0800
+Subject: soc: qcom: Add check devm_kasprintf() returned value
+
+From: Charles Han <hanchunchao@inspur.com>
+
+[ 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 <hanchunchao@inspur.com>
+Link: https://lore.kernel.org/r/20240929072349.202520-1-hanchunchao@inspur.com
+Signed-off-by: Bjorn Andersson <andersson@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 880b41a57da01..f979ef420354f 100644
+--- a/drivers/soc/qcom/socinfo.c
++++ b/drivers/soc/qcom/socinfo.c
+@@ -757,10 +757,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.6/tools-lib-thermal-remove-the-thermal.h-soft-link-whe.patch b/queue-6.6/tools-lib-thermal-remove-the-thermal.h-soft-link-whe.patch
new file mode 100644 (file)
index 0000000..e2adfdd
--- /dev/null
@@ -0,0 +1,39 @@
+From 66802746d003acd58b3ae4a040d5a897f5d01e77 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <zhangjiao2@cmss.chinamobile.com>
+
+[ 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 <zhangjiao2@cmss.chinamobile.com>
+Link: https://lore.kernel.org/r/20240912045031.18426-1-zhangjiao2@cmss.chinamobile.com
+Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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.6/usb-add-support-for-new-usb-device-id-0x17ef-0x3098-.patch b/queue-6.6/usb-add-support-for-new-usb-device-id-0x17ef-0x3098-.patch
new file mode 100644 (file)
index 0000000..a9e00b9
--- /dev/null
@@ -0,0 +1,41 @@
+From bbab1571a5b6afb20c4291723d8cc5d2e27b9cc8 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <ste3ls@gmail.com>
+
+[ 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 <ste3ls@gmail.com>
+Reviewed-by: Simon Horman <horms@kernel.org>
+Link: https://patch.msgid.link/20241020174128.160898-1-ste3ls@gmail.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 ce19ebd180f12..3e5998555f981 100644
+--- a/drivers/net/usb/r8152.c
++++ b/drivers/net/usb/r8152.c
+@@ -10016,6 +10016,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.6/usb-typec-use-cleanup-facility-for-altmodes_node.patch b/queue-6.6/usb-typec-use-cleanup-facility-for-altmodes_node.patch
new file mode 100644 (file)
index 0000000..173cecb
--- /dev/null
@@ -0,0 +1,49 @@
+From db6b9e08dfc050dfe9970875c4bd350f79feada9 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 21 Oct 2024 22:45:30 +0200
+Subject: usb: typec: use cleanup facility for 'altmodes_node'
+
+From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+
+[ Upstream commit 1ab0b9ae587373f9f800b6fda01b8faf02b3530b ]
+
+Use the __free() macro for 'altmodes_node' to automatically release the
+node when it goes out of scope, removing the need for explicit calls to
+fwnode_handle_put().
+
+Suggested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Link: https://lore.kernel.org/r/20241021-typec-class-fwnode_handle_put-v2-2-3281225d3d27@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/usb/typec/class.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
+index 64bdba7ea9938..afb7192adc8e6 100644
+--- a/drivers/usb/typec/class.c
++++ b/drivers/usb/typec/class.c
+@@ -2147,14 +2147,16 @@ void typec_port_register_altmodes(struct typec_port *port,
+       const struct typec_altmode_ops *ops, void *drvdata,
+       struct typec_altmode **altmodes, size_t n)
+ {
+-      struct fwnode_handle *altmodes_node, *child;
++      struct fwnode_handle *child;
+       struct typec_altmode_desc desc;
+       struct typec_altmode *alt;
+       size_t index = 0;
+       u32 svid, vdo;
+       int ret;
+-      altmodes_node = device_get_named_child_node(&port->dev, "altmodes");
++      struct fwnode_handle *altmodes_node  __free(fwnode_handle) =
++              device_get_named_child_node(&port->dev, "altmodes");
++
+       if (!altmodes_node)
+               return; /* No altmodes specified */
+-- 
+2.43.0
+
diff --git a/queue-6.6/wifi-iwlwifi-mvm-use-the-sync-timepoint-api-in-suspe.patch b/queue-6.6/wifi-iwlwifi-mvm-use-the-sync-timepoint-api-in-suspe.patch
new file mode 100644 (file)
index 0000000..1ead963
--- /dev/null
@@ -0,0 +1,64 @@
+From edd5725e5b22a38cce0d7486b310b50ea14b4ae7 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 10 Oct 2024 14:05:03 +0300
+Subject: wifi: iwlwifi: mvm: Use the sync timepoint API in suspend
+
+From: Daniel Gabay <daniel.gabay@intel.com>
+
+[ 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 <daniel.gabay@intel.com>
+Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
+Link: https://patch.msgid.link/20241010140328.9aae318cd593.I4b322009f39489c0b1d8893495c887870f73ed9c@changeid
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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 08d1fab7f53c3..592b9157d50c6 100644
+--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
++++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+@@ -1382,7 +1382,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.6/wifi-radiotap-avoid-wflex-array-member-not-at-end-wa.patch b/queue-6.6/wifi-radiotap-avoid-wflex-array-member-not-at-end-wa.patch
new file mode 100644 (file)
index 0000000..252919a
--- /dev/null
@@ -0,0 +1,227 @@
+From a2208a23e9e646bc6e706a36318897726c234b27 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 4 Oct 2024 14:14:44 -0600
+Subject: wifi: radiotap: Avoid -Wflex-array-member-not-at-end warnings
+
+From: Gustavo A. R. Silva <gustavoars@kernel.org>
+
+[ Upstream commit 57be3d3562ca4aa62b8047bc681028cc402af8ce ]
+
+-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
+getting ready to enable it, globally.
+
+So, in order to avoid ending up with a flexible-array member in the
+middle of multiple other structs, we use the `__struct_group()`
+helper to create a new tagged `struct ieee80211_radiotap_header_fixed`.
+This structure groups together all the members of the flexible
+`struct ieee80211_radiotap_header` except the flexible array.
+
+As a result, the array is effectively separated from the rest of the
+members without modifying the memory layout of the flexible structure.
+We then change the type of the middle struct members currently causing
+trouble from `struct ieee80211_radiotap_header` to `struct
+ieee80211_radiotap_header_fixed`.
+
+We also want to ensure that in case new members need to be added to the
+flexible structure, they are always included within the newly created
+tagged struct. For this, we use `static_assert()`. This ensures that the
+memory layout for both the flexible structure and the new tagged struct
+is the same after any changes.
+
+This approach avoids having to implement `struct ieee80211_radiotap_header_fixed`
+as a completely separate structure, thus preventing having to maintain
+two independent but basically identical structures, closing the door
+to potential bugs in the future.
+
+So, with these changes, fix the following warnings:
+drivers/net/wireless/ath/wil6210/txrx.c:309:50: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
+drivers/net/wireless/intel/ipw2x00/ipw2100.c:2521:50: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
+drivers/net/wireless/intel/ipw2x00/ipw2200.h:1146:42: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
+drivers/net/wireless/intel/ipw2x00/libipw.h:595:36: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
+drivers/net/wireless/marvell/libertas/radiotap.h:34:42: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
+drivers/net/wireless/marvell/libertas/radiotap.h:5:42: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
+drivers/net/wireless/microchip/wilc1000/mon.c:10:42: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
+drivers/net/wireless/microchip/wilc1000/mon.c:15:42: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
+drivers/net/wireless/virtual/mac80211_hwsim.c:758:42: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
+drivers/net/wireless/virtual/mac80211_hwsim.c:767:42: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
+
+Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
+Link: https://patch.msgid.link/ZwBMtBZKcrzwU7l4@kspp
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/wireless/ath/wil6210/txrx.c       |  2 +-
+ drivers/net/wireless/intel/ipw2x00/ipw2100.c  |  2 +-
+ drivers/net/wireless/intel/ipw2x00/ipw2200.h  |  2 +-
+ .../net/wireless/marvell/libertas/radiotap.h  |  4 +-
+ drivers/net/wireless/microchip/wilc1000/mon.c |  4 +-
+ drivers/net/wireless/virtual/mac80211_hwsim.c |  4 +-
+ include/net/ieee80211_radiotap.h              | 43 +++++++++++--------
+ 7 files changed, 33 insertions(+), 28 deletions(-)
+
+diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c
+index f29ac6de71399..19702b6f09c32 100644
+--- a/drivers/net/wireless/ath/wil6210/txrx.c
++++ b/drivers/net/wireless/ath/wil6210/txrx.c
+@@ -306,7 +306,7 @@ static void wil_rx_add_radiotap_header(struct wil6210_priv *wil,
+                                      struct sk_buff *skb)
+ {
+       struct wil6210_rtap {
+-              struct ieee80211_radiotap_header rthdr;
++              struct ieee80211_radiotap_header_fixed rthdr;
+               /* fields should be in the order of bits in rthdr.it_present */
+               /* flags */
+               u8 flags;
+diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+index 0812db8936f13..9e9ff0cb724ca 100644
+--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
++++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+@@ -2520,7 +2520,7 @@ static void isr_rx_monitor(struct ipw2100_priv *priv, int i,
+        * to build this manually element by element, we can write it much
+        * more efficiently than we can parse it. ORDER MATTERS HERE */
+       struct ipw_rt_hdr {
+-              struct ieee80211_radiotap_header rt_hdr;
++              struct ieee80211_radiotap_header_fixed rt_hdr;
+               s8 rt_dbmsignal; /* signal in dbM, kluged to signed */
+       } *ipw_rt;
+diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.h b/drivers/net/wireless/intel/ipw2x00/ipw2200.h
+index 8ebf09121e173..226286cb7eb82 100644
+--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.h
++++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.h
+@@ -1143,7 +1143,7 @@ struct ipw_prom_priv {
+  * structure is provided regardless of any bits unset.
+  */
+ struct ipw_rt_hdr {
+-      struct ieee80211_radiotap_header rt_hdr;
++      struct ieee80211_radiotap_header_fixed rt_hdr;
+       u64 rt_tsf;      /* TSF */      /* XXX */
+       u8 rt_flags;    /* radiotap packet flags */
+       u8 rt_rate;     /* rate in 500kb/s */
+diff --git a/drivers/net/wireless/marvell/libertas/radiotap.h b/drivers/net/wireless/marvell/libertas/radiotap.h
+index 1ed5608d353ff..d543bfe739dcb 100644
+--- a/drivers/net/wireless/marvell/libertas/radiotap.h
++++ b/drivers/net/wireless/marvell/libertas/radiotap.h
+@@ -2,7 +2,7 @@
+ #include <net/ieee80211_radiotap.h>
+ struct tx_radiotap_hdr {
+-      struct ieee80211_radiotap_header hdr;
++      struct ieee80211_radiotap_header_fixed hdr;
+       u8 rate;
+       u8 txpower;
+       u8 rts_retries;
+@@ -31,7 +31,7 @@ struct tx_radiotap_hdr {
+ #define IEEE80211_FC_DSTODS          0x0300
+ struct rx_radiotap_hdr {
+-      struct ieee80211_radiotap_header hdr;
++      struct ieee80211_radiotap_header_fixed hdr;
+       u8 flags;
+       u8 rate;
+       u8 antsignal;
+diff --git a/drivers/net/wireless/microchip/wilc1000/mon.c b/drivers/net/wireless/microchip/wilc1000/mon.c
+index 03b7229a0ff5a..c3d27aaec2974 100644
+--- a/drivers/net/wireless/microchip/wilc1000/mon.c
++++ b/drivers/net/wireless/microchip/wilc1000/mon.c
+@@ -7,12 +7,12 @@
+ #include "cfg80211.h"
+ struct wilc_wfi_radiotap_hdr {
+-      struct ieee80211_radiotap_header hdr;
++      struct ieee80211_radiotap_header_fixed hdr;
+       u8 rate;
+ } __packed;
+ struct wilc_wfi_radiotap_cb_hdr {
+-      struct ieee80211_radiotap_header hdr;
++      struct ieee80211_radiotap_header_fixed hdr;
+       u8 rate;
+       u8 dump;
+       u16 tx_flags;
+diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c
+index 07be0adc13ec5..d86a1bd7aab08 100644
+--- a/drivers/net/wireless/virtual/mac80211_hwsim.c
++++ b/drivers/net/wireless/virtual/mac80211_hwsim.c
+@@ -736,7 +736,7 @@ static const struct rhashtable_params hwsim_rht_params = {
+ };
+ struct hwsim_radiotap_hdr {
+-      struct ieee80211_radiotap_header hdr;
++      struct ieee80211_radiotap_header_fixed hdr;
+       __le64 rt_tsft;
+       u8 rt_flags;
+       u8 rt_rate;
+@@ -745,7 +745,7 @@ struct hwsim_radiotap_hdr {
+ } __packed;
+ struct hwsim_radiotap_ack_hdr {
+-      struct ieee80211_radiotap_header hdr;
++      struct ieee80211_radiotap_header_fixed hdr;
+       u8 rt_flags;
+       u8 pad;
+       __le16 rt_channel;
+diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h
+index 2338f8d2a8b33..c6cb6f6427423 100644
+--- a/include/net/ieee80211_radiotap.h
++++ b/include/net/ieee80211_radiotap.h
+@@ -24,25 +24,27 @@
+  * struct ieee80211_radiotap_header - base radiotap header
+  */
+ struct ieee80211_radiotap_header {
+-      /**
+-       * @it_version: radiotap version, always 0
+-       */
+-      uint8_t it_version;
+-
+-      /**
+-       * @it_pad: padding (or alignment)
+-       */
+-      uint8_t it_pad;
+-
+-      /**
+-       * @it_len: overall radiotap header length
+-       */
+-      __le16 it_len;
+-
+-      /**
+-       * @it_present: (first) present word
+-       */
+-      __le32 it_present;
++      __struct_group(ieee80211_radiotap_header_fixed, hdr, __packed,
++              /**
++               * @it_version: radiotap version, always 0
++               */
++              uint8_t it_version;
++
++              /**
++               * @it_pad: padding (or alignment)
++               */
++              uint8_t it_pad;
++
++              /**
++               * @it_len: overall radiotap header length
++               */
++              __le16 it_len;
++
++              /**
++               * @it_present: (first) present word
++               */
++              __le32 it_present;
++      );
+       /**
+        * @it_optional: all remaining presence bitmaps
+@@ -50,6 +52,9 @@ struct ieee80211_radiotap_header {
+       __le32 it_optional[];
+ } __packed;
++static_assert(offsetof(struct ieee80211_radiotap_header, it_optional) == sizeof(struct ieee80211_radiotap_header_fixed),
++            "struct member likely outside of __struct_group()");
++
+ /* version is always 0 */
+ #define PKTHDR_RADIOTAP_VERSION       0
+-- 
+2.43.0
+
diff --git a/queue-6.6/x86-amd_nb-fix-compile-testing-without-config_amd_nb.patch b/queue-6.6/x86-amd_nb-fix-compile-testing-without-config_amd_nb.patch
new file mode 100644 (file)
index 0000000..2f5b818
--- /dev/null
@@ -0,0 +1,53 @@
+From e559afa5569934a63e2cf4bc2ec30a5adaa5ca93 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+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 <arnd@arndb.de>
+
+[ 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 <arnd@arndb.de>
+Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
+Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
+Link: https://lore.kernel.org/r/20241029092329.3857004-1-arnd@kernel.org
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ 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
+