Skip to content

net: dsa: b53: fix BCM5325 support

Álvaro Fernández Rojas lkml netdev 4 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest14 patches 6 repliesApplied 14/14
  2. v314 patches 7 repliesSuperseded
  3. v23 patches 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC3 patches0 repliesSuperseded

Patches in v4 All 14 applied

#Subject and filesSizeRepliesApplied
1/14net: dsa: tag_brcm: legacy: reorganize functionsnet/dsa/tag_brcm.c+32 -320 repliesApplied
2/14net: dsa: tag_brcm: add support for legacy FCS tagsinclude/net/dsa.h net/dsa/Kconfig net/dsa/tag_brcm.c+88 -31 replyApplied
3/14net: dsa: b53: support legacy FCS tagsdrivers/net/dsa/b53/Kconfig drivers/net/dsa/b53/b53_common.c+6 -20 repliesApplied
4/14net: dsa: b53: detect BCM5325 variantsdrivers/net/dsa/b53/b53_common.c drivers/net/dsa/b53/b53_priv.h+40 -31 replyApplied
5/14net: dsa: b53: add support for FDB operations on 5325/5365drivers/net/dsa/b53/b53_common.c drivers/net/dsa/b53/b53_priv.h drivers/net/dsa/b53/b53_regs.h+115 -220 repliesApplied
6/14net: dsa: b53: prevent FAST_AGE access on BCM5325drivers/net/dsa/b53/b53_common.c+9 -01 replyApplied
7/14net: dsa: b53: prevent SWITCH_CTRL access on BCM5325drivers/net/dsa/b53/b53_common.c+6 -50 repliesApplied
8/14net: dsa: b53: fix IP_MULTICAST_CTRL on BCM5325drivers/net/dsa/b53/b53_common.c drivers/net/dsa/b53/b53_regs.h+12 -70 repliesApplied
9/14net: dsa: b53: prevent DIS_LEARNING access on BCM5325drivers/net/dsa/b53/b53_common.c+10 -10 repliesApplied
10/14net: dsa: b53: prevent BRCM_HDR access on older devicesdrivers/net/dsa/b53/b53_common.c+5 -00 repliesApplied
11/14net: dsa: b53: prevent GMII_PORT_OVERRIDE_CTRL access on BCM5325drivers/net/dsa/b53/b53_common.c drivers/net/dsa/b53/b53_regs.h+18 -40 repliesApplied
12/14net: dsa: b53: fix unicast/multicast flooding on BCM5325drivers/net/dsa/b53/b53_common.c drivers/net/dsa/b53/b53_regs.h+55 -181 replyApplied
13/14net: dsa: b53: fix b53_imp_vlan_setup for BCM5325drivers/net/dsa/b53/b53_common.c+4 -00 repliesApplied
14/14net: dsa: b53: ensure BCM5325 PHYs are enableddrivers/net/dsa/b53/b53_common.c drivers/net/dsa/b53/b53_regs.h+17 -11 replyApplied

Reviews trailers per patch

13 of 14 patches have a Reviewed-by or Acked-by.

PatchFlorian Fainelli
1/14R-b
2/14R-b
3/14R-b
4/14R-b
5/14
6/14R-b
7/14R-b
8/14R-b
9/14R-b
10/14R-b
11/14R-b
12/14R-b
13/14R-b
14/14R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH net-next v4 00/14] net: dsa: b53: fix BCM5325 support

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.

v4: introduce changes requested by Jonas and other improvements:
- Fix line length warning.
- Introduce variant_id field in b53_device.
- Move B53_VLAN_ID_IDX BCM5325M check to variants patch.
- Reduce number of ARL buckets for BCM5325E.
- Disable ARLIO_PAGE->VLAN_ID_IDX access for BCM5325M.
- Avoid in_range() confusion.
- Ensure PD_MODE_POWER_DOWN_PORT(0) is cleared.
- Improve B53_PD_MODE_CTRL_25 register defines.

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 | 284 ++++++++++++++++++++++++-------
 drivers/net/dsa/b53/b53_priv.h   |  48 ++++++
 drivers/net/dsa/b53/b53_regs.h   |  27 ++-
 include/net/dsa.h                |   2 +
 net/dsa/Kconfig                  |  16 +-
 net/dsa/tag_brcm.c               | 119 ++++++++++---
 7 files changed, 408 insertions(+), 89 deletions(-)
Signature · 1 line
2.39.5