Re: [PATCH v2 4/6] PCI/PM: Run bridge power up actions as part of restore phase
From: Rafael J. Wysocki
Date: Tue May 26 2026 - 10:12:16 EST
On Mon, Apr 27, 2026 at 10:50 PM Mario Limonciello (AMD)
<superm1@xxxxxxxxxx> wrote:
>
> Suspend resume actions will check the state of the device and whether
> bus PM should be skipped. These same actions make sense during hibernation
> image restore. Apply them there as well.
Doing things because they can be done may not be a good idea.
Please say why you need them to happen here.
> Tested-by: Eric Naim <dnaim@xxxxxxxxxxx>
> Signed-off-by: Mario Limonciello (AMD) <superm1@xxxxxxxxxx>
> ---
> drivers/pci/pci-driver.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
> index bfb521eb0eed7..793af4af2971b 100644
> --- a/drivers/pci/pci-driver.c
> +++ b/drivers/pci/pci-driver.c
> @@ -1273,10 +1273,15 @@ static int pci_pm_restore_noirq(struct device *dev)
> {
> struct pci_dev *pci_dev = to_pci_dev(dev);
> const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
> + pci_power_t prev_state = pci_dev->current_state;
> + bool skip_bus_pm = pci_dev->skip_bus_pm;
>
> pci_pm_default_resume_early(pci_dev);
> pci_fixup_device(pci_fixup_resume_early, pci_dev);
>
> + if (!skip_bus_pm && prev_state == PCI_D3cold)
> + pci_pm_bridge_power_up_actions(pci_dev);
> +
> if (pci_has_legacy_pm_support(pci_dev))
> return 0;
>
> --
> 2.53.0
>