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