From: Michael Auer <mick@yoxcu.de>
To: Alex Elder <elder@kernel.org>
Cc: 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>,
netdev@vger.kernel.org, Michael Auer <mick@yoxcu.de>
Subject: [PATCH net-next] net: ipa: report TX_SUSPEND wakeups to the PM core
Date: Fri, 20 Nov 2026 21:29:30 +0100 [thread overview]
Message-ID: <20261120202930.345970-1-mick@yoxcu.de> (raw)
Since commit 4b2274d3811a ("net: ipa: don't bother aborting system
resume") the IPA driver reports no wakeup event. The IPA interrupt
still wakes the system, but the wakeup source of the IPA device does
not count it, so only /sys/power/pm_wakeup_irq shows the cause.
User space that reads the wakeup sources cannot attribute a mobile
data wakeup. Plasma's powerdevil, for example, turns the display on
for every such wakeup.
Report a wakeup event when handling the TX_SUSPEND interrupt. This is
pm_wakeup_event(), not a hard wakeup, so it does not abort a suspend
in progress unless user space uses /sys/power/wakeup_count.
Found and tested on a OnePlus 6 (SDM845, IPA v3.5.1): a push message
over LTE wakes the phone from s2idle, and the IPA wakeup source now
counts it.
Signed-off-by: Michael Auer <mick@yoxcu.de>
---
Tested on a OnePlus 6 with an sdm845-mainline 7.1-rc1 based kernel, in
daily use since late September. On net-next it was only build tested
(W=1, arm64 and x86_64 allmodconfig).
The event is also counted when TX_SUSPEND fires after a runtime
suspend while the system is running. If that is not wanted, the call
could be limited to system resume. I kept the version I tested.
Tool use: the analysis, the code and the commit messages were
written with an LLM coding assistant (Claude Code). I reviewed all
of it and tested it on my phone as described above.
drivers/net/ipa/ipa_interrupt.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ipa/ipa_interrupt.c b/drivers/net/ipa/ipa_interrupt.c
index 766b094eb069..547ed67930d6 100644
--- a/drivers/net/ipa/ipa_interrupt.c
+++ b/drivers/net/ipa/ipa_interrupt.c
@@ -92,6 +92,11 @@ static void ipa_interrupt_process(struct ipa_interrupt *interrupt, u32 irq_id)
break;
case IPA_IRQ_TX_SUSPEND:
+ /* Data arrived for a suspended endpoint. Report it as a
+ * wakeup event, so user space can see what woke the system.
+ */
+ pm_wakeup_event(ipa->dev, 0);
+
/* Clearing the SUSPEND_TX interrupt also clears the
* register that tells us which suspended endpoint(s)
* caused the interrupt, so defer clearing until after
base-commit: 2208ab00f4f213ade91ab775e7f8c4dacdcc856e
--
2.43.0
reply other threads:[~2026-11-20 20:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261120202930.345970-1-mick@yoxcu.de \
--to=mick@yoxcu.de \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=elder@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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