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

From: Maciej S. Szmigiero

Date: Mon Nov 23 2026 - 13:07:25 EST


On 23.11.2026 04:17, David Westen wrote:
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?

I think if this would be considered a regression when this driver is used
with opportunistic sleep functionality then such case should be covered
already in the initial patch set.

However, looking deeper in this opportunistic sleep functionality it seems
that most major "generic" x86 distributions disable it and there's no
credible report of anyone using it on a generic x86 laptop.

So in this case I think it would be fine just documenting the limitations
of this fix both in the commit message and in the comment in pm_notify().

- 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.

I'm pretty sure we don't need to worry about these.

David

Thanks,
Maciej