From: Alex Elder <elder@linaro.org>
To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Cc: mka@chromium.org, andersson@kernel.org,
quic_cpratapa@quicinc.com, quic_avuyyuru@quicinc.com,
quic_jponduru@quicinc.com, quic_subashab@quicinc.com,
elder@kernel.org, netdev@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next 1/6] net: ipa: don't bother aborting system resume
Date: Fri, 23 Feb 2024 07:39:25 -0600 [thread overview]
Message-ID: <20240223133930.582041-2-elder@linaro.org> (raw)
In-Reply-To: <20240223133930.582041-1-elder@linaro.org>
The IPA interrupt can fire if there is data to be delivered to a GSI
channel that is suspended. This condition occurs in three scenarios.
First, runtime power management automatically suspends the IPA
hardware after half a second of inactivity. This has nothing
to do with system suspend, so a SYSTEM IPA power flag is used to
avoid calling pm_wakeup_dev_event() when runtime suspended.
Second, if the system is suspended, the receipt of an IPA interrupt
should trigger a system resume. Configuring the IPA interrupt for
wakeup accomplishes this.
Finally, if system suspend is underway and the IPA interrupt fires,
we currently call pm_wakeup_dev_event() to abort the system suspend.
The IPA driver correctly handles quiescing the hardware before
suspending it, so there's really no need to abort a suspend in
progress in the third case. We can simply quiesce and suspend
things, and be done.
Incoming data can still wake the system after it's suspended.
The IPA interrupt has wakeup mode enabled, so if it fires *after*
we've suspended, it will trigger a wakeup (if not disabled via
sysfs).
Stop calling pm_wakeup_dev_event() to abort a system suspend in
progress in ipa_power_suspend_handler().
Signed-off-by: Alex Elder <elder@linaro.org>
---
Note: checkpatch warns: braces {} are not necessary...
drivers/net/ipa/ipa_power.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ipa/ipa_power.c b/drivers/net/ipa/ipa_power.c
index 128a816f65237..694bc71e0a170 100644
--- a/drivers/net/ipa/ipa_power.c
+++ b/drivers/net/ipa/ipa_power.c
@@ -220,8 +220,9 @@ void ipa_power_suspend_handler(struct ipa *ipa, enum ipa_irq_id irq_id)
* system suspend, trigger a system resume.
*/
if (!__test_and_set_bit(IPA_POWER_FLAG_RESUMED, ipa->power->flags))
- if (test_bit(IPA_POWER_FLAG_SYSTEM, ipa->power->flags))
- pm_wakeup_dev_event(&ipa->pdev->dev, 0, true);
+ if (test_bit(IPA_POWER_FLAG_SYSTEM, ipa->power->flags)) {
+ ;
+ }
/* Acknowledge/clear the suspend interrupt on all endpoints */
ipa_interrupt_suspend_clear_all(ipa->interrupt);
--
2.40.1
next prev parent reply other threads:[~2024-02-23 13:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 13:39 [PATCH net-next 0/6] net: ipa: don't abort system suspend Alex Elder
2024-02-23 13:39 ` Alex Elder [this message]
2024-02-27 10:23 ` [PATCH net-next 1/6] net: ipa: don't bother aborting system resume Paolo Abeni
2024-02-23 13:39 ` [PATCH net-next 2/6] net: ipa: kill IPA_POWER_FLAG_SYSTEM Alex Elder
2024-02-23 13:39 ` [PATCH net-next 3/6] net: ipa: kill the IPA_POWER_FLAG_RESUMED flag Alex Elder
2024-02-23 13:39 ` [PATCH net-next 4/6] net: ipa: move ipa_interrupt_suspend_clear_all() up Alex Elder
2024-02-23 13:39 ` [PATCH net-next 5/6] net: ipa: kill ipa_power_suspend_handler() Alex Elder
2024-02-23 13:39 ` [PATCH net-next 6/6] net: ipa: don't bother zeroing an already zero register Alex Elder
2024-02-27 10:30 ` [PATCH net-next 0/6] net: ipa: don't abort system suspend patchwork-bot+netdevbpf
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=20240223133930.582041-2-elder@linaro.org \
--to=elder@linaro.org \
--cc=andersson@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=elder@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mka@chromium.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=quic_avuyyuru@quicinc.com \
--cc=quic_cpratapa@quicinc.com \
--cc=quic_jponduru@quicinc.com \
--cc=quic_subashab@quicinc.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