From: Alex Elder <elder@linaro.org>
To: davem@davemloft.net, kuba@kernel.org
Cc: evgreen@chromium.org, bjorn.andersson@linaro.org,
cpratapa@codeaurora.org, subashab@codeaurora.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net 0/2] net: ipa: fix a suspend hang
Date: Thu, 7 Jan 2021 15:43:23 -0600 [thread overview]
Message-ID: <20210107214325.7077-1-elder@linaro.org> (raw)
The IPA driver's PM suspend callback stops all channels, and its
resume callback restarts them again. Part of stopping a channel is
disabling NAPI and disabling its I/O completion interrupt.
When stopping a channel, the IPA driver currently disables NAPI
before disabling the interrupt. It also re-enables interrupts
before re-enabling NAPI. The interrupt handler can therefore be
called while NAPI is disabled.
If the interrupt signaling a transfer completion occurs while NAPI
is disabled, NAPI polling will not be scheduled to process that
completion. That processing will be delayed, occuring only when a
subsequent interrupt schedules NAPI polling when NAPI is enabled
again.
The second patch in this series reorders the NAPI and interrupt
control calls. The completion interrupt is disabled before NAPI
when stopping a channel, and re-enabled after NAPI when starting.
This way polling to handle the completion of a transfer can begin
immediately when handling its interrupt. And if a completion occurs
while the interrupt is disabled, the handler will trigger polling
when interrupts are enabled again.
The first patch adds a flag that prevents the poll function from
re-enabling the interrupt when stopping.
Without this fix in place we would occasionally see a hang while
stopping channels during suspend.
-Alex
Alex Elder (2):
net: ipa: introduce atomic channel STOPPING flag
net: ipa: re-enable NAPI before enabling interrupt
drivers/net/ipa/gsi.c | 15 ++++++++++++---
drivers/net/ipa/gsi.h | 6 ++++++
2 files changed, 18 insertions(+), 3 deletions(-)
--
2.20.1
next reply other threads:[~2021-01-07 21:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-07 21:43 Alex Elder [this message]
2021-01-07 21:43 ` [PATCH net 1/2] net: ipa: introduce atomic channel STOPPING flag Alex Elder
2021-01-07 21:43 ` [PATCH net 2/2] net: ipa: re-enable NAPI before enabling interrupt Alex Elder
2021-01-08 2:38 ` Jakub Kicinski
2021-01-08 20:16 ` Alex Elder
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=20210107214325.7077-1-elder@linaro.org \
--to=elder@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=cpratapa@codeaurora.org \
--cc=davem@davemloft.net \
--cc=evgreen@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=subashab@codeaurora.org \
/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;
as well as URLs for NNTP newsgroup(s).