* [PATCH RESEND net] net: airoha: Fix NPU RX DMA descriptor bits
@ 2026-05-18 13:44 Christian Marangi
2026-05-18 14:51 ` Lorenzo Bianconi
0 siblings, 1 reply; 2+ messages in thread
From: Christian Marangi @ 2026-05-18 13:44 UTC (permalink / raw)
To: Lorenzo Bianconi, Jakub Kicinski, Christian Marangi,
Felix Fietkau, Simon Horman, linux-kernel, netdev
In an internal review from Airoha, it was notice that the RX DMA descriptor
bits and mask are wrong. These values probably refer to an old NPU firmware
never published. The previous value works correctly but it was reported
that in some specific condition in mixed scenario with both Ethernet and
WiFi offload it's possible that RX DMA descriptor signal wrong value with
the problem to the RX ring or packets getting dropped.
To handle these specific scenario, apply the new suggested bits mask from
Airoha.
Correct functionality of both AN7581 NPU and MT7996 variant were verified
and confirmed working.
Fixes: a7fc8c641cab ("net: airoha: Fix npu rx DMA definitions")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
include/linux/soc/airoha/airoha_offload.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/soc/airoha/airoha_offload.h b/include/linux/soc/airoha/airoha_offload.h
index d01ef4a6b3d7..7589fccfeef6 100644
--- a/include/linux/soc/airoha/airoha_offload.h
+++ b/include/linux/soc/airoha/airoha_offload.h
@@ -71,9 +71,9 @@ static inline void airoha_ppe_dev_check_skb(struct airoha_ppe_dev *dev,
#define NPU_RX1_DESC_NUM 512
/* CTRL */
-#define NPU_RX_DMA_DESC_LAST_MASK BIT(27)
-#define NPU_RX_DMA_DESC_LEN_MASK GENMASK(26, 14)
-#define NPU_RX_DMA_DESC_CUR_LEN_MASK GENMASK(13, 1)
+#define NPU_RX_DMA_DESC_LAST_MASK BIT(29)
+#define NPU_RX_DMA_DESC_LEN_MASK GENMASK(28, 15)
+#define NPU_RX_DMA_DESC_CUR_LEN_MASK GENMASK(14, 1)
#define NPU_RX_DMA_DESC_DONE_MASK BIT(0)
/* INFO */
#define NPU_RX_DMA_PKT_COUNT_MASK GENMASK(31, 29)
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH RESEND net] net: airoha: Fix NPU RX DMA descriptor bits
2026-05-18 13:44 [PATCH RESEND net] net: airoha: Fix NPU RX DMA descriptor bits Christian Marangi
@ 2026-05-18 14:51 ` Lorenzo Bianconi
0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Bianconi @ 2026-05-18 14:51 UTC (permalink / raw)
To: Christian Marangi
Cc: Jakub Kicinski, Felix Fietkau, Simon Horman, linux-kernel, netdev
[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]
> In an internal review from Airoha, it was notice that the RX DMA descriptor
> bits and mask are wrong. These values probably refer to an old NPU firmware
> never published. The previous value works correctly but it was reported
> that in some specific condition in mixed scenario with both Ethernet and
> WiFi offload it's possible that RX DMA descriptor signal wrong value with
> the problem to the RX ring or packets getting dropped.
>
> To handle these specific scenario, apply the new suggested bits mask from
> Airoha.
>
> Correct functionality of both AN7581 NPU and MT7996 variant were verified
> and confirmed working.
>
> Fixes: a7fc8c641cab ("net: airoha: Fix npu rx DMA definitions")
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> include/linux/soc/airoha/airoha_offload.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/soc/airoha/airoha_offload.h b/include/linux/soc/airoha/airoha_offload.h
> index d01ef4a6b3d7..7589fccfeef6 100644
> --- a/include/linux/soc/airoha/airoha_offload.h
> +++ b/include/linux/soc/airoha/airoha_offload.h
> @@ -71,9 +71,9 @@ static inline void airoha_ppe_dev_check_skb(struct airoha_ppe_dev *dev,
> #define NPU_RX1_DESC_NUM 512
>
> /* CTRL */
> -#define NPU_RX_DMA_DESC_LAST_MASK BIT(27)
> -#define NPU_RX_DMA_DESC_LEN_MASK GENMASK(26, 14)
> -#define NPU_RX_DMA_DESC_CUR_LEN_MASK GENMASK(13, 1)
> +#define NPU_RX_DMA_DESC_LAST_MASK BIT(29)
> +#define NPU_RX_DMA_DESC_LEN_MASK GENMASK(28, 15)
> +#define NPU_RX_DMA_DESC_CUR_LEN_MASK GENMASK(14, 1)
> #define NPU_RX_DMA_DESC_DONE_MASK BIT(0)
> /* INFO */
> #define NPU_RX_DMA_PKT_COUNT_MASK GENMASK(31, 29)
> --
> 2.53.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-18 14:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-18 13:44 [PATCH RESEND net] net: airoha: Fix NPU RX DMA descriptor bits Christian Marangi
2026-05-18 14:51 ` Lorenzo Bianconi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox