From: Alex Elder <elder@linaro.org>
To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Cc: caleb.connolly@linaro.org, mka@chromium.org,
evgreen@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/9] net: ipa: generic command param fix
Date: Wed, 8 Feb 2023 14:56:45 -0600 [thread overview]
Message-ID: <20230208205653.177700-2-elder@linaro.org> (raw)
In-Reply-To: <20230208205653.177700-1-elder@linaro.org>
Starting at IPA v4.11, the GSI_GENERIC_COMMAND GSI register got a
new PARAMS field. The code that encodes a value into that field
sets it unconditionally, which is wrong.
We currently only provide 0 as the field's value, so this error has
no real effect. Still, it's a bug, so let's fix it.
Fix an (unrelated) incorrect comment as well. Fields in the
ERROR_LOG GSI register actually *are* defined for IPA versions
prior to v3.5.1.
Fixes: fe68c43ce388 ("net: ipa: support enhanced channel flow control")
Signed-off-by: Alex Elder <elder@linaro.org>
---
Note: This is sort of a non-bug, so I submitted it to net-next.
drivers/net/ipa/gsi.c | 3 ++-
drivers/net/ipa/gsi_reg.h | 1 -
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c
index bea2da1c4c51d..f1a3938294866 100644
--- a/drivers/net/ipa/gsi.c
+++ b/drivers/net/ipa/gsi.c
@@ -1666,7 +1666,8 @@ static int gsi_generic_command(struct gsi *gsi, u32 channel_id,
val = u32_encode_bits(opcode, GENERIC_OPCODE_FMASK);
val |= u32_encode_bits(channel_id, GENERIC_CHID_FMASK);
val |= u32_encode_bits(GSI_EE_MODEM, GENERIC_EE_FMASK);
- val |= u32_encode_bits(params, GENERIC_PARAMS_FMASK);
+ if (gsi->version >= IPA_VERSION_4_11)
+ val |= u32_encode_bits(params, GENERIC_PARAMS_FMASK);
timeout = !gsi_command(gsi, GSI_GENERIC_CMD_OFFSET, val);
diff --git a/drivers/net/ipa/gsi_reg.h b/drivers/net/ipa/gsi_reg.h
index 3763359f208f7..e65f2f055cfff 100644
--- a/drivers/net/ipa/gsi_reg.h
+++ b/drivers/net/ipa/gsi_reg.h
@@ -372,7 +372,6 @@ enum gsi_general_id {
#define GSI_ERROR_LOG_OFFSET \
(0x0001f200 + 0x4000 * GSI_EE_AP)
-/* Fields below are present for IPA v3.5.1 and above */
#define ERR_ARG3_FMASK GENMASK(3, 0)
#define ERR_ARG2_FMASK GENMASK(7, 4)
#define ERR_ARG1_FMASK GENMASK(11, 8)
--
2.34.1
next prev parent reply other threads:[~2023-02-08 20:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 20:56 [PATCH net-next 0/9] net: ipa: prepare for GSI register updtaes Alex Elder
2023-02-08 20:56 ` Alex Elder [this message]
2023-02-08 20:56 ` [PATCH net-next 2/9] net: ipa: get rid of ipa->reg_addr Alex Elder
2023-02-08 20:56 ` [PATCH net-next 3/9] net: ipa: add some new IPA versions Alex Elder
2023-02-08 20:56 ` [PATCH net-next 4/9] net: ipa: tighten up IPA register validity checking Alex Elder
2023-02-08 20:56 ` [PATCH net-next 5/9] net: ipa: use bitmasks for GSI IRQ values Alex Elder
2023-02-08 20:56 ` [PATCH net-next 6/9] net: ipa: GSI register cleanup Alex Elder
2023-02-08 20:56 ` [PATCH net-next 7/9] net: ipa: start generalizing "ipa_reg" Alex Elder
2023-02-08 20:56 ` [PATCH net-next 8/9] net: ipa: generalize register offset functions Alex Elder
2023-02-08 20:56 ` [PATCH net-next 9/9] net: ipa: generalize register field functions Alex Elder
2023-02-10 8:50 ` [PATCH net-next 0/9] net: ipa: prepare for GSI register updtaes 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=20230208205653.177700-2-elder@linaro.org \
--to=elder@linaro.org \
--cc=andersson@kernel.org \
--cc=caleb.connolly@linaro.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=elder@kernel.org \
--cc=evgreen@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.