From: Sasha Levin Date: Fri, 1 Aug 2025 23:48:54 +0000 (-0400) Subject: Fixes for 6.12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=272cc06eb71093d966eca764287ba003350060e2;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 6.12 Signed-off-by: Sasha Levin --- diff --git a/queue-6.12/alsa-hda-cs35l56-workaround-bad-dev-index-on-lenovo-.patch b/queue-6.12/alsa-hda-cs35l56-workaround-bad-dev-index-on-lenovo-.patch new file mode 100644 index 0000000000..bbd0a82d01 --- /dev/null +++ b/queue-6.12/alsa-hda-cs35l56-workaround-bad-dev-index-on-lenovo-.patch @@ -0,0 +1,165 @@ +From 12c77c8bf1b72a06f648aa4f05fc9fea1192db85 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 14 Jul 2025 12:01:54 +0100 +Subject: ALSA: hda/cs35l56: Workaround bad dev-index on Lenovo Yoga Book 9i + GenX + +From: Richard Fitzgerald + +[ Upstream commit 40b1c2f9b299295ed0482e1fee6f46521e6e79e5 ] + +The Lenovo Yoga Book 9i GenX has the wrong values in the cirrus,dev-index +_DSD property. Add a fixup for this model to ignore the property and +hardcode the index from the I2C bus address. + +The error in the cirrus,dev-index property would prevent the second amp +instance from probing. The component binding would never see all the +required instances and so there would not be a binding between +patch_realtek.c and the cs35l56 driver. + +Signed-off-by: Richard Fitzgerald +Reported-by: Brian Howard +Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220228 +Link: https://patch.msgid.link/20250714110154.204740-1-rf@opensource.cirrus.com +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/pci/hda/cs35l56_hda.c | 110 +++++++++++++++++++++++++++--------- + 1 file changed, 82 insertions(+), 28 deletions(-) + +diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c +index 7baf3b506eef..7823f71012a8 100644 +--- a/sound/pci/hda/cs35l56_hda.c ++++ b/sound/pci/hda/cs35l56_hda.c +@@ -876,6 +876,52 @@ static int cs35l56_hda_system_resume(struct device *dev) + return 0; + } + ++static int cs35l56_hda_fixup_yoga9(struct cs35l56_hda *cs35l56, int *bus_addr) ++{ ++ /* The cirrus,dev-index property has the wrong values */ ++ switch (*bus_addr) { ++ case 0x30: ++ cs35l56->index = 1; ++ return 0; ++ case 0x31: ++ cs35l56->index = 0; ++ return 0; ++ default: ++ /* There is a pseudo-address for broadcast to both amps - ignore it */ ++ dev_dbg(cs35l56->base.dev, "Ignoring I2C address %#x\n", *bus_addr); ++ return 0; ++ } ++} ++ ++static const struct { ++ const char *sub; ++ int (*fixup_fn)(struct cs35l56_hda *cs35l56, int *bus_addr); ++} cs35l56_hda_fixups[] = { ++ { ++ .sub = "17AA390B", /* Lenovo Yoga Book 9i GenX */ ++ .fixup_fn = cs35l56_hda_fixup_yoga9, ++ }, ++}; ++ ++static int cs35l56_hda_apply_platform_fixups(struct cs35l56_hda *cs35l56, const char *sub, ++ int *bus_addr) ++{ ++ int i; ++ ++ if (IS_ERR(sub)) ++ return 0; ++ ++ for (i = 0; i < ARRAY_SIZE(cs35l56_hda_fixups); i++) { ++ if (strcasecmp(cs35l56_hda_fixups[i].sub, sub) == 0) { ++ dev_dbg(cs35l56->base.dev, "Applying fixup for %s\n", ++ cs35l56_hda_fixups[i].sub); ++ return (cs35l56_hda_fixups[i].fixup_fn)(cs35l56, bus_addr); ++ } ++ } ++ ++ return 0; ++} ++ + static int cs35l56_hda_read_acpi(struct cs35l56_hda *cs35l56, int hid, int id) + { + u32 values[HDA_MAX_COMPONENTS]; +@@ -900,39 +946,47 @@ static int cs35l56_hda_read_acpi(struct cs35l56_hda *cs35l56, int hid, int id) + ACPI_COMPANION_SET(cs35l56->base.dev, adev); + } + +- property = "cirrus,dev-index"; +- ret = device_property_count_u32(cs35l56->base.dev, property); +- if (ret <= 0) +- goto err; +- +- if (ret > ARRAY_SIZE(values)) { +- ret = -EINVAL; +- goto err; +- } +- nval = ret; ++ /* Initialize things that could be overwritten by a fixup */ ++ cs35l56->index = -1; + +- ret = device_property_read_u32_array(cs35l56->base.dev, property, values, nval); ++ sub = acpi_get_subsystem_id(ACPI_HANDLE(cs35l56->base.dev)); ++ ret = cs35l56_hda_apply_platform_fixups(cs35l56, sub, &id); + if (ret) +- goto err; ++ return ret; + +- cs35l56->index = -1; +- for (i = 0; i < nval; i++) { +- if (values[i] == id) { +- cs35l56->index = i; +- break; +- } +- } +- /* +- * It's not an error for the ID to be missing: for I2C there can be +- * an alias address that is not a real device. So reject silently. +- */ + if (cs35l56->index == -1) { +- dev_dbg(cs35l56->base.dev, "No index found in %s\n", property); +- ret = -ENODEV; +- goto err; +- } ++ property = "cirrus,dev-index"; ++ ret = device_property_count_u32(cs35l56->base.dev, property); ++ if (ret <= 0) ++ goto err; + +- sub = acpi_get_subsystem_id(ACPI_HANDLE(cs35l56->base.dev)); ++ if (ret > ARRAY_SIZE(values)) { ++ ret = -EINVAL; ++ goto err; ++ } ++ nval = ret; ++ ++ ret = device_property_read_u32_array(cs35l56->base.dev, property, values, nval); ++ if (ret) ++ goto err; ++ ++ for (i = 0; i < nval; i++) { ++ if (values[i] == id) { ++ cs35l56->index = i; ++ break; ++ } ++ } ++ ++ /* ++ * It's not an error for the ID to be missing: for I2C there can be ++ * an alias address that is not a real device. So reject silently. ++ */ ++ if (cs35l56->index == -1) { ++ dev_dbg(cs35l56->base.dev, "No index found in %s\n", property); ++ ret = -ENODEV; ++ goto err; ++ } ++ } + + if (IS_ERR(sub)) { + dev_info(cs35l56->base.dev, +-- +2.39.5 + diff --git a/queue-6.12/asoc-amd-yc-add-dmi-entries-to-support-hp-15-fb1xxx.patch b/queue-6.12/asoc-amd-yc-add-dmi-entries-to-support-hp-15-fb1xxx.patch new file mode 100644 index 0000000000..b679a1a614 --- /dev/null +++ b/queue-6.12/asoc-amd-yc-add-dmi-entries-to-support-hp-15-fb1xxx.patch @@ -0,0 +1,41 @@ +From 960fb57430516bb25c9666e2eba000d4f689a341 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 14 Jul 2025 23:14:24 -0400 +Subject: ASoC: amd: yc: Add DMI entries to support HP 15-fb1xxx + +From: Adam Queler + +[ Upstream commit 949ddec3728f3a793a13c1c9003028b9b159aefc ] + +This model requires an additional detection quirk to +enable the internal microphone. + +Signed-off-by: Adam Queler +Link: https://patch.msgid.link/20250715031434.222062-1-queler+k@gmail.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/amd/yc/acp6x-mach.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c +index 42d123cb8b4c..4bde41663f42 100644 +--- a/sound/soc/amd/yc/acp6x-mach.c ++++ b/sound/soc/amd/yc/acp6x-mach.c +@@ -528,6 +528,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = { + DMI_MATCH(DMI_PRODUCT_NAME, "OMEN by HP Gaming Laptop 16z-n000"), + } + }, ++ { ++ .driver_data = &acp6x_card, ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "HP"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Victus by HP Gaming Laptop 15-fb1xxx"), ++ } ++ }, + { + .driver_data = &acp6x_card, + .matches = { +-- +2.39.5 + diff --git a/queue-6.12/asoc-amd-yc-add-dmi-quirk-for-asus-m6501rm.patch b/queue-6.12/asoc-amd-yc-add-dmi-quirk-for-asus-m6501rm.patch new file mode 100644 index 0000000000..bf1652fb9c --- /dev/null +++ b/queue-6.12/asoc-amd-yc-add-dmi-quirk-for-asus-m6501rm.patch @@ -0,0 +1,41 @@ +From 52e43bd24f194bbca5a6b8c20dcd0c36312350b3 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 8 Jul 2025 01:07:30 +0300 +Subject: ASoC: amd: yc: add DMI quirk for ASUS M6501RM + +From: Alexandru Andries + +[ Upstream commit 6f80be548588429100eb1f5e25dc2a714d583ffe ] + +add DMI entry for ASUS Vivobook PRO 15X (M6501RM) +to make the internal microphone function + +Signed-off-by: Alexandru Andries +Link: https://patch.msgid.link/20250707220730.361290-1-alex.andries.aa@gmail.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/amd/yc/acp6x-mach.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c +index 4bde41663f42..e362c2865ec1 100644 +--- a/sound/soc/amd/yc/acp6x-mach.c ++++ b/sound/soc/amd/yc/acp6x-mach.c +@@ -409,6 +409,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = { + DMI_MATCH(DMI_PRODUCT_NAME, "M6500RC"), + } + }, ++ { ++ .driver_data = &acp6x_card, ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."), ++ DMI_MATCH(DMI_PRODUCT_NAME, "M6501RM"), ++ } ++ }, + { + .driver_data = &acp6x_card, + .matches = { +-- +2.39.5 + diff --git a/queue-6.12/asoc-amd-yc-add-dmi-quirk-for-hp-laptop-17-cp-2033dx.patch b/queue-6.12/asoc-amd-yc-add-dmi-quirk-for-hp-laptop-17-cp-2033dx.patch new file mode 100644 index 0000000000..a598b4fc55 --- /dev/null +++ b/queue-6.12/asoc-amd-yc-add-dmi-quirk-for-hp-laptop-17-cp-2033dx.patch @@ -0,0 +1,40 @@ +From a98b3199148e54016ba853da4da204235d9ada41 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 15 Jul 2025 13:20:38 -0500 +Subject: ASoC: amd: yc: Add DMI quirk for HP Laptop 17 cp-2033dx + +From: Lane Odenbach + +[ Upstream commit 7bab1bd9fdf15b9fa7e6a4b0151deab93df3c80d ] + +This fixes the internal microphone in the stated device + +Signed-off-by: Lane Odenbach +Link: https://patch.msgid.link/20250715182038.10048-1-laodenbach@gmail.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/amd/yc/acp6x-mach.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c +index 1689b6b22598..42d123cb8b4c 100644 +--- a/sound/soc/amd/yc/acp6x-mach.c ++++ b/sound/soc/amd/yc/acp6x-mach.c +@@ -577,6 +577,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = { + DMI_MATCH(DMI_BOARD_NAME, "8A7F"), + } + }, ++ { ++ .driver_data = &acp6x_card, ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "HP"), ++ DMI_MATCH(DMI_BOARD_NAME, "8A81"), ++ } ++ }, + { + .driver_data = &acp6x_card, + .matches = { +-- +2.39.5 + diff --git a/queue-6.12/asoc-intel-fix-snd_soc_sof-dependencies.patch b/queue-6.12/asoc-intel-fix-snd_soc_sof-dependencies.patch new file mode 100644 index 0000000000..8c41b140af --- /dev/null +++ b/queue-6.12/asoc-intel-fix-snd_soc_sof-dependencies.patch @@ -0,0 +1,64 @@ +From 90380e83b9471d2659aa5b7f71e73f2048bf0bf0 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 9 Jul 2025 16:56:07 +0200 +Subject: ASoC: Intel: fix SND_SOC_SOF dependencies + +From: Arnd Bergmann + +[ Upstream commit e837b59f8b411b5baf5e3de7a5aea10b1c545a63 ] + +It is currently possible to configure a kernel with all Intel SoC +configs as loadable modules, but the board config as built-in. This +causes a link failure in the reference to the snd_soc_sof.ko module: + +x86_64-linux-ld: sound/soc/intel/boards/sof_rt5682.o: in function `sof_rt5682_hw_params': +sof_rt5682.c:(.text+0x1f9): undefined reference to `sof_dai_get_mclk' +x86_64-linux-ld: sof_rt5682.c:(.text+0x234): undefined reference to `sof_dai_get_bclk' +x86_64-linux-ld: sound/soc/intel/boards/sof_rt5682.o: in function `sof_rt5682_codec_init': +sof_rt5682.c:(.text+0x3e0): undefined reference to `sof_dai_get_mclk' +x86_64-linux-ld: sound/soc/intel/boards/sof_cs42l42.o: in function `sof_cs42l42_hw_params': +sof_cs42l42.c:(.text+0x2a): undefined reference to `sof_dai_get_bclk' +x86_64-linux-ld: sound/soc/intel/boards/sof_nau8825.o: in function `sof_nau8825_hw_params': +sof_nau8825.c:(.text+0x7f): undefined reference to `sof_dai_get_bclk' +x86_64-linux-ld: sound/soc/intel/boards/sof_da7219.o: in function `da7219_codec_init': +sof_da7219.c:(.text+0xbf): undefined reference to `sof_dai_get_mclk' +x86_64-linux-ld: sound/soc/intel/boards/sof_maxim_common.o: in function `max_98373_hw_params': +sof_maxim_common.c:(.text+0x6f9): undefined reference to `sof_dai_get_tdm_slots' +x86_64-linux-ld: sound/soc/intel/boards/sof_realtek_common.o: in function `rt1015_hw_params': +sof_realtek_common.c:(.text+0x54c): undefined reference to `sof_dai_get_bclk' +x86_64-linux-ld: sound/soc/intel/boards/sof_realtek_common.o: in function `rt1308_hw_params': +sof_realtek_common.c:(.text+0x702): undefined reference to `sof_dai_get_mclk' +x86_64-linux-ld: sound/soc/intel/boards/sof_cirrus_common.o: in function `cs35l41_hw_params': +sof_cirrus_common.c:(.text+0x2f): undefined reference to `sof_dai_get_bclk' + +Add an optional dependency on SND_SOC_SOF_INTEL_COMMON, to ensure that whenever +the SOF support is in a loadable module, none of the board code can be built-in. + +This may be be a little heavy-handed, but I also don't see a reason why one would +want the boards to be built-in but not the SoC, so it shouldn't actually cause +any usability problems. + +Signed-off-by: Arnd Bergmann +Link: https://patch.msgid.link/20250709145626.64125-1-arnd@kernel.org +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/intel/boards/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig +index 8dee46abf346..aed95d1583e0 100644 +--- a/sound/soc/intel/boards/Kconfig ++++ b/sound/soc/intel/boards/Kconfig +@@ -11,7 +11,7 @@ menuconfig SND_SOC_INTEL_MACH + kernel: saying N will just cause the configurator to skip all + the questions about Intel ASoC machine drivers. + +-if SND_SOC_INTEL_MACH ++if SND_SOC_INTEL_MACH && (SND_SOC_SOF_INTEL_COMMON || !SND_SOC_SOF_INTEL_COMMON) + + config SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES + bool "Use more user friendly long card names" +-- +2.39.5 + diff --git a/queue-6.12/ethernet-intel-fix-building-with-large-nr_cpus.patch b/queue-6.12/ethernet-intel-fix-building-with-large-nr_cpus.patch new file mode 100644 index 0000000000..91ce3dda36 --- /dev/null +++ b/queue-6.12/ethernet-intel-fix-building-with-large-nr_cpus.patch @@ -0,0 +1,100 @@ +From efd7e454a11a29254e2e3aff8c53527d30f617b2 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 20 Jun 2025 19:31:24 +0200 +Subject: ethernet: intel: fix building with large NR_CPUS +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Arnd Bergmann + +[ Upstream commit 24171a5a4a952c26568ff0d2a0bc8c4708a95e1d ] + +With large values of CONFIG_NR_CPUS, three Intel ethernet drivers fail to +compile like: + +In function ‘i40e_free_q_vector’, + inlined from ‘i40e_vsi_alloc_q_vectors’ at drivers/net/ethernet/intel/i40e/i40e_main.c:12112:3: + 571 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) +include/linux/rcupdate.h:1084:17: note: in expansion of macro ‘BUILD_BUG_ON’ + 1084 | BUILD_BUG_ON(offsetof(typeof(*(ptr)), rhf) >= 4096); \ +drivers/net/ethernet/intel/i40e/i40e_main.c:5113:9: note: in expansion of macro ‘kfree_rcu’ + 5113 | kfree_rcu(q_vector, rcu); + | ^~~~~~~~~ + +The problem is that the 'rcu' member in 'q_vector' is too far from the start +of the structure. Move this member before the CPU mask instead, in all three +drivers. + +Signed-off-by: Arnd Bergmann +Acked-by: David S. Miller +Reviewed-by: Aleksandr Loktionov +Reviewed-by: Alexander Lobakin +Tested-by: Sunitha Mekala (A Contingent worker at Intel) +Signed-off-by: Tony Nguyen +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/intel/fm10k/fm10k.h | 3 ++- + drivers/net/ethernet/intel/i40e/i40e.h | 2 +- + drivers/net/ethernet/intel/ixgbe/ixgbe.h | 3 ++- + 3 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/ethernet/intel/fm10k/fm10k.h b/drivers/net/ethernet/intel/fm10k/fm10k.h +index 6119a4108838..65a2816142d9 100644 +--- a/drivers/net/ethernet/intel/fm10k/fm10k.h ++++ b/drivers/net/ethernet/intel/fm10k/fm10k.h +@@ -189,13 +189,14 @@ struct fm10k_q_vector { + struct fm10k_ring_container rx, tx; + + struct napi_struct napi; ++ struct rcu_head rcu; /* to avoid race with update stats on free */ ++ + cpumask_t affinity_mask; + char name[IFNAMSIZ + 9]; + + #ifdef CONFIG_DEBUG_FS + struct dentry *dbg_q_vector; + #endif /* CONFIG_DEBUG_FS */ +- struct rcu_head rcu; /* to avoid race with update stats on free */ + + /* for dynamic allocation of rings associated with this q_vector */ + struct fm10k_ring ring[] ____cacheline_internodealigned_in_smp; +diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h +index d4255c2706fa..b22bb0ae9b9d 100644 +--- a/drivers/net/ethernet/intel/i40e/i40e.h ++++ b/drivers/net/ethernet/intel/i40e/i40e.h +@@ -943,6 +943,7 @@ struct i40e_q_vector { + u16 reg_idx; /* register index of the interrupt */ + + struct napi_struct napi; ++ struct rcu_head rcu; /* to avoid race with update stats on free */ + + struct i40e_ring_container rx; + struct i40e_ring_container tx; +@@ -953,7 +954,6 @@ struct i40e_q_vector { + cpumask_t affinity_mask; + struct irq_affinity_notify affinity_notify; + +- struct rcu_head rcu; /* to avoid race with update stats on free */ + char name[I40E_INT_NAME_STR_LEN]; + bool arm_wb_state; + bool in_busy_poll; +diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h +index 559b443c409f..c1f29296c1d5 100644 +--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h ++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h +@@ -503,9 +503,10 @@ struct ixgbe_q_vector { + struct ixgbe_ring_container rx, tx; + + struct napi_struct napi; ++ struct rcu_head rcu; /* to avoid race with update stats on free */ ++ + cpumask_t affinity_mask; + int numa_node; +- struct rcu_head rcu; /* to avoid race with update stats on free */ + char name[IFNAMSIZ + 9]; + + /* for dynamic allocation of rings associated with this q_vector */ +-- +2.39.5 + diff --git a/queue-6.12/series b/queue-6.12/series new file mode 100644 index 0000000000..05489eef2a --- /dev/null +++ b/queue-6.12/series @@ -0,0 +1,6 @@ +asoc-amd-yc-add-dmi-quirk-for-hp-laptop-17-cp-2033dx.patch +ethernet-intel-fix-building-with-large-nr_cpus.patch +asoc-amd-yc-add-dmi-entries-to-support-hp-15-fb1xxx.patch +alsa-hda-cs35l56-workaround-bad-dev-index-on-lenovo-.patch +asoc-intel-fix-snd_soc_sof-dependencies.patch +asoc-amd-yc-add-dmi-quirk-for-asus-m6501rm.patch