]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Jan 2026 10:55:07 +0000 (11:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Jan 2026 10:55:07 +0000 (11:55 +0100)
added patches:
alsa-hda-intel-dsp-config-prefer-legacy-driver-as-fallback.patch
ublk-reorder-tag_set-initialization-before-queue-allocation.patch

queue-6.18/alsa-hda-intel-dsp-config-prefer-legacy-driver-as-fallback.patch [new file with mode: 0644]
queue-6.18/series
queue-6.18/ublk-reorder-tag_set-initialization-before-queue-allocation.patch [new file with mode: 0644]

diff --git a/queue-6.18/alsa-hda-intel-dsp-config-prefer-legacy-driver-as-fallback.patch b/queue-6.18/alsa-hda-intel-dsp-config-prefer-legacy-driver-as-fallback.patch
new file mode 100644 (file)
index 0000000..0639e43
--- /dev/null
@@ -0,0 +1,67 @@
+From 161a0c617ab172bbcda7ce61803addeb2124dbff Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Wed, 10 Dec 2025 14:15:51 +0100
+Subject: ALSA: hda: intel-dsp-config: Prefer legacy driver as fallback
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 161a0c617ab172bbcda7ce61803addeb2124dbff upstream.
+
+When config table entries don't match with the device to be probed,
+currently we fall back to SND_INTEL_DSP_DRIVER_ANY, which means to
+allow any drivers to bind with it.
+
+This was set so with the assumption (or hope) that all controller
+drivers should cover the devices generally, but in practice, this
+caused a problem as reported recently.  Namely, when a specific
+kconfig for SOF isn't set for the modern Intel chips like Alderlake,
+a wrong driver (AVS) got probed and failed.  This is because we have
+entries like:
+
+ #if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE)
+ /* Alder Lake / Raptor Lake */
+       {
+               .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+               .device = PCI_DEVICE_ID_INTEL_HDA_ADL_S,
+       },
+ ....
+ #endif
+
+so this entry is effective only when CONFIG_SND_SOC_SOF_ALDERLAKE is
+set.  If not set, there is no matching entry, hence it returns
+SND_INTEL_DSP_DRIVER_ANY as fallback.  OTOH, if the kconfig is set, it
+explicitly falls back to SND_INTEL_DSP_DRIVER_LEGACY when no DMIC or
+SoundWire is found -- that was the working scenario.  That being said,
+the current setup may be broken for modern Intel chips that are
+supposed to work with either SOF or legacy driver when the
+corresponding kconfig were missing.
+
+For addressing the problem above, this patch changes the fallback
+driver to the legacy driver, i.e. return SND_INTEL_DSP_DRIVER_LEGACY
+type as much as possible.  When CONFIG_SND_HDA_INTEL is also disabled,
+the fallback is set to SND_INTEL_DSP_DRIVER_ANY type, just to be sure.
+
+Reported-by: Askar Safin <safinaskar@gmail.com>
+Closes: https://lore.kernel.org/all/20251014034156.4480-1-safinaskar@gmail.com/
+Tested-by: Askar Safin <safinaskar@gmail.com>
+Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Link: https://patch.msgid.link/20251210131553.184404-1-tiwai@suse.de
+Cc: Askar Safin <safinaskar@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/hda/core/intel-dsp-config.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/sound/hda/core/intel-dsp-config.c
++++ b/sound/hda/core/intel-dsp-config.c
+@@ -710,7 +710,8 @@ int snd_intel_dsp_driver_probe(struct pc
+       /* find the configuration for the specific device */
+       cfg = snd_intel_dsp_find_config(pci, config_table, ARRAY_SIZE(config_table));
+       if (!cfg)
+-              return SND_INTEL_DSP_DRIVER_ANY;
++              return IS_ENABLED(CONFIG_SND_HDA_INTEL) ?
++                      SND_INTEL_DSP_DRIVER_LEGACY : SND_INTEL_DSP_DRIVER_ANY;
+       if (cfg->flags & FLAG_SOF) {
+               if (cfg->flags & FLAG_SOF_ONLY_IF_SOUNDWIRE &&
index ccb492a3f328d09a879fdb45f0b2e069e6a7c2ff..2552beb2be193b093830e7b1c6488cbd04962598 100644 (file)
@@ -42,3 +42,5 @@ libceph-make-free_choose_arg_map-resilient-to-partial-allocation.patch
 libceph-return-the-handler-error-from-mon_handle_auth_done.patch
 libceph-reset-sparse-read-state-in-osd_fault.patch
 libceph-make-calc_target-set-t-paused-not-just-clear-it.patch
+ublk-reorder-tag_set-initialization-before-queue-allocation.patch
+alsa-hda-intel-dsp-config-prefer-legacy-driver-as-fallback.patch
diff --git a/queue-6.18/ublk-reorder-tag_set-initialization-before-queue-allocation.patch b/queue-6.18/ublk-reorder-tag_set-initialization-before-queue-allocation.patch
new file mode 100644 (file)
index 0000000..51f07ef
--- /dev/null
@@ -0,0 +1,65 @@
+From 011af85ccd871526df36988c7ff20ca375fb804d Mon Sep 17 00:00:00 2001
+From: Ming Lei <ming.lei@redhat.com>
+Date: Sat, 1 Nov 2025 21:31:16 +0800
+Subject: ublk: reorder tag_set initialization before queue allocation
+
+From: Ming Lei <ming.lei@redhat.com>
+
+commit 011af85ccd871526df36988c7ff20ca375fb804d upstream.
+
+Move ublk_add_tag_set() before ublk_init_queues() in the device
+initialization path. This allows us to use the blk-mq CPU-to-queue
+mapping established by the tag_set to determine the appropriate
+NUMA node for each queue allocation.
+
+The error handling paths are also reordered accordingly.
+
+Reviewed-by: Caleb Sander Mateos <csander@purestorage.com>
+Signed-off-by: Ming Lei <ming.lei@redhat.com>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+[ Upstream commit 529d4d632788 ("ublk: implement NUMA-aware memory allocation")
+  is ported to linux-6.18.y, but it depends on commit 011af85ccd87 ("ublk:
+  reorder tag_set initialization before queue allocation"). kernel panic is
+  reported on 6.18.y: https://github.com/ublk-org/ublksrv/issues/174 ]
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/block/ublk_drv.c |   12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+--- a/drivers/block/ublk_drv.c
++++ b/drivers/block/ublk_drv.c
+@@ -3280,17 +3280,17 @@ static int ublk_ctrl_add_dev(const struc
+                       ub->dev_info.nr_hw_queues, nr_cpu_ids);
+       ublk_align_max_io_size(ub);
+-      ret = ublk_init_queues(ub);
++      ret = ublk_add_tag_set(ub);
+       if (ret)
+               goto out_free_dev_number;
+-      ret = ublk_add_tag_set(ub);
++      ret = ublk_init_queues(ub);
+       if (ret)
+-              goto out_deinit_queues;
++              goto out_free_tag_set;
+       ret = -EFAULT;
+       if (copy_to_user(argp, &ub->dev_info, sizeof(info)))
+-              goto out_free_tag_set;
++              goto out_deinit_queues;
+       /*
+        * Add the char dev so that ublksrv daemon can be setup.
+@@ -3299,10 +3299,10 @@ static int ublk_ctrl_add_dev(const struc
+       ret = ublk_add_chdev(ub);
+       goto out_unlock;
+-out_free_tag_set:
+-      blk_mq_free_tag_set(&ub->tag_set);
+ out_deinit_queues:
+       ublk_deinit_queues(ub);
++out_free_tag_set:
++      blk_mq_free_tag_set(&ub->tag_set);
+ out_free_dev_number:
+       ublk_free_dev_number(ub);
+ out_free_ub: