Re: [PATCH] PCI: aspeed: Drop PROBE_PREFER_ASYNCHRONOUS to fix enumeration race

From: Manivannan Sadhasivam

Date: Sun Nov 22 2026 - 19:50:41 EST


On 2026-11-09 19:57 +0800, Jacky Chou wrote:
> The ASPEED PCIe RC driver opts in to asynchronous probing via
> PROBE_PREFER_ASYNCHRONOUS. This allows the driver core to probe it
> on a kthread in parallel with other drivers instead of waiting for
> it to finish during the synchronous probe pass.
>
> On boards where a PCIe endpoint driver is bound early (e.g. built
> into the kernel or probed from an initcall that runs before late_
> initcall), this races against the RC driver: the EP driver can start
> probing before the RC driver has finished enumerating the bus, so the
> EP device is not yet present and the EP driver fails to bind.
>
> Remove PROBE_PREFER_ASYNCHRONOUS so the RC driver probes
> synchronously again, guaranteeing that bus enumeration completes
> before any downstream EP driver's probe() runs.
>

I don't understand the problem here. EP drivers will get enumerated only during
bus scan, which depends on the RC driver's pci_host_probe() call.

Are you saying that the PCI devices are created before RC driver probe and
gettting enumerated? Not sure how that can happen.

- Mani