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

From: Raag Jadav
Date: Fri Apr 04 2025 - 01:23:08 EST


On Fri, Apr 04, 2025 at 05:08:45AM +0200, Lukas Wunner wrote:
> 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.

Even if we catch it, what'd be the expectation with it?
Do we can simply ignore the error because of system state?

I'm assuming deferring will require a fair bit of revamp (and I'm
not sure if I'm qualified for it).

> 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 for your input. We have s2idle usecase as well.

So the question here is whether we should allow suspending the device
with errors at all (atleast until successful recovery). Wouldn't the
device resume be unpredictable because of it?

Raag