Re: [REGRESSION] PCI: Dynamic OF node creation hangs on invalid bridge configuration
From: Andrea della Porta
Date: Tue Sep 15 2026 - 06:30:17 EST
Hi Angel,
On 23:28 Mon 14 Sep , Angel J wrote:
> Ok, here it is...
>
> I tested this quirk on Linux 6.18.44 with CONFIG_PCI_DYNAMIC_OF_NODES=y,
> and it boots without either OF fix. The diff below omits the test logging.
>
> PCI_FIXUP_HEADER runs after the resources have been parsed using the
> original header type, and changing hdr_type also affects configuration
> restore. I don't know enough about this part of PCI to judge whether
> that's safe, so I'll wait for your advice before submitting it as a patch.
Thanks you for your submission!
LGTM. Maybe you can play, if you don't already, with pci=realloc,assign-busses
kernel cmdline options and writing in remove/rescan under /sys/bus/pci/*
(watch out: this could kill your system). But better to ask for opinions
from PCI experts.
Thanks,
Andrea
>
> Thanks,
> Angel J
>
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index de9bbccda..57df88a38 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -291,6 +291,22 @@ static int __init pci_apply_final_quirks(void)
> }
> fs_initcall_sync(pci_apply_final_quirks);
>
>
> +/*
> + * On the Dell XPS 8940, 8086:4c43 reports a PCI-to-PCI bridge but has no
> + * downstream bus. Use host-bridge class and a normal header so that
> + * pci_is_bridge() does not send it through bridge scanning.
> + */
> +static void quirk_intel_4c43_host_bridge(struct pci_dev *dev)
> +{
> + if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI ||
> + dev->hdr_type != PCI_HEADER_TYPE_BRIDGE)
> + return;
> +
> + dev->class = (PCI_CLASS_BRIDGE_HOST << 8) | (dev->class & 0xff);
> + dev->hdr_type = PCI_HEADER_TYPE_NORMAL;
> +}
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x4c43, quirk_intel_4c43_host_bridge);
> +
> /*
> * Decoding should be disabled for a PCI device during BAR sizing to avoid
> * conflict. But doing so may cause problems on host bridge and perhaps other