diff mbox series

[net-next,1/2] net: dsa: realtek: Rename bogus RTL8368S variable

Message ID 20231209-rtl8366rb-mtu-fix-v1-1-df863e2b2b2a@linaro.org (mailing list archive)
State Accepted
Commit 389119c842187e2425d8e0354aabe5c3383c5020
Delegated to: Netdev Maintainers
Headers show
Series net: dsa: realtek: Two RTL8366RB fixes | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
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: 1115 this patch: 1115
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 1142 this patch: 1142
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: 1142 this patch: 1142
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 26 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

Commit Message

Linus Walleij Dec. 9, 2023, 10:37 p.m. UTC
Rename the register name to RTL8366RB instead of the bogus
RTL8368S (internal product name?)

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/net/dsa/realtek/rtl8366rb.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Comments

Alvin Šipraga Dec. 10, 2023, 1 p.m. UTC | #1
On Sat, Dec 09, 2023 at 11:37:34PM +0100, Linus Walleij wrote:
> Rename the register name to RTL8366RB instead of the bogus
> RTL8368S (internal product name?)
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>

> ---
>  drivers/net/dsa/realtek/rtl8366rb.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/dsa/realtek/rtl8366rb.c b/drivers/net/dsa/realtek/rtl8366rb.c
> index b39b719a5b8f..887afd1392cb 100644
> --- a/drivers/net/dsa/realtek/rtl8366rb.c
> +++ b/drivers/net/dsa/realtek/rtl8366rb.c
> @@ -117,10 +117,11 @@
>  	RTL8366RB_STP_STATE((port), RTL8366RB_STP_MASK)
>  
>  /* CPU port control reg */
> -#define RTL8368RB_CPU_CTRL_REG		0x0061
> -#define RTL8368RB_CPU_PORTS_MSK		0x00FF
> +#define RTL8366RB_CPU_CTRL_REG		0x0061
> +#define RTL8366RB_CPU_PORTS_MSK		0x00FF
>  /* Disables inserting custom tag length/type 0x8899 */
> -#define RTL8368RB_CPU_NO_TAG		BIT(15)
> +#define RTL8366RB_CPU_NO_TAG		BIT(15)
> +#define RTL8366RB_CPU_TAG_SIZE		4
>  
>  #define RTL8366RB_SMAR0			0x0070 /* bits 0..15 */
>  #define RTL8366RB_SMAR1			0x0071 /* bits 16..31 */
> @@ -912,10 +913,10 @@ static int rtl8366rb_setup(struct dsa_switch *ds)
>  
>  	/* Enable CPU port with custom DSA tag 8899.
>  	 *
> -	 * If you set RTL8368RB_CPU_NO_TAG (bit 15) in this registers
> +	 * If you set RTL8366RB_CPU_NO_TAG (bit 15) in this register
>  	 * the custom tag is turned off.
>  	 */
> -	ret = regmap_update_bits(priv->map, RTL8368RB_CPU_CTRL_REG,
> +	ret = regmap_update_bits(priv->map, RTL8366RB_CPU_CTRL_REG,
>  				 0xFFFF,
>  				 BIT(priv->cpu_port));
>  	if (ret)
> 
> -- 
> 2.34.1
>
Luiz Angelo Daros de Luca Dec. 11, 2023, 2:50 a.m. UTC | #2
Em sáb., 9 de dez. de 2023 às 19:37, Linus Walleij
<linus.walleij@linaro.org> escreveu:
>
> Rename the register name to RTL8366RB instead of the bogus
> RTL8368S (internal product name?)
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Reviewed-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>

> ---
>  drivers/net/dsa/realtek/rtl8366rb.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/dsa/realtek/rtl8366rb.c b/drivers/net/dsa/realtek/rtl8366rb.c
> index b39b719a5b8f..887afd1392cb 100644
> --- a/drivers/net/dsa/realtek/rtl8366rb.c
> +++ b/drivers/net/dsa/realtek/rtl8366rb.c
> @@ -117,10 +117,11 @@
>         RTL8366RB_STP_STATE((port), RTL8366RB_STP_MASK)
>
>  /* CPU port control reg */
> -#define RTL8368RB_CPU_CTRL_REG         0x0061
> -#define RTL8368RB_CPU_PORTS_MSK                0x00FF
> +#define RTL8366RB_CPU_CTRL_REG         0x0061
> +#define RTL8366RB_CPU_PORTS_MSK                0x00FF
>  /* Disables inserting custom tag length/type 0x8899 */
> -#define RTL8368RB_CPU_NO_TAG           BIT(15)
> +#define RTL8366RB_CPU_NO_TAG           BIT(15)
> +#define RTL8366RB_CPU_TAG_SIZE         4
>
>  #define RTL8366RB_SMAR0                        0x0070 /* bits 0..15 */
>  #define RTL8366RB_SMAR1                        0x0071 /* bits 16..31 */
> @@ -912,10 +913,10 @@ static int rtl8366rb_setup(struct dsa_switch *ds)
>
>         /* Enable CPU port with custom DSA tag 8899.
>          *
> -        * If you set RTL8368RB_CPU_NO_TAG (bit 15) in this registers
> +        * If you set RTL8366RB_CPU_NO_TAG (bit 15) in this register
>          * the custom tag is turned off.
>          */
> -       ret = regmap_update_bits(priv->map, RTL8368RB_CPU_CTRL_REG,
> +       ret = regmap_update_bits(priv->map, RTL8366RB_CPU_CTRL_REG,
>                                  0xFFFF,
>                                  BIT(priv->cpu_port));
>         if (ret)
>
> --
> 2.34.1
>
>
Florian Fainelli Dec. 11, 2023, 9:24 p.m. UTC | #3
On 12/9/23 14:37, Linus Walleij wrote:
> Rename the register name to RTL8366RB instead of the bogus
> RTL8368S (internal product name?)
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
diff mbox series

Patch

diff --git a/drivers/net/dsa/realtek/rtl8366rb.c b/drivers/net/dsa/realtek/rtl8366rb.c
index b39b719a5b8f..887afd1392cb 100644
--- a/drivers/net/dsa/realtek/rtl8366rb.c
+++ b/drivers/net/dsa/realtek/rtl8366rb.c
@@ -117,10 +117,11 @@ 
 	RTL8366RB_STP_STATE((port), RTL8366RB_STP_MASK)
 
 /* CPU port control reg */
-#define RTL8368RB_CPU_CTRL_REG		0x0061
-#define RTL8368RB_CPU_PORTS_MSK		0x00FF
+#define RTL8366RB_CPU_CTRL_REG		0x0061
+#define RTL8366RB_CPU_PORTS_MSK		0x00FF
 /* Disables inserting custom tag length/type 0x8899 */
-#define RTL8368RB_CPU_NO_TAG		BIT(15)
+#define RTL8366RB_CPU_NO_TAG		BIT(15)
+#define RTL8366RB_CPU_TAG_SIZE		4
 
 #define RTL8366RB_SMAR0			0x0070 /* bits 0..15 */
 #define RTL8366RB_SMAR1			0x0071 /* bits 16..31 */
@@ -912,10 +913,10 @@  static int rtl8366rb_setup(struct dsa_switch *ds)
 
 	/* Enable CPU port with custom DSA tag 8899.
 	 *
-	 * If you set RTL8368RB_CPU_NO_TAG (bit 15) in this registers
+	 * If you set RTL8366RB_CPU_NO_TAG (bit 15) in this register
 	 * the custom tag is turned off.
 	 */
-	ret = regmap_update_bits(priv->map, RTL8368RB_CPU_CTRL_REG,
+	ret = regmap_update_bits(priv->map, RTL8366RB_CPU_CTRL_REG,
 				 0xFFFF,
 				 BIT(priv->cpu_port));
 	if (ret)