* [PATCH] net: ipa: don't configure IDLE_INDICATION on v3.1
@ 2022-10-24 23:48 Caleb Connolly
2022-10-25 0:13 ` Alex Elder
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Caleb Connolly @ 2022-10-24 23:48 UTC (permalink / raw)
To: Alex Elder, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Jami Kettunen
Cc: Caleb Connolly, Alex Elder, linux-kernel, netdev
IPA v3.1 doesn't support the IDLE_INDICATION_CFG register, this was
causing a harmless splat in ipa_idle_indication_cfg(), add a version
check to prevent trying to fetch this register on v3.1
Fixes: 6a244b75cfab ("net: ipa: introduce ipa_reg()")
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
---
This will need to wait for Jami's Tested-by as I don't have any v3.1 hardware.
---
drivers/net/ipa/ipa_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c
index 3461ad3029ab..49537fccf6ad 100644
--- a/drivers/net/ipa/ipa_main.c
+++ b/drivers/net/ipa/ipa_main.c
@@ -434,6 +434,9 @@ static void ipa_idle_indication_cfg(struct ipa *ipa,
const struct ipa_reg *reg;
u32 val;
+ if (ipa->version < IPA_VERSION_3_5_1)
+ return;
+
reg = ipa_reg(ipa, IDLE_INDICATION_CFG);
val = ipa_reg_encode(reg, ENTER_IDLE_DEBOUNCE_THRESH,
enter_idle_debounce_thresh);
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] net: ipa: don't configure IDLE_INDICATION on v3.1
2022-10-24 23:48 [PATCH] net: ipa: don't configure IDLE_INDICATION on v3.1 Caleb Connolly
@ 2022-10-25 0:13 ` Alex Elder
2022-10-25 20:01 ` Jami Kettunen
2022-10-26 3:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Alex Elder @ 2022-10-25 0:13 UTC (permalink / raw)
To: Caleb Connolly, Alex Elder, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Jami Kettunen
Cc: Alex Elder, linux-kernel, netdev
On 10/24/22 6:48 PM, Caleb Connolly wrote:
> IPA v3.1 doesn't support the IDLE_INDICATION_CFG register, this was
> causing a harmless splat in ipa_idle_indication_cfg(), add a version
> check to prevent trying to fetch this register on v3.1
>
> Fixes: 6a244b75cfab ("net: ipa: introduce ipa_reg()")
Actually, the bug first appeared long ago. This commit:
1bb1a117878b9 ("net: ipa: add IPA v3.1 configuration data")
marked IPA v3.1 supported. But it did not update the code
to avoid accessing the IDLE_INDICATION register for IPA v3.1
(in ipa_reg_idle_indication_cfg_offset()). That being said,
we have no evidence that it caused harm, and until we do I'd
rather not try to fix the problem that far back.
The commit you point out is the one where we actually
start checking (and WARNing), and I think it's reasonable
to say that's what this fixes.
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
> This will need to wait for Jami's Tested-by as I don't have any v3.1 hardware.
I would very much like to get a Tested-by tag.
But from my perspective, this patch looks good. Previously
offset 0x220 was used, even though it was not well-defined
for IPA v3.1.
This is a bug fix destined for the net/master branch.
Reviewed-by: Alex Elder <elder@linaro.org>
Thank you.
> ---
> drivers/net/ipa/ipa_main.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c
> index 3461ad3029ab..49537fccf6ad 100644
> --- a/drivers/net/ipa/ipa_main.c
> +++ b/drivers/net/ipa/ipa_main.c
> @@ -434,6 +434,9 @@ static void ipa_idle_indication_cfg(struct ipa *ipa,
> const struct ipa_reg *reg;
> u32 val;
>
> + if (ipa->version < IPA_VERSION_3_5_1)
> + return;
> +
> reg = ipa_reg(ipa, IDLE_INDICATION_CFG);
> val = ipa_reg_encode(reg, ENTER_IDLE_DEBOUNCE_THRESH,
> enter_idle_debounce_thresh);
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] net: ipa: don't configure IDLE_INDICATION on v3.1
2022-10-24 23:48 [PATCH] net: ipa: don't configure IDLE_INDICATION on v3.1 Caleb Connolly
2022-10-25 0:13 ` Alex Elder
@ 2022-10-25 20:01 ` Jami Kettunen
2022-10-26 3:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Jami Kettunen @ 2022-10-25 20:01 UTC (permalink / raw)
To: Caleb Connolly
Cc: Alex Elder, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Alex Elder, linux-kernel, netdev
On 25.10.2022 02:48, Caleb Connolly wrote:
> IPA v3.1 doesn't support the IDLE_INDICATION_CFG register, this was
> causing a harmless splat in ipa_idle_indication_cfg(), add a version
> check to prevent trying to fetch this register on v3.1
>
> Fixes: 6a244b75cfab ("net: ipa: introduce ipa_reg()")
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Tested-by: Jami Kettunen <jami.kettunen@somainline.org>
> ---
> This will need to wait for Jami's Tested-by as I don't have any v3.1
> hardware.
> ---
> drivers/net/ipa/ipa_main.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c
> index 3461ad3029ab..49537fccf6ad 100644
> --- a/drivers/net/ipa/ipa_main.c
> +++ b/drivers/net/ipa/ipa_main.c
> @@ -434,6 +434,9 @@ static void ipa_idle_indication_cfg(struct ipa
> *ipa,
> const struct ipa_reg *reg;
> u32 val;
>
> + if (ipa->version < IPA_VERSION_3_5_1)
> + return;
> +
> reg = ipa_reg(ipa, IDLE_INDICATION_CFG);
> val = ipa_reg_encode(reg, ENTER_IDLE_DEBOUNCE_THRESH,
> enter_idle_debounce_thresh);
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] net: ipa: don't configure IDLE_INDICATION on v3.1
2022-10-24 23:48 [PATCH] net: ipa: don't configure IDLE_INDICATION on v3.1 Caleb Connolly
2022-10-25 0:13 ` Alex Elder
2022-10-25 20:01 ` Jami Kettunen
@ 2022-10-26 3:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-10-26 3:00 UTC (permalink / raw)
To: Caleb Connolly
Cc: elder, davem, edumazet, kuba, pabeni, jami.kettunen, elder,
linux-kernel, netdev
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 25 Oct 2022 00:48:50 +0100 you wrote:
> IPA v3.1 doesn't support the IDLE_INDICATION_CFG register, this was
> causing a harmless splat in ipa_idle_indication_cfg(), add a version
> check to prevent trying to fetch this register on v3.1
>
> Fixes: 6a244b75cfab ("net: ipa: introduce ipa_reg()")
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
>
> [...]
Here is the summary with links:
- net: ipa: don't configure IDLE_INDICATION on v3.1
https://git.kernel.org/netdev/net/c/95a0396a0642
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-26 3:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-24 23:48 [PATCH] net: ipa: don't configure IDLE_INDICATION on v3.1 Caleb Connolly
2022-10-25 0:13 ` Alex Elder
2022-10-25 20:01 ` Jami Kettunen
2022-10-26 3:00 ` patchwork-bot+netdevbpf
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).