Re: [PATCH 4/5] PCI: Enable async shutdown support

From: Bjorn Helgaas

Date: Wed May 06 2026 - 14:32:34 EST


On Wed, Apr 29, 2026 at 01:50:15PM -0400, David Jeffery wrote:
> Like its async suspend support, allow PCI device shutdown to be performed
> asynchronously to reduce shutdown time.
>
> Signed-off-by: David Jeffery <djeffery@xxxxxxxxxx>
> Signed-off-by: Stuart Hayes <stuart.w.hayes@xxxxxxxxx>
> Tested-by: Laurence Oberman <loberman@xxxxxxxxxx>
> Reviewed-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
> Reviewed-by: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>

Reviewed-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>

I'm concerned about tripping over driver issues, but it's a pretty big
benefit. I think it's worth mentioning the "async_shutdown" module
parameter somewhere in the commit logs and putting an example in
Documentation/admin-guide/kernel-parameters.txt.

Might even consider keeping in -next for a cycle+ and targeting v7.3.

> ---
> drivers/pci/probe.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index b63cd0c310bc..86e855090553 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -1045,6 +1045,7 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
>
> bus->bridge = get_device(&bridge->dev);
> device_enable_async_suspend(bus->bridge);
> + device_enable_async_shutdown(bus->bridge);
> pci_set_bus_of_node(bus);
> pci_set_bus_msi_domain(bus);
> if (bridge->msi_domain && !dev_get_msi_domain(&bus->dev) &&
> @@ -2753,6 +2754,7 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
> pci_reassigndev_resource_alignment(dev);
>
> pci_init_capabilities(dev);
> + device_enable_async_shutdown(&dev->dev);
>
> /*
> * Add the device to our list of discovered devices
> --
> 2.53.0
>