Re: [PATCH v1] PCI/AER: Avoid power state transition during system suspend

From: Lukas Wunner
Date: Thu Apr 03 2025 - 23:09:06 EST


On Thu, Apr 03, 2025 at 01:14:25PM +0530, Raag Jadav wrote:
> If an error is triggered while system suspend is in progress, any bus
> level power state transition will result in unpredictable error handling.
> Mark skip_bus_pm flag as true to avoid this.
[...]
> Ideally we'd want to defer recovery until system resume, but this is
> good enough to prevent device suspend.

if (system_state == SYSTEM_SUSPEND)

... tells you whether the system is suspending, so you could catch that
in the error recovery code.

Suspend to ACPI state S3 or S4 shouldn't need error recovery through reset
upon resume because devices are generally reset by BIOS on resume anyway.

Thanks,

Lukas