diff mbox series

[net-next] net: airoha: Fix typo in REG_CDM2_FWD_CFG configuration

Message ID 20241015-airoha-eth-cdm2-fixes-v1-1-9dc6993286c3@kernel.org (mailing list archive)
State Accepted
Commit 30d9d8f6a2d7e44a9f91737dd409dbc87ac6f6b7
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: airoha: Fix typo in REG_CDM2_FWD_CFG configuration | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 5 this patch: 5
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 12 of 12 maintainers
netdev/build_clang success Errors and warnings before: 3 this patch: 3
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 4 this patch: 4
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-10-15--15-00 (tests: 776)

Commit Message

Lorenzo Bianconi Oct. 15, 2024, 7:58 a.m. UTC
Fix typo in airoha_fe_init routine configuring CDM2_OAM_QSEL_MASK field
of REG_CDM2_FWD_CFG register.
This bug is not introducing any user visible problem since Frame Engine
CDM2 port is used just by the second QDMA block and we currently enable
just QDMA1 block connected to the MT7530 dsa switch via CDM1 port.

Introduced by commit 23020f049327 ("net: airoha: Introduce ethernet
support for EN7581 SoC")

Reported-by: ChihWei Cheng <chihwei.cheng@airoha.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/ethernet/mediatek/airoha_eth.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


---
base-commit: 60b4d49b9621db4b000c9065dd6457c9a0eda80b
change-id: 20241014-airoha-eth-cdm2-fixes-92d909308204

Best regards,

Comments

Simon Horman Oct. 15, 2024, 12:35 p.m. UTC | #1
On Tue, Oct 15, 2024 at 09:58:09AM +0200, Lorenzo Bianconi wrote:
> Fix typo in airoha_fe_init routine configuring CDM2_OAM_QSEL_MASK field
> of REG_CDM2_FWD_CFG register.
> This bug is not introducing any user visible problem since Frame Engine
> CDM2 port is used just by the second QDMA block and we currently enable
> just QDMA1 block connected to the MT7530 dsa switch via CDM1 port.
> 
> Introduced by commit 23020f049327 ("net: airoha: Introduce ethernet
> support for EN7581 SoC")
> 
> Reported-by: ChihWei Cheng <chihwei.cheng@airoha.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>

Reviewed-by: Simon Horman <horms@kernel.org>

> ---
>  drivers/net/ethernet/mediatek/airoha_eth.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mediatek/airoha_eth.c b/drivers/net/ethernet/mediatek/airoha_eth.c
> index e037f725f6d3505a8b91815ae26322f5d1b8590c..45665a5b14f5c646d23aaf4830e55a118e9f1a8a 100644
> --- a/drivers/net/ethernet/mediatek/airoha_eth.c
> +++ b/drivers/net/ethernet/mediatek/airoha_eth.c
> @@ -1371,7 +1371,8 @@ static int airoha_fe_init(struct airoha_eth *eth)
>  	airoha_fe_set(eth, REG_GDM_MISC_CFG,
>  		      GDM2_RDM_ACK_WAIT_PREF_MASK |
>  		      GDM2_CHN_VLD_MODE_MASK);
> -	airoha_fe_rmw(eth, REG_CDM2_FWD_CFG, CDM2_OAM_QSEL_MASK, 15);
> +	airoha_fe_rmw(eth, REG_CDM2_FWD_CFG, CDM2_OAM_QSEL_MASK,
> +		      FIELD_PREP(CDM2_OAM_QSEL_MASK, 15));

I agree FIELD_PREP is correct here as it will both mask (not important
in this case) and shift (very important in this case) it's input (15).
This matches how airoha_fe_rmw() will use this argument.

>  
>  	/* init fragment and assemble Force Port */
>  	/* NPU Core-3, NPU Bridge Channel-3 */
> 
> ---
> base-commit: 60b4d49b9621db4b000c9065dd6457c9a0eda80b
> change-id: 20241014-airoha-eth-cdm2-fixes-92d909308204
> 
> Best regards,
> -- 
> Lorenzo Bianconi <lorenzo@kernel.org>
> 
>
patchwork-bot+netdevbpf@kernel.org Oct. 18, 2024, 2:50 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Andrew Lunn <andrew@lunn.ch>:

On Tue, 15 Oct 2024 09:58:09 +0200 you wrote:
> Fix typo in airoha_fe_init routine configuring CDM2_OAM_QSEL_MASK field
> of REG_CDM2_FWD_CFG register.
> This bug is not introducing any user visible problem since Frame Engine
> CDM2 port is used just by the second QDMA block and we currently enable
> just QDMA1 block connected to the MT7530 dsa switch via CDM1 port.
> 
> Introduced by commit 23020f049327 ("net: airoha: Introduce ethernet
> support for EN7581 SoC")
> 
> [...]

Here is the summary with links:
  - [net-next] net: airoha: Fix typo in REG_CDM2_FWD_CFG configuration
    https://git.kernel.org/netdev/net-next/c/30d9d8f6a2d7

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mediatek/airoha_eth.c b/drivers/net/ethernet/mediatek/airoha_eth.c
index e037f725f6d3505a8b91815ae26322f5d1b8590c..45665a5b14f5c646d23aaf4830e55a118e9f1a8a 100644
--- a/drivers/net/ethernet/mediatek/airoha_eth.c
+++ b/drivers/net/ethernet/mediatek/airoha_eth.c
@@ -1371,7 +1371,8 @@  static int airoha_fe_init(struct airoha_eth *eth)
 	airoha_fe_set(eth, REG_GDM_MISC_CFG,
 		      GDM2_RDM_ACK_WAIT_PREF_MASK |
 		      GDM2_CHN_VLD_MODE_MASK);
-	airoha_fe_rmw(eth, REG_CDM2_FWD_CFG, CDM2_OAM_QSEL_MASK, 15);
+	airoha_fe_rmw(eth, REG_CDM2_FWD_CFG, CDM2_OAM_QSEL_MASK,
+		      FIELD_PREP(CDM2_OAM_QSEL_MASK, 15));
 
 	/* init fragment and assemble Force Port */
 	/* NPU Core-3, NPU Bridge Channel-3 */