From: Zev Paneth <zevpaneth@gmail.com>
To: Loic Poulain <loic.poulain@oss.qualcomm.com>,
Sergey Ryazanov <ryazanov.s.a@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
"Maciej S . Szmigiero" <mail@maciej.szmigiero.name>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, Zev Paneth <zevpaneth@gmail.com>
Subject: [PATCH net] net: wwan: iosm: Re-bind the driver around system suspend too
Date: Thu, 5 Nov 2026 12:20:09 +0200 [thread overview]
Message-ID: <20261105102009.34534-1-zevpaneth@gmail.com> (raw)
On some platforms the modem loses power during suspend-to-idle even
though the driver keeps the device in D0 and its s2idle resume path
only sends a wake-up command. After a long enough s2idle cycle (about
five minutes or more on the test platform) the device comes back in
its boot ROM stage: resume logs "msg timeout", ModemManager then fails
to open the ports ("PORT open refused, phase A-ROM", "Failed to find
primary AT port"), and once userspace has touched the ports the modem
stays dead until a full reboot. This is the same failure mode that
commit 0b6f6593aa8c ("net: wwan: iosm: Fix hibernation by re-binding
the driver around it") addressed for hibernation.
Extend that approach to system suspend: unbind the driver on
PM_SUSPEND_PREPARE and re-bind it on PM_POST_SUSPEND, so the device is
re-initialized from scratch on resume, exactly as it is at boot.
The cost is a full modem re-enumeration after every suspend (about
50 seconds until reconnected on the test platform), also on platforms
where the modem does survive s2idle. If that is considered too heavy,
this could instead be gated by a DMI quirk for the affected platforms.
Tested on a Fibocom L860-GL-16 (Intel XMM7560, 8086:7560) in an
HP ProBook 450 G10 (BIOS V72 01.13.01) with kernel 7.0: with this
change the modem survives an 11-minute lid-closed s2idle and
reconnects automatically; without it, any s2idle longer than roughly
five minutes left the modem in A-ROM until reboot.
Signed-off-by: Zev Paneth <zevpaneth@gmail.com>
---
drivers/net/wwan/iosm/iosm_ipc_pcie.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wwan/iosm/iosm_ipc_pcie.c b/drivers/net/wwan/iosm/iosm_ipc_pcie.c
index 49052eb51..ebd4c45e1 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_pcie.c
+++ b/drivers/net/wwan/iosm/iosm_ipc_pcie.c
@@ -534,12 +534,14 @@ void ipc_pcie_kfree_skb(struct iosm_pcie *ipc_pcie, struct sk_buff *skb)
static int pm_notify(struct notifier_block *nb, unsigned long mode, void *_unused)
{
- if (mode == PM_HIBERNATION_PREPARE || mode == PM_RESTORE_PREPARE) {
+ if (mode == PM_HIBERNATION_PREPARE || mode == PM_RESTORE_PREPARE ||
+ mode == PM_SUSPEND_PREPARE) {
if (pci_registered) {
pci_unregister_driver(&iosm_ipc_driver);
pci_registered = false;
}
- } else if (mode == PM_POST_HIBERNATION || mode == PM_POST_RESTORE) {
+ } else if (mode == PM_POST_HIBERNATION || mode == PM_POST_RESTORE ||
+ mode == PM_POST_SUSPEND) {
if (!pci_registered) {
int ret;
--
2.53.0
next reply other threads:[~2026-11-05 10:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 10:20 Zev Paneth [this message]
2026-11-09 10:33 ` [PATCH net] net: wwan: iosm: Re-bind the driver around system suspend too netdev-bot+sashiko
2026-11-09 22:33 ` Maciej S. Szmigiero
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=20261105102009.34534-1-zevpaneth@gmail.com \
--to=zevpaneth@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=mail@maciej.szmigiero.name \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ryazanov.s.a@gmail.com \
/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