* [PATCH net-next] net: ipa: report TX_SUSPEND wakeups to the PM core
@ 2026-11-20 20:29 Michael Auer
0 siblings, 0 replies; only message in thread
From: Michael Auer @ 2026-11-20 20:29 UTC (permalink / raw)
To: Alex Elder
Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, netdev, Michael Auer
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-20 20:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 20:29 [PATCH net-next] net: ipa: report TX_SUSPEND wakeups to the PM core Michael Auer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox