netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: b53: enable BPDU reception for management port
@ 2025-04-14 20:04 Jonas Gorski
  2025-04-14 20:43 ` Florian Fainelli
  2025-04-17  1:21 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jonas Gorski @ 2025-04-14 20:04 UTC (permalink / raw)
  To: Florian Fainelli, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Florian Fainelli, netdev, linux-kernel

For STP to work, receiving BPDUs is essential, but the appropriate bit
was never set. Without GC_RX_BPDU_EN, the switch chip will filter all
BPDUs, even if an appropriate PVID VLAN was setup.

Fixes: ff39c2d68679 ("net: dsa: b53: Add bridge support")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
---
 drivers/net/dsa/b53/b53_common.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 61d164ffb3ae..e5ba71897906 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -737,6 +737,15 @@ static void b53_enable_mib(struct b53_device *dev)
 	b53_write8(dev, B53_MGMT_PAGE, B53_GLOBAL_CONFIG, gc);
 }
 
+static void b53_enable_stp(struct b53_device *dev)
+{
+	u8 gc;
+
+	b53_read8(dev, B53_MGMT_PAGE, B53_GLOBAL_CONFIG, &gc);
+	gc |= GC_RX_BPDU_EN;
+	b53_write8(dev, B53_MGMT_PAGE, B53_GLOBAL_CONFIG, gc);
+}
+
 static u16 b53_default_pvid(struct b53_device *dev)
 {
 	if (is5325(dev) || is5365(dev))
@@ -876,6 +885,7 @@ static int b53_switch_reset(struct b53_device *dev)
 	}
 
 	b53_enable_mib(dev);
+	b53_enable_stp(dev);
 
 	return b53_flush_arl(dev, FAST_AGE_STATIC);
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] net: b53: enable BPDU reception for management port
  2025-04-14 20:04 [PATCH net] net: b53: enable BPDU reception for management port Jonas Gorski
@ 2025-04-14 20:43 ` Florian Fainelli
  2025-04-17  1:21 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2025-04-14 20:43 UTC (permalink / raw)
  To: Jonas Gorski, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Florian Fainelli, netdev, linux-kernel

On 4/14/25 13:04, Jonas Gorski wrote:
> For STP to work, receiving BPDUs is essential, but the appropriate bit
> was never set. Without GC_RX_BPDU_EN, the switch chip will filter all
> BPDUs, even if an appropriate PVID VLAN was setup.
> 
> Fixes: ff39c2d68679 ("net: dsa: b53: Add bridge support")
> Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>

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

Thanks Jonas!
-- 
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] net: b53: enable BPDU reception for management port
  2025-04-14 20:04 [PATCH net] net: b53: enable BPDU reception for management port Jonas Gorski
  2025-04-14 20:43 ` Florian Fainelli
@ 2025-04-17  1:21 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-04-17  1:21 UTC (permalink / raw)
  To: Jonas Gorski
  Cc: florian.fainelli, andrew, olteanv, davem, edumazet, kuba, pabeni,
	f.fainelli, netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 14 Apr 2025 22:04:34 +0200 you wrote:
> For STP to work, receiving BPDUs is essential, but the appropriate bit
> was never set. Without GC_RX_BPDU_EN, the switch chip will filter all
> BPDUs, even if an appropriate PVID VLAN was setup.
> 
> Fixes: ff39c2d68679 ("net: dsa: b53: Add bridge support")
> Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
> 
> [...]

Here is the summary with links:
  - [net] net: b53: enable BPDU reception for management port
    https://git.kernel.org/netdev/net/c/36355ddfe895

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-17  1:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-14 20:04 [PATCH net] net: b53: enable BPDU reception for management port Jonas Gorski
2025-04-14 20:43 ` Florian Fainelli
2025-04-17  1:21 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).