Re: [PATCH] PCI/PM: Skip the suspend_noirq config save if runtime-suspended

From: Lukas Wunner

Date: Wed Sep 23 2026 - 06:42:07 EST


On Wed, Sep 23, 2026 at 07:55:11AM +0530, Navon John Lukose wrote:
> pci_pm_suspend_noirq() saves config space unconditionally when the driver
> of the device has no PM callbacks, which includes unbound devices. If
> such a device is runtime-suspended, the bridge above it may be in a
> low-power state with the link down. Depending on the platform, the
> config reads then either hang the CPU or return all ones, which overwrite
> the snapshot taken at runtime suspend and are written back to the device
> on resume.
>
> Skip the save if the device is runtime-suspended, as pci_pm_freeze()
> does, since pci_pm_runtime_suspend() has already saved the config space.
> Use pm_runtime_status_suspended(), because runtime PM is disabled by the
> noirq phase and pm_runtime_suspended() would always be false.
>
> Fixes: 931ff68a5a53 ("PCI PM: Restore config spaces of all devices during early resume")
> Cc: stable@xxxxxxxxxxxxxxx # v6.19+
> Signed-off-by: Navon John Lukose <navonjohnlukose@xxxxxxxxx>
> ---
> Found on a Lenovo Yoga 83KF (Arrow Lake-H). A driverless O2 Micro SD
> reader at 57:00.0 with power/control=auto lets its root port 00:1c.0
> runtime-suspend to D3hot. The port then swallows the ECAM reads in
> pci_save_state(), and the forward-progress watchdog raises a fatal machine
> check at the ECAM load in pci_mmcfg_read().

Hm, pci_pm_suspend_noirq() should bail out earlier because of the
dev_pm_skip_suspend() check. That check resolves to:

dev_pm_smart_suspend(dev) && pm_runtime_status_suspended(dev)

The code comment in device_prepare_smart_suspend() explains that
smart_suspend is true for devices without PM callbacks. But only
if the parent has smart suspend enabled as well. I guess that's
the sticking point? That the port above the card reader doesn't
have smart suspend enabled?

Thanks,

Lukas