mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v3 00/14] net: dsa: b53: fix BCM5325 support
@ 2025-06-12  8:37 Álvaro Fernández Rojas
  2025-06-12  8:37 ` [PATCH net-next v3 01/14] net: dsa: tag_brcm: legacy: reorganize functions Álvaro Fernández Rojas
                   ` (13 more replies)
  0 siblings, 14 replies; 22+ messages in thread
From: Álvaro Fernández Rojas @ 2025-06-12  8:37 UTC (permalink / raw)
  To: jonas.gorski, florian.fainelli, andrew, olteanv, davem, edumazet,
	kuba, pabeni, horms, vivien.didelot, netdev, linux-kernel,
	dgcbueu
  Cc: Álvaro Fernández Rojas

These patches get the BCM5325 switch working with b53.

The existing brcm legacy tag only works with BCM63xx switches.
We need to add a new legacy tag for BCM5325 and BCM5365 switches, which
require including the FCS and length.

I'm not really sure that everything here is correct since I don't work for
Broadcom and all this is based on the public datasheet available for the
BCM5325 and my own experiments with a Huawei HG556a (BCM6358).

Both sets of patches have been merged due to the change requested by Jonas
about BRCM_HDR register access depending on legacy tags.

 v3: introduce changes requested by Florian, Jonas and Jakub:
  - Improve brcm legacy tag Kconfig description, use __le32 and crc32_le().
  - Detect BCM5325 variants as requested by Florian.
  - B53_VLAN_ID_IDX exists in newer BCM5325E switches.
  - Check for legacy tag protocols instead of is5325() for B53_BRCM_HDR.
  - Use in_range() helper for B53_PD_MODE_CTRL_25.

 v2: introduce changes requested by Jonas, Florian and Vladimir:
  - Add b53_arl_to_entry_25 function.
  - Add b53_arl_from_entry_25 function.
  - Add b53_arl_read_25 function, fixing usage of ARLTBL_VALID_25 and
    ARLTBL_VID_MASK_25.
  - Change b53_set_forwarding function flow.
  - Disallow BR_LEARNING on b53_br_flags_pre() for BCM5325.
  - Drop rate control registers.
  - Move B53_PD_MODE_CTRL_25 to b53_setup_port().
  - Replace swab32() with cpu_to_le32().

Florian Fainelli (1):
  net: dsa: b53: add support for FDB operations on 5325/5365

Álvaro Fernández Rojas (13):
  net: dsa: tag_brcm: legacy: reorganize functions
  net: dsa: tag_brcm: add support for legacy FCS tags
  net: dsa: b53: support legacy FCS tags
  net: dsa: b53: detect BCM5325 variants
  net: dsa: b53: prevent FAST_AGE access on BCM5325
  net: dsa: b53: prevent SWITCH_CTRL access on BCM5325
  net: dsa: b53: fix IP_MULTICAST_CTRL on BCM5325
  net: dsa: b53: prevent DIS_LEARNING access on BCM5325
  net: dsa: b53: prevent BRCM_HDR access on older devices
  net: dsa: b53: prevent GMII_PORT_OVERRIDE_CTRL access on BCM5325
  net: dsa: b53: fix unicast/multicast flooding on BCM5325
  net: dsa: b53: fix b53_imp_vlan_setup for BCM5325
  net: dsa: b53: ensure BCM5325 PHYs are enabled

 drivers/net/dsa/b53/Kconfig      |   1 +
 drivers/net/dsa/b53/b53_common.c | 296 ++++++++++++++++++++++++-------
 drivers/net/dsa/b53/b53_priv.h   |  45 ++++-
 drivers/net/dsa/b53/b53_regs.h   |  24 ++-
 include/net/dsa.h                |   2 +
 net/dsa/Kconfig                  |  16 +-
 net/dsa/tag_brcm.c               | 119 ++++++++++---
 7 files changed, 409 insertions(+), 94 deletions(-)

-- 
2.39.5


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

end of thread, other threads:[~2025-06-12 20:30 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-12  8:37 [PATCH net-next v3 00/14] net: dsa: b53: fix BCM5325 support Álvaro Fernández Rojas
2025-06-12  8:37 ` [PATCH net-next v3 01/14] net: dsa: tag_brcm: legacy: reorganize functions Álvaro Fernández Rojas
2025-06-12  8:37 ` [PATCH net-next v3 02/14] net: dsa: tag_brcm: add support for legacy FCS tags Álvaro Fernández Rojas
2025-06-12  8:37 ` [PATCH net-next v3 03/14] net: dsa: b53: support " Álvaro Fernández Rojas
2025-06-12  8:37 ` [PATCH net-next v3 04/14] net: dsa: b53: detect BCM5325 variants Álvaro Fernández Rojas
2025-06-12  9:17   ` Jonas Gorski
2025-06-12  9:47     ` Álvaro Fernández Rojas
2025-06-12  8:37 ` [PATCH net-next v3 05/14] net: dsa: b53: add support for FDB operations on 5325/5365 Álvaro Fernández Rojas
2025-06-12  8:37 ` [PATCH net-next v3 06/14] net: dsa: b53: prevent FAST_AGE access on BCM5325 Álvaro Fernández Rojas
2025-06-12  8:37 ` [PATCH net-next v3 07/14] net: dsa: b53: prevent SWITCH_CTRL " Álvaro Fernández Rojas
2025-06-12  8:37 ` [PATCH net-next v3 08/14] net: dsa: b53: fix IP_MULTICAST_CTRL " Álvaro Fernández Rojas
2025-06-12 20:29   ` Florian Fainelli
2025-06-12  8:37 ` [PATCH net-next v3 09/14] net: dsa: b53: prevent DIS_LEARNING access " Álvaro Fernández Rojas
2025-06-12 20:30   ` Florian Fainelli
2025-06-12  8:37 ` [PATCH net-next v3 10/14] net: dsa: b53: prevent BRCM_HDR access on older devices Álvaro Fernández Rojas
2025-06-12  8:37 ` [PATCH net-next v3 11/14] net: dsa: b53: prevent GMII_PORT_OVERRIDE_CTRL access on BCM5325 Álvaro Fernández Rojas
2025-06-12  8:37 ` [PATCH net-next v3 12/14] net: dsa: b53: fix unicast/multicast flooding " Álvaro Fernández Rojas
2025-06-12  8:37 ` [PATCH net-next v3 13/14] net: dsa: b53: fix b53_imp_vlan_setup for BCM5325 Álvaro Fernández Rojas
2025-06-12 20:30   ` Florian Fainelli
2025-06-12  8:37 ` [PATCH net-next v3 14/14] net: dsa: b53: ensure BCM5325 PHYs are enabled Álvaro Fernández Rojas
2025-06-12  9:19   ` Jonas Gorski
2025-06-12  9:41     ` Álvaro Fernández Rojas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®