linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next 4/6] net: ipa: use version in gsi_channel_reset()
Date: Mon,  2 Nov 2020 11:53:58 -0600	[thread overview]
Message-ID: <20201102175400.6282-5-elder@linaro.org> (raw)
In-Reply-To: <20201102175400.6282-1-elder@linaro.org>

A quirk of IPA v3.5.1 requires a channel reset on an RX channel to
be performed twice.  Use the IPA version in gsi_channel_reset()
rather than the passed-in legacy flag to determine that.

This is actually a bug fix, because this double reset is supposed
to occur independent of whether we're enabling the doorbell engine.
Now they will be independent.

Signed-off-by: Alex Elder <elder@linaro.org>
---
 drivers/net/ipa/gsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c
index eae8ed83c1004..729ef712a10fd 100644
--- a/drivers/net/ipa/gsi.c
+++ b/drivers/net/ipa/gsi.c
@@ -840,7 +840,7 @@ void gsi_channel_reset(struct gsi *gsi, u32 channel_id, bool legacy)
 
 	gsi_channel_reset_command(channel);
 	/* Due to a hardware quirk we may need to reset RX channels twice. */
-	if (legacy && !channel->toward_ipa)
+	if (gsi->version == IPA_VERSION_3_5_1 && !channel->toward_ipa)
 		gsi_channel_reset_command(channel);
 
 	gsi_channel_program(channel, legacy);
-- 
2.20.1


  parent reply	other threads:[~2020-11-02 17:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02 17:53 [PATCH net-next 0/6] net: ipa: tell GSI the IPA version Alex Elder
2020-11-02 17:53 ` [PATCH net-next 1/6] net: ipa: expose IPA version to the GSI layer Alex Elder
2020-11-02 17:53 ` [PATCH net-next 2/6] net: ipa: record IPA version in GSI structure Alex Elder
2020-11-02 17:53 ` [PATCH net-next 3/6] net: ipa: use version in gsi_channel_init() Alex Elder
2020-11-02 17:53 ` Alex Elder [this message]
2020-11-02 17:53 ` [PATCH net-next 5/6] net: ipa: use version in gsi_channel_program() Alex Elder
2020-11-02 17:54 ` [PATCH net-next 6/6] net: ipa: eliminate legacy arguments Alex Elder
2020-11-05  0:31 ` [PATCH net-next 0/6] net: ipa: tell GSI the IPA version Jakub Kicinski
2020-11-05 13:40   ` 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=20201102175400.6282-5-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).