Re: [PATCH v3] PCI/portdrv: Allow probing even without child services

From: David Matlack

Date: Mon Jun 22 2026 - 16:35:23 EST


On Fri, May 8, 2026 at 1:36 PM Brian Norris <briannorris@xxxxxxxxxxxx> wrote:
>
> The PCIe port driver fails to probe if it finds no child services,
> presumably under the assumption that the driver is not useful in that
> case. However, the driver *can* still be useful for power management
> support -- namely, it still configures the port for runtime PM / D3,
> which may be important for allowing a bridge to enter low power modes.
>
> Thus, allow probe to succeed even if no IRQs and no child services are
> available. This also mirrors existing behavior for ports that have no
> PCIe capabilities, where we'd also probe successfully.
>
> This change is a bit more important after commit f5cd8a929c82 ("PCI:
> dwc: Remove MSI/MSIX capability for Root Port if iMSI-RX is used as MSI
> controller"), because it's common for some DWC-based systems to:
>
> 1. have only have the "aer" and "pcie_pme" port services available and
> 2. not define legacy INTx interrupts properly in their device tree.
>
> After commit f5cd8a929c82, such systems may fail
> pcie_init_service_irqs() and so exit with -ENODEV.
>
> Link: https://lore.kernel.org/all/nyada24tqwlkzdceyoxbzitzygvp4elvj5oajnqdwb33xkcdwk@76vnrx45fsfd/
> Signed-off-by: Brian Norris <briannorris@xxxxxxxxxxxx>

Hi Brian,

I am interested in this support as well for Live Update scenarios [1].
Allowing pcieport to probe avoids disabling bus mastering during boot
on preserved bridges (failed probe calls pci_disable_device()). Bus
Mastering is eventually re-enabled when a downstream device calls
pci_enable_device(), but during the window that it is disabled
downstream devices cannot perform any memory transactions.

[1] https://lore.kernel.org/linux-pci/20260522202410.3104264-1-dmatlack@xxxxxxxxxx/