netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] net: ipa: wake up system on RX available
@ 2020-09-09  0:21 Alex Elder
  2020-09-09  0:21 ` [PATCH net-next 1/5] net: ipa: use atomic exchange for suspend reference Alex Elder
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Alex Elder @ 2020-09-09  0:21 UTC (permalink / raw)
  To: davem, kuba
  Cc: evgreen, subashab, cpratapa, bjorn.andersson, netdev,
	linux-kernel

This series arranges for the IPA driver to wake up a suspended
system if the IPA hardware has a packet to deliver to the AP.

Currently, the GSI interrupt is set up to be a waking interrupt.
But the GSI interrupt won't actually fire for a stopped channel (or
a channel that underlies a suspended endpoint).  The fix involves
having the IPA rather than GSI interrupt wake up the AP.

The IPA hardware clock is managed by both the modem and the AP.
Even if the AP is in a fully-suspended state, the modem can clock
the IPA hardware, and can send a packet through IPA that is destined
for an endpoint on the AP.

When the IPA hardware finds a packet's destination is stopped or
suspended, it sends an *IPA interrupt* to the destination "execution
environment" (EE--in this case, the AP).  The desired behavior is
for the EE (even if suspended) to be able to handle the incoming
packet.

To do this, we arrange for the IPA interrupt to be a wakeup
interrupt.  And if the system is suspended when that interrupt
fires, we trigger a system resume operation.  While resuming the
system, the IPA driver starts all its channels (or for SDM845, take
its endpoints out of suspend mode).

Whenever an RX channel is started, if it has a packet ready to be
consumed, the GSI interrupt will fire.  At this point the inbound
packet that caused this wakeup activity will be received.

The first patch just checks the previous value of a reference
counter used for suspend, as precaution to catch bugs.  The next
three arrange for the IPA interrupt wake up the system.  Finally,
with this design, we no longer want the GSI interrupt to wake a
suspended system, so that is removed by the last patch.`

					-Alex

Alex Elder (5):
  net: ipa: use atomic exchange for suspend reference
  net: ipa: manage endpoints separate from clock
  net: ipa: use device_init_wakeup()
  net: ipa: enable wakeup on IPA interrupt
  net: ipa: do not enable GSI interrupt for wakeup

 drivers/net/ipa/gsi.c           | 17 +++------
 drivers/net/ipa/gsi.h           |  1 -
 drivers/net/ipa/ipa.h           |  2 --
 drivers/net/ipa/ipa_clock.c     |  4 ---
 drivers/net/ipa/ipa_interrupt.c | 14 ++++++++
 drivers/net/ipa/ipa_main.c      | 62 ++++++++++++++++++---------------
 6 files changed, 51 insertions(+), 49 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-09-09 21:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-09  0:21 [PATCH net-next 0/5] net: ipa: wake up system on RX available Alex Elder
2020-09-09  0:21 ` [PATCH net-next 1/5] net: ipa: use atomic exchange for suspend reference Alex Elder
2020-09-09  3:27   ` David Miller
2020-09-09 13:43     ` Alex Elder
2020-09-09 21:14       ` David Miller
2020-09-09 21:23         ` Alex Elder
2020-09-09  0:21 ` [PATCH net-next 2/5] net: ipa: manage endpoints separate from clock Alex Elder
2020-09-09  0:21 ` [PATCH net-next 3/5] net: ipa: use device_init_wakeup() Alex Elder
2020-09-09  0:21 ` [PATCH net-next 4/5] net: ipa: enable wakeup on IPA interrupt Alex Elder
2020-09-09  0:21 ` [PATCH net-next 5/5] net: ipa: do not enable GSI interrupt for wakeup Alex Elder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).