Re: [PATCH net v2 2/2] net: wwan: iosm: fix S3 resume by re-binding the driver around it

From: David Westen

Date: Sun Nov 22 2026 - 22:17:17 EST


Hi Maciej,

Thanks for the review!

On 11/22/26 12:01 PM, Maciej S. Szmigiero wrote:
> On 19.11.2026 05:27, David Westen wrote:
>> - Entering suspend-to-idle or standby explicitly while the default is
>>    S3 also re-binds the driver.
>
> I think this re-binding should never happen on s2idle, even though S3
> might be the default mem sleep method.
>
> It looks to me that the only remaining case here is the "opportunistic
> sleep" code which does not use mem_sleep_current (so won't be covered by
> pm_suspend_default_s2idle()) - but uses autosleep_state instead.

Agreed, that would be better. The problem is that the PM notifier
isn't told the target state, and pm_suspend_target_state is only set
after PM_SUSPEND_PREPARE, so the default was the closest the driver
could get on its own.

Covering both cases would need the PM core to make the target state
available before the notifiers run, like pm_suspend_notify_state in
your earlier S3 patch. Do you think that's needed for this fix, or
would it be acceptable as a follow-up?

>> - A suspend to S3 that calls pm_suspend(PM_SUSPEND_MEM) directly while
>>    the default is suspend-to-idle is not covered and fails as before.
>
> Are there any such pm_suspend(PM_SUSPEND_MEM) calls in the kernel (outside
> some test code)?
I found a few: APM emulation, pseries, via-pmu, ZynqMP, SCMI power
control and the SPI slave system control driver. None of them seem to
be x86 ones.

David