From: David Westen <davidlwesten@gmail.com>
To: netdev@vger.kernel.org
Cc: mail@maciej.szmigiero.name,
Loic Poulain <loic.poulain@oss.qualcomm.com>,
Sergey Ryazanov <ryazanov.s.a@gmail.com>,
Johannes Berg <johannes@sipsolutions.net>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Abdun Nihaal <nihaal@cse.iitm.ac.in>,
M Chetan Kumar <m.chetan.kumar@intel.com>,
David Westen <davidlwesten@gmail.com>
Subject: [PATCH net v2 1/3] net: wwan: iosm: reset the host PM state when the sleep handshake times out
Date: Tue, 24 Nov 2026 09:26:25 -0800 [thread overview]
Message-ID: <20261124172627.41847-2-davidlwesten@gmail.com> (raw)
In-Reply-To: <20261124172627.41847-1-davidlwesten@gmail.com>
ipc_protocol_suspend() moves host_pm_state from ACTIVE to SLEEP_WAIT_D3
before it wakes the modem to send the ENTER_SLEEP message. If the modem
doesn't report itself active in time, the function gives up but leaves
the state at SLEEP_WAIT_D3.
From then on the driver is stuck: resume skips EXIT_SLEEP because it
expects SLEEP, every later suspend is refused because it expects
ACTIVE, and doorbells to the modem are held back as pending, so no
data moves until the driver is bound again.
Set the state back to ACTIVE on this path, as the path where sending
ENTER_SLEEP fails already does.
Found by an AI code review agent, not triggered. Tested on an XMM7360
with suspend-to-idle.
Fixes: faed4c6f6f48 ("net: iosm: shared memory protocol")
Signed-off-by: David Westen <davidlwesten@gmail.com>
---
drivers/net/wwan/iosm/iosm_ipc_protocol.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wwan/iosm/iosm_ipc_protocol.c b/drivers/net/wwan/iosm/iosm_ipc_protocol.c
index 527355a671b6..e120e1e0ba1d 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_protocol.c
+++ b/drivers/net/wwan/iosm/iosm_ipc_protocol.c
@@ -185,6 +185,8 @@ bool ipc_protocol_suspend(struct iosm_protocol *ipc_protocol)
if (!ipc_pm_wait_for_device_active(&ipc_protocol->pm)) {
ipc_uevent_send(ipc_protocol->pcie->dev, UEVENT_MDM_TIMEOUT);
+ /* The modem wasn't told to sleep, we are still active */
+ ipc_protocol->pm.host_pm_state = IPC_MEM_HOST_PM_ACTIVE;
goto err;
}
--
2.56.0
next prev parent reply other threads:[~2026-11-24 17:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 17:26 [PATCH net v2 0/3] net: wwan: iosm: send the host sleep message on every suspend David Westen
2026-11-24 17:26 ` David Westen [this message]
2026-11-24 17:26 ` [PATCH net v2 2/3] net: wwan: iosm: fix the wait for the modem in the host sleep handshake David Westen
2026-11-24 17:26 ` [PATCH net v2 3/3] net: wwan: iosm: always send the host sleep message on suspend 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=20261124172627.41847-2-davidlwesten@gmail.com \
--to=davidlwesten@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=m.chetan.kumar@intel.com \
--cc=mail@maciej.szmigiero.name \
--cc=netdev@vger.kernel.org \
--cc=nihaal@cse.iitm.ac.in \
--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