From: Alex Elder <elder@linaro.org>
To: davem@davemloft.net, kuba@kernel.org
Cc: evgreen@chromium.org, subashab@codeaurora.org,
cpratapa@codeaurora.org, bjorn.andersson@linaro.org,
mka@chromium.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net 1/2] net: ipa: only clear hardware state if setup has completed
Date: Tue, 6 Oct 2020 16:30:46 -0500 [thread overview]
Message-ID: <20201006213047.31308-2-elder@linaro.org> (raw)
In-Reply-To: <20201006213047.31308-1-elder@linaro.org>
In the setup phase of initialization, GSI firmware gets loaded
and initialized, and the AP command TX and default RX endpoints
get set up. Until that happens, IPA commands must not be issued
to the hardware.
If the modem crashes, we stop endpoint channels and perform a
number of other activities to clear modem-related IPA state,
including zeroing filter and routing tables (using IPA commands).
This is a bug if setup is not complete. We should also not be
performing the other cleanup activity in that case either.
Fix this by returning immediately when handling a modem crash if we
haven't completed setup.
Fixes: a646d6ec9098 ("soc: qcom: ipa: modem and microcontroller")
Tested-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Alex Elder <elder@linaro.org>
---
drivers/net/ipa/ipa_modem.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ipa/ipa_modem.c b/drivers/net/ipa/ipa_modem.c
index e34fe2d77324e..dd5b89c5cb2d4 100644
--- a/drivers/net/ipa/ipa_modem.c
+++ b/drivers/net/ipa/ipa_modem.c
@@ -285,6 +285,9 @@ static void ipa_modem_crashed(struct ipa *ipa)
struct device *dev = &ipa->pdev->dev;
int ret;
+ if (!ipa->setup_complete)
+ return;
+
ipa_endpoint_modem_pause_all(ipa, true);
ipa_endpoint_modem_hol_block_clear_all(ipa);
--
2.20.1
next prev parent reply other threads:[~2020-10-06 21:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-06 21:30 [PATCH net 0/2] net: ipa: non-setup bug fixes Alex Elder
2020-10-06 21:30 ` Alex Elder [this message]
2020-10-09 19:25 ` [PATCH net 1/2] net: ipa: only clear hardware state if setup has completed Jakub Kicinski
2020-10-09 19:39 ` Alex Elder
2020-10-09 19:41 ` Jakub Kicinski
2020-10-06 21:30 ` [PATCH net 2/2] net: ipa: skip suspend/resume activities if not set up 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=20201006213047.31308-2-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=mka@chromium.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
all inboxes | Powered by JetHome®