Article View: linux.kernel.netdev
Article #18939Re: [PATCH net] net: wwan: iosm: fix S3 resume by re-binding the driver around it
From: David Westen
Date: Thu, 19 Nov 2026 03:40
Date: Thu, 19 Nov 2026 03:40
66 lines
13905 bytes
13905 bytes
> - [Medium] pm_notify() in drivers/net/wwan/iosm/iosm_ipc_pcie.c decides > whether to unbind the driver on PM_SUSPEND_PREPARE by checking… > - [Medium] The changelog limits the problem to "platforms where S3 cuts > power to the WWAN card". > > Pre-existing issues: > - [High] ipc_imem_cleanup() > (drivers/net/wwan/iosm/iosm_ipc_imem.c:1231-1266) cancels… Thanks for the review, these were good points. I tried the suggestions and will send a v2; details below. > Could this be gated on ipc_pcie->d3l2_support or a platform check? And > since the patch is tagged Cc: stable, could the changelog mention this > change in behaviour? I looked at gating on d3l2_support first, but it doesn't match the power behavior here: the X1 Carbon 6th gen reports D0L12 and the modem still loses power in S3. So I tried checking the hardware instead: on resume, read the exec stage before touching the modem, and only re-bind the driver from PM_POST_SUSPEND if it no longer reads RUN. That covered every sleep state and left platforms that keep the modem powered alone, and it worked in most runs. The catch is that the re-bind then tears down a modem that has already booted again. When a port was still open at that point, port close sent PIPE_CLOSE messages to the new firmware, they timed out, and the modem crashed: iosm 0000:03:00.0: modem lost power while suspended (stage 0xfeedb007), probing it again iosm 0000:03:00.0: msg timeout iosm 0000:03:00.0: msg timeout (exec stage now 0xbadc0ded, the probe then fails) Making the teardown safe against that would mean changing every path that talks to the modem during removal, which seemed like a lot of change for a stable fix. Unbinding before S3 tears the driver down while the modem still answers and has worked reliably, so v2 keeps it. The trade-off is that on platforms that keep the slot powered in S3, the modem is probed again on resume, which drops data sessions and recreates the ports. As you suggested, the changelog will spell that out. If you'd rather see the resume-time check, I'm happy to work on that instead. > Can pm_suspend_default_s2idle() tell S3 apart from s2idle here? It only > reports which state the "mem" label maps to: Good catch, it's the default mode, not the target state. The target isn't known yet when PM_SUSPEND_PREPARE is sent, and pm_suspend_via_firmware() is only set later, in platform_suspend_begin(), so I didn't find a better signal for the notifier. In the cases you list the patch either probes the modem again when it didn't need to, or behaves as before. I'll describe those limits in the changelog and correct the suspend-to-idle sentence. > Should ipc_imem_cleanup() call hrtimer_cancel(&ipc_imem->adb_timer) along > with the other timers before this path runs on every S3? Yes, thanks for spotting it. v2 adds a patch for that ahead of this one. I could only build-test it, since the XMM7360 doesn't use UL aggregation. pw-bot: cr
Technical Details
Message-ID:
<20261119034025.480656-1-davidlwesten@gmail.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366711-linux-kernel-netdev=dewy.ruReferences:
<179501477167.3136.5713040375169842773@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366711-linux-kernel-netdev=dewy.ru
From: davidlwesten@gmail.com (David Westen)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] net: wwan: iosm: fix S3 resume by re-binding the driver around it
Date: Wed, 18 Nov 2026 19:40:23 -0800
Organization: Usenet Network
Message-ID: <20261119034025.480656-1-davidlwesten@gmail.com>
References: <179501477167.3136.5713040375169842773@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="2779184"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:oJCpMTeTCC+QUQLY9x6ehx8hvZs= sha256:ggvL1U2JYCV9OpWnM/9f6FemSUgVwGD7oQzVuvdZigw=
sha1:MDb9ybRGIBRoaX6SqihgGLL6wCU= sha256:LhG9B6BVrda2HMpf89wJR78ReOhPejh4JTYoPRPCNIM=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 7FA771154D3; Thu, 19 Nov 2026 06:42:20 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id TL2mugS2bKXM;
Thu, 19 Nov 2026 06:42:13 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-366711-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id 48A6D1154CC; Thu, 19 Nov 2026 06:42:04 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by tor.lore.kernel.org (Postfix) with ESMTP id 9AB3B221C1C; Thu, 19 Nov 2026 03:41:21 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1795059639;
b=khoXpjBsHPRyK2egmSWML8cOxu5cICb4+04e0cf1inigskYFiR8qdXxy9qhUX0Xs7qv8
L5xMOLVhBJSzSxxOXEQqVMm5YhR5CBqxkQosqmiDqZELAh6WZyaZf+9IlWIis/rE9uE/V
pN96RNLih46bNS5vY78ZPlWaHqjCzYaiJysMBT3qe2dhxGf706Z4WApscgwI6MGooJGWz
o0cz34gf8QFrNPd8vwcRV75GcIOAPcfjS/djnuol3QG236vnNGNnSb5I710AYKncthQtu
eh3i6h/cbysiTsQCLUXlrQQD3BBjvJiaRG0elXnZ0m8W6RGRXbGWrCfVd8ltqA0COYQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795059639;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:
References:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type:
Content-Transfer-Encoding;
bh=c+7vBVE35eU7OvcQRlXaK7erubNGtvgQAaBs8IXCypg=;
b=P//uhyZXsmZ3CDW0Dl7bOyPVsIPj68guIsezMVpx3b70vf52V9BWkPM34bD+L+JS6RAU
e345XD93kXv4wFGlWeL2NylhMrHAk2y+yA2PQLdAyq6HkAIGapLScCBSFGzme2zy1e+iO
bh8+X2ADSx03STSGsNghRMkbMDwJgJoX8xnIF3qOcJE638++6sDPc4bc0JJ/gjJgBJk5y
srYr98F7vUN3ywVPm390vB+FBqrJV6DQK5rNRGEhNK2iJrirqTPT6AjwmhcP06Uaylp+I
WYFVFe1fEDO41RgdjsYAwjVpx3qyEkZoXyjlLhAV34B2A0LWUxUV0HI5TCtyYot+EHg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=P9nAT9wR;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F30260A3816;
Thu, 19 Nov 2026 03:40:39 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=P9nAT9wR
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.175
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1795059638;
b=lphRi9/BmV0HCeVAogyWJ8JbLtFWdeIwDqAzKkTTfYKUSBGPOUQzhVTv/VBr26Ntarla
UGQd21fzlgea6Zg1/FdiWXWojPDUaczBJhAmiFEzYl08WIiP63TskKGCjR8HlwkV4IYaY
OQoyy7U1y1wuB40A/4uycUl2HCV7NY8II7w3l5Twv9pDIFzZqZ+FFJAN2HMwX0lw90JH+
XFiBPhIqFf5KrkbRV3YYCG5MLU2ryoZLWwH2UJhPyk4wi86TsyefLbTzt1LXOsw4n6ET3
huS902sykLFpcjYIMqAJ4pE0AkpWrAC24GaaRifU6k1bI7w7+VN57NPopPFl8KCewRQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795059638;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
Content-Type:Content-Transfer-Encoding;
bh=c+7vBVE35eU7OvcQRlXaK7erubNGtvgQAaBs8IXCypg=;
b=jIDNzq90uCJ4DHfBoxKAsQUbKBCDbB9ouSVnekmo9J/ZnTSRoIdULXVfciQ4LLS83x3+
aSpunwd6WVfuB/XeyY1nwVbA4Oml9uZa57Jp8zH5P537ol3E8gNQKmKo1WSGIdpybTZMz
6WYI7Hppn2M0mG4wN2nOR/yPKuqxE9N4Q4XAsa6v2AfoFPj22H3zQMsCeZBQbQbPrujos
PrGp/TlTNXnfq7oVSveAMxjUBqnylXo9N3J1+8SVq710gGN8Mrj+yYfZk+v7BlMb/PDzu
ctfpmIGxCedsbQ3LMa6raUPzRpEpzlDytkDYuYLGHh6JGgiLFu7LB9wGBxeDW0cZD1A==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=P9nAT9wR;
arc=none smtp.remote-ip=209.85.214.175
X-Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C73360A260F
for <netdev@vger.kernel.org>; Thu, 19 Nov 2026 03:40:38 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7C73360A260F
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2e95bd1c14cso14837145ad.2
for <netdev@vger.kernel.org>; Wed, 18 Nov 2026 19:40:38 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1795059638; x=1795664438; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:mime-version:references
:in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=c+7vBVE35eU7OvcQRlXaK7erubNGtvgQAaBs8IXCypg=;
b=P9nAT9wR/BxrSHFD0rc86O6tPp9oJPwSNHtCDIP49VsyeibeusvaAfn48WqF/RglWj
H3JMuEh0bFpaHNQAml1uewIK/XABMlPBWHyxyXg9wgEzu/ASbM7aG7mA6hlR4RIMYA63
x68LfDa1iXT/0CFIP7V6TsEz6Cg6ahqT5XXBrjPNwrEC8XyY3+DfmxpxU29GgAyt3uhI
iYqMUEutqpOeXhPsGce0xTkE/CS/SPk8rHPfrJ6V84plqOIiHqfYNyG3nvfZM0YMQise
Xzo7GobJsXAtaHNTQmnGz7R6L6G/avbpQTKAJ5YM1Ix/X4aL0G47Bl622024nWwBZFrx
qZew==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1795059638; x=1795664438;
h=content-transfer-encoding:content-type:mime-version:references
:in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=c+7vBVE35eU7OvcQRlXaK7erubNGtvgQAaBs8IXCypg=;
b=szIPbiKVFHAEh3SkLJHt66A0xkuG/eSR9q7E3zPO5tWOHUaj5ckNwwfQ/QC465quW/
gDjIn+pu1NmlVUULcX/kIrruFAOdr6P29KO28UEyukbeoqoKO2/rAQ1OaCBkeJAPnnlw
gZK4Oe8MgZAZBXJS741zJCXXfi4yqWUQ3xFnlWLNYaQbmEdvglTs1BqCbvtHvmDtAyxr
jkO3upljcgESo5l3m6Aj9pNJJjhPbwAC1TFcv/gxx6ZhTG8F6vG2tGxt9IB3xoHsaXFT
4WdQnZmqfyKv2VgUaGYS3xLTUZ1SwqW4kPOXGOoH1hJunyDl5OtGJGYeTISW8myYOxUd
p9gg==
X-Gm-Message-State: APuU4Z+f9aeHlrfyd28PGpVZTDS7y5NhLi3/YnyPFK5W8Ht7GhSGxNwY
6Sm00qn2faaO2qYYjH+dgQsOqWG+yTQmFqvbP/s+vkVzBzujS/ZakxmN
X-Gm-Gg: AZFdTZcr7i1RIY8u5K1mFBz046dCOEsShbsMJioegbF1ABffq8o2C+CnEUi6mWW1m7b
6ndDM6/YggGv3tg2zi64UElFeCBdTHhU1O/6yZWK07CSlrL5svzgvRHMNEfptGgUlwdGGSyyuly
+sv3jYdHMXF5pza0iJkUcOyulABOyfniTxO4w/xz7NymrRGumGXDJPao1zGC5uTUcO0b6PAytih
dIPGMfESw4+f7By4Xl9xy7nhpexsujQiP23rE4Llx2vp9Ctc0jw7P9L3mPh0NAXyzF1LqebvItt
/VYS6uuAIlMLdZQEGCMBsldHuzMxKYKQARydiwKiztJrHWkXRrmM+CwRNw7JeitEt/MMZ/FxPWH
LwieOyT47e1XLeDE5lwWzxEd6aMGckVnAykz+cOpfhiq4zr8INXQhKNUbsEEC0emBsSbC0yl+g2
AKRtFiMEJt8hbsf5NCrMHYkkVoFaZMaxcoUrXr6hMIwejNjFOoZnu/Qfhfm/u+irddvLKc3wEOQ
Cdei/up7h7D12QJDmFhSyRPHCGRQ1UBRUdPTZ10v6xNAZYFqRMxSe1FiZsRJinbMG6PJhBr+pCC
wQJeXJ2e/5KBIRn6
X-Received: by 2002:a17:903:18b:b0:2ed:130f:869d with SMTP id d9443c01a7336-2eff753bb92mr47715105ad.43.1795059637889;
Wed, 18 Nov 2026 19:40:37 -0800 (PST)
X-Received: from x1.hs.local ([2601:600:a482:7d70::5e59])
by smtp.gmail.com with ESMTPSA id d9443c01a7336-2eff62897d0sm22109355ad.64.2026.11.18.19.40.36
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 18 Nov 2026 19:40:37 -0800 (PST)
X-Cc: netdev@vger.kernel.org,
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,
m.chetan.kumar@linux.intel.com,
linux-kernel@vger.kernel.org,
mail@maciej.szmigiero.name,
stable@vger.kernel.org
X-Mailer: git-send-email 2.56.0
X-In-Reply-To: <179501477167.3136.5713040375169842773@kernel.org>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list