Re: [PATCH v1 7/7] ACPI: scan: Take PCI device enumeration into account directly

From: Andy Shevchenko

Date: Tue Sep 01 2026 - 04:46:07 EST


On Mon, Aug 31, 2026 at 07:59:48PM +0200, Rafael J. Wysocki wrote:

> The ACPI companions of PCI devices are associated with the corresponding
> PCI devices before being processed by acpi_scan_attach() and by the time
> they are passed to attach_subtree(), the PCI devices associated with
> them have been already enumerated and initialized (including power
> management initialization).
>
> Accordingly, it is not necessary or even useful to check their status in
> attach_subtree(), so do not do that.

...

> + if (pci) {
> + acpi_handle_debug(device->handle, "PCI companion %s found\n",
> + dev_name(&pci->dev));

We have pci_name().

> +
> + pci_dev_put(pci);
> + } else {
> + acpi_bus_get_status(device);
> + /*
> + * Skip devices that are not ready for enumeration (e.g. not
> + * present).
> + */
> + if (!acpi_dev_ready_for_enumeration(device))
> + return 0;
> + }

--
With Best Regards,
Andy Shevchenko