* [PATCH] ALSA: hda: Fix PCI connectivity check for parent buses
@ 2026-12-05 11:43 Sreeraj S Kurup
2026-12-05 11:51 ` sashiko-bot
2026-12-05 12:16 ` Sreeraj S Kurup
0 siblings, 2 replies; 3+ messages in thread
From: Sreeraj S Kurup @ 2026-12-05 11:43 UTC (permalink / raw)
To: tiwai, perex; +Cc: linux-sound, linux-kernel, Sreeraj S Kurup
The connectivity_check() function checks whether the i915 GPU and
HD-audio controller are connected through the same PCI bus.
When checking their parent buses, both parent pointers can be NULL
if the devices are on different PCI root buses.
The current code compares these pointers before checking for NULL.
Since two NULL pointers are equal, the function incorrectly reports
that the devices are connected.
Move the NULL check before the parent bus comparison to prevent
this false positive.
Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
---
sound/hda/core/i915.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/hda/core/i915.c b/sound/hda/core/i915.c
index 6c068b135b7d..1eed61ce65df 100644
--- a/sound/hda/core/i915.c
+++ b/sound/hda/core/i915.c
@@ -85,12 +85,12 @@ static bool connectivity_check(struct pci_dev *i915, struct pci_dev *hdac)
bus_b = bus_b->parent;
/* connected via parent bus (may be NULL!) */
- if (bus_a == bus_b)
- return true;
-
if (!bus_a || !bus_b)
return false;
+ if (bus_a == bus_b)
+ return true;
+
/*
* on i915 discrete GPUs with embedded HDA audio, the two
* devices are connected via 2nd level PCI bridge
--
2.55.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: hda: Fix PCI connectivity check for parent buses
2026-12-05 11:43 [PATCH] ALSA: hda: Fix PCI connectivity check for parent buses Sreeraj S Kurup
@ 2026-12-05 11:51 ` sashiko-bot
2026-12-05 12:16 ` Sreeraj S Kurup
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-12-05 11:51 UTC (permalink / raw)
To: Sreeraj S Kurup; +Cc: linux-sound
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] ALSA: hda: connectivity_check() breaks Intel ARL multi-root-bus
audio binding
--
commit 60aeddc7ec61e2fe3abd4cdb7085d0b8590dd4c2
Author: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
ALSA: hda: Fix PCI connectivity check for parent buses
This commit moves the NULL check on bus_a and bus_b ahead of the
bus_a == bus_b comparison in connectivity_check().
> diff --git a/sound/hda/core/i915.c b/sound/hda/core/i915.c
> index 6c068b135b7dc..1eed61ce65dfc 100644
> --- a/sound/hda/core/i915.c
> +++ b/sound/hda/core/i915.c
> @@ -85,12 +85,12 @@ static bool connectivity_check(struct pci_dev *i915, struct pci_dev *hdac)
> bus_b = bus_b->parent;
>
> /* connected via parent bus (may be NULL!) */
> - if (bus_a == bus_b)
> - return true;
> -
> if (!bus_a || !bus_b)
> return false;
>
> + if (bus_a == bus_b)
> + return true;
[Severity: High]
Does moving the NULL check before bus_a == bus_b break i915/xe display
audio binding on Intel Arrow Lake multi-root-bus systems?
Commit 3f8c530fc458 ("ALSA: hda/i915: extend connectivity check to cover
Intel ARL") intentionally placed bus_a == bus_b ahead of the NULL check,
as noted by the "may be NULL!" comment, because the integrated GPU and
HD-audio controller sit on different PCI root buses with NULL parents.
With this change, connectivity_check() returns false on those systems,
which causes i915_gfx_present() to return false and snd_hdac_i915_init()
to fail with -ENODEV, disabling display audio component binding.
If devices in separate PCI domains need to be excluded, checking
pci_domain_nr(i915->bus) == pci_domain_nr(hdac->bus) when both parents
are NULL would preserve multi-root-bus support.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261205114349.4074-1-sreekuttan2156239@gmail.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ALSA: hda: Fix PCI connectivity check for parent buses
2026-12-05 11:43 [PATCH] ALSA: hda: Fix PCI connectivity check for parent buses Sreeraj S Kurup
2026-12-05 11:51 ` sashiko-bot
@ 2026-12-05 12:16 ` Sreeraj S Kurup
1 sibling, 0 replies; 3+ messages in thread
From: Sreeraj S Kurup @ 2026-12-05 12:16 UTC (permalink / raw)
To: sreekuttan2156239, perex, tiwai; +Cc: linux-kernel, linux-sound
Hi,
Thanks for the review. You're right.
Sashiko AI pointed out an issue in my patch.
The original NULL check order is needed for
Intel Arrow Lake systems.
Moving the NULL check before the bus comparison
could break display audio support.
I'll withdraw my patch and keep the original code.
Special thanks to Sashiko AI for catching this issue, and
thanks to the maintainers and everyone following this patch.
Best regards,
Sreeraj
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-12-05 12:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-05 11:43 [PATCH] ALSA: hda: Fix PCI connectivity check for parent buses Sreeraj S Kurup
2026-12-05 11:51 ` sashiko-bot
2026-12-05 12:16 ` Sreeraj S Kurup
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.