Skip to content

Commit

Permalink
net: dsa: rzn1-a5psw: enable management frames for CPU port
Browse files Browse the repository at this point in the history
[ Upstream commit 9e4b45f ]

Currently, management frame were discarded before reaching the CPU port due
to a misconfiguration of the MGMT_CONFIG register. Enable them by setting
the correct value in this register in order to correctly receive management
frame and handle STP.

Fixes: 888cdb8 ("net: dsa: rzn1-a5psw: add Renesas RZ/N1 advanced 5 port switch driver")
Signed-off-by: Clément Léger <clement.leger@bootlin.com>
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Reviewed-by: Piotr Raczynski <piotr.raczynski@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
clementleger authored and gregkh committed May 24, 2023
1 parent c594f3a commit 04b06ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/dsa/rzn1_a5psw.c
Expand Up @@ -673,7 +673,7 @@ static int a5psw_setup(struct dsa_switch *ds)
}

/* Configure management port */
reg = A5PSW_CPU_PORT | A5PSW_MGMT_CFG_DISCARD;
reg = A5PSW_CPU_PORT | A5PSW_MGMT_CFG_ENABLE;
a5psw_reg_writel(a5psw, A5PSW_MGMT_CFG, reg);

/* Set pattern 0 to forward all frame to mgmt port */
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/dsa/rzn1_a5psw.h
Expand Up @@ -36,7 +36,7 @@
#define A5PSW_INPUT_LEARN_BLOCK(p) BIT(p)

#define A5PSW_MGMT_CFG 0x20
#define A5PSW_MGMT_CFG_DISCARD BIT(7)
#define A5PSW_MGMT_CFG_ENABLE BIT(6)

#define A5PSW_MODE_CFG 0x24
#define A5PSW_MODE_STATS_RESET BIT(31)
Expand Down

0 comments on commit 04b06ac

Please sign in to comment.