[net] net: stmmac: xgmac: fix a typo of register name in DPP safety handling

Message ID 20240203053133.1129236-1-0x1207@gmail.com
State New
Headers
Series [net] net: stmmac: xgmac: fix a typo of register name in DPP safety handling |

Commit Message

Furong Xu Feb. 3, 2024, 5:31 a.m. UTC
  DDPP is copied from Synopsys Data book:

DDPP: Disable Data path Parity Protection.
    When it is 0x0, Data path Parity Protection is enabled.
    When it is 0x1, Data path Parity Protection is disabled.

The macro name should be XGMAC_DPP_DISABLE.

Fixes: 46eba193d04f ("net: stmmac: xgmac: fix handling of DPP safety error for DMA channels")
Signed-off-by: Furong Xu <0x1207@gmail.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h      | 2 +-
 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Jiri Pirko Feb. 3, 2024, 1:18 p.m. UTC | #1
Sat, Feb 03, 2024 at 06:31:33AM CET, 0x1207@gmail.com wrote:
>DDPP is copied from Synopsys Data book:
>
>DDPP: Disable Data path Parity Protection.
>    When it is 0x0, Data path Parity Protection is enabled.
>    When it is 0x1, Data path Parity Protection is disabled.
>
>The macro name should be XGMAC_DPP_DISABLE.
>
>Fixes: 46eba193d04f ("net: stmmac: xgmac: fix handling of DPP safety error for DMA channels")
>Signed-off-by: Furong Xu <0x1207@gmail.com>

Looks okay, but this is net-next material.


>---
> drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h      | 2 +-
> drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
>index 5c67a3f89f08..6a2c7d22df1e 100644
>--- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
>+++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
>@@ -304,7 +304,7 @@
> #define XGMAC_TXCEIE			BIT(0)
> #define XGMAC_MTL_ECC_INT_STATUS	0x000010cc
> #define XGMAC_MTL_DPP_CONTROL		0x000010e0
>-#define XGMAC_DDPP_DISABLE		BIT(0)
>+#define XGMAC_DPP_DISABLE		BIT(0)
> #define XGMAC_MTL_TXQ_OPMODE(x)		(0x00001100 + (0x80 * (x)))
> #define XGMAC_TQS			GENMASK(25, 16)
> #define XGMAC_TQS_SHIFT			16
>diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
>index 04d7c4dc2e35..323c57f03c93 100644
>--- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
>+++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
>@@ -928,7 +928,7 @@ dwxgmac3_safety_feat_config(void __iomem *ioaddr, unsigned int asp,
> 	/* 5. Enable Data Path Parity Protection */
> 	value = readl(ioaddr + XGMAC_MTL_DPP_CONTROL);
> 	/* already enabled by default, explicit enable it again */
>-	value &= ~XGMAC_DDPP_DISABLE;
>+	value &= ~XGMAC_DPP_DISABLE;
> 	writel(value, ioaddr + XGMAC_MTL_DPP_CONTROL);
> 
> 	return 0;
>-- 
>2.34.1
>
>
  
Serge Semin Feb. 4, 2024, 9:57 p.m. UTC | #2
On Sat, Feb 03, 2024 at 01:31:33PM +0800, Furong Xu wrote:
> DDPP is copied from Synopsys Data book:
> 
> DDPP: Disable Data path Parity Protection.
>     When it is 0x0, Data path Parity Protection is enabled.
>     When it is 0x1, Data path Parity Protection is disabled.
> 
> The macro name should be XGMAC_DPP_DISABLE.

Thanks!

Reviewed-by: Serge Semin <fancer.lancer@gmail.com>

-Serge(y)

> 
> Fixes: 46eba193d04f ("net: stmmac: xgmac: fix handling of DPP safety error for DMA channels")
> Signed-off-by: Furong Xu <0x1207@gmail.com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h      | 2 +-
>  drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
> index 5c67a3f89f08..6a2c7d22df1e 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
> @@ -304,7 +304,7 @@
>  #define XGMAC_TXCEIE			BIT(0)
>  #define XGMAC_MTL_ECC_INT_STATUS	0x000010cc
>  #define XGMAC_MTL_DPP_CONTROL		0x000010e0
> -#define XGMAC_DDPP_DISABLE		BIT(0)
> +#define XGMAC_DPP_DISABLE		BIT(0)
>  #define XGMAC_MTL_TXQ_OPMODE(x)		(0x00001100 + (0x80 * (x)))
>  #define XGMAC_TQS			GENMASK(25, 16)
>  #define XGMAC_TQS_SHIFT			16
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
> index 04d7c4dc2e35..323c57f03c93 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
> @@ -928,7 +928,7 @@ dwxgmac3_safety_feat_config(void __iomem *ioaddr, unsigned int asp,
>  	/* 5. Enable Data Path Parity Protection */
>  	value = readl(ioaddr + XGMAC_MTL_DPP_CONTROL);
>  	/* already enabled by default, explicit enable it again */
> -	value &= ~XGMAC_DDPP_DISABLE;
> +	value &= ~XGMAC_DPP_DISABLE;
>  	writel(value, ioaddr + XGMAC_MTL_DPP_CONTROL);
>  
>  	return 0;
> -- 
> 2.34.1
>
  
Paolo Abeni Feb. 6, 2024, 12:57 p.m. UTC | #3
On Sat, 2024-02-03 at 14:18 +0100, Jiri Pirko wrote:
> Sat, Feb 03, 2024 at 06:31:33AM CET, 0x1207@gmail.com wrote:
> > DDPP is copied from Synopsys Data book:
> > 
> > DDPP: Disable Data path Parity Protection.
> >    When it is 0x0, Data path Parity Protection is enabled.
> >    When it is 0x1, Data path Parity Protection is disabled.
> > 
> > The macro name should be XGMAC_DPP_DISABLE.
> > 
> > Fixes: 46eba193d04f ("net: stmmac: xgmac: fix handling of DPP safety error for DMA channels")
> > Signed-off-by: Furong Xu <0x1207@gmail.com>
> 
> Looks okay, but this is net-next material.

The blamed commit has been applied to net before Serge spotted the typo
during patch review. I think it deserves the net target, so the typo
will never land into vanilla.

Cheers,

Paolo
  
patchwork-bot+netdevbpf@kernel.org Feb. 6, 2024, 1:10 p.m. UTC | #4
Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Sat,  3 Feb 2024 13:31:33 +0800 you wrote:
> DDPP is copied from Synopsys Data book:
> 
> DDPP: Disable Data path Parity Protection.
>     When it is 0x0, Data path Parity Protection is enabled.
>     When it is 0x1, Data path Parity Protection is disabled.
> 
> The macro name should be XGMAC_DPP_DISABLE.
> 
> [...]

Here is the summary with links:
  - [net] net: stmmac: xgmac: fix a typo of register name in DPP safety handling
    https://git.kernel.org/netdev/net/c/1ce2654d87e2

You are awesome, thank you!
  

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
index 5c67a3f89f08..6a2c7d22df1e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
+++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
@@ -304,7 +304,7 @@ 
 #define XGMAC_TXCEIE			BIT(0)
 #define XGMAC_MTL_ECC_INT_STATUS	0x000010cc
 #define XGMAC_MTL_DPP_CONTROL		0x000010e0
-#define XGMAC_DDPP_DISABLE		BIT(0)
+#define XGMAC_DPP_DISABLE		BIT(0)
 #define XGMAC_MTL_TXQ_OPMODE(x)		(0x00001100 + (0x80 * (x)))
 #define XGMAC_TQS			GENMASK(25, 16)
 #define XGMAC_TQS_SHIFT			16
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
index 04d7c4dc2e35..323c57f03c93 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
@@ -928,7 +928,7 @@  dwxgmac3_safety_feat_config(void __iomem *ioaddr, unsigned int asp,
 	/* 5. Enable Data Path Parity Protection */
 	value = readl(ioaddr + XGMAC_MTL_DPP_CONTROL);
 	/* already enabled by default, explicit enable it again */
-	value &= ~XGMAC_DDPP_DISABLE;
+	value &= ~XGMAC_DPP_DISABLE;
 	writel(value, ioaddr + XGMAC_MTL_DPP_CONTROL);
 
 	return 0;