mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
To: David Westen <davidlwesten@gmail.com>
Cc: loic.poulain@oss.qualcomm.com, ryazanov.s.a@gmail.com,
	johannes@sipsolutions.net, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, linux-kernel@vger.kernel.org,
	nihaal@cse.iitm.ac.in, stable@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH net v2 2/2] net: wwan: iosm: fix S3 resume by re-binding the driver around it
Date: Mon, 23 Nov 2026 19:07:06 +0100	[thread overview]
Message-ID: <6d09e0b3-e718-4112-99fa-bbe1fd2aa97c@maciej.szmigiero.name> (raw)
In-Reply-To: <e011f909-bc90-45b0-9065-e517ffcbcf2a@gmail.com>

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


  reply	other threads:[~2026-11-23 18:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19  4:27 [PATCH net v2 1/2] net: wwan: iosm: cancel the ADB timer on cleanup David Westen
2026-11-19  4:27 ` [PATCH net v2 2/2] net: wwan: iosm: fix S3 resume by re-binding the driver around it David Westen
2026-11-22 20:01   ` Maciej S. Szmigiero
2026-11-23  3:17     ` David Westen
2026-11-23 18:07       ` Maciej S. Szmigiero [this message]
2026-11-23  5:17   ` netdev-bot+sashiko
2026-11-24  0:44     ` David Westen
2026-11-23  5:17 ` [PATCH net v2 1/2] net: wwan: iosm: cancel the ADB timer on cleanup netdev-bot+sashiko
2026-11-24  0:20   ` David Westen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6d09e0b3-e718-4112-99fa-bbe1fd2aa97c@maciej.szmigiero.name \
    --to=mail@maciej.szmigiero.name \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=davidlwesten@gmail.com \
    --cc=edumazet@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.poulain@oss.qualcomm.com \
    --cc=netdev@vger.kernel.org \
    --cc=nihaal@cse.iitm.ac.in \
    --cc=pabeni@redhat.com \
    --cc=ryazanov.s.a@gmail.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®