Skip to content

Broadcom tags support for 531x5/539x families

Florian Fainelli netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: dsa: Get information about stacked DSA protocoldrivers/net/dsa/b53/b53_common.c drivers/net/dsa/b53/b53_priv.h drivers/net/dsa/dsa_loop.c +17 more+78 -290 replies
2/2net: dsa: b53: Enable Broadcom tags for 531x5/539x familiesdrivers/net/dsa/b53/b53_common.c+37 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/2] Broadcom tags support for 531x5/539x families

Hi David,

This patch series finally allows us to enable Broadcom tags on the BCM531x5/BCM539x switch series which are very often cascaded onto another on-chip Broadcom switch. Because of that we need to be able to detect that Broadcom tags are already enabled on our DSA master which happens to be a DSA slave in that case since they are not part of the same DSA switch tree, the protocol does not support that.

Due to the way DSA works, get_tag_protocol() is called prior to ds->ops->setup and we do not have all data structures set-up (in particular dsa_port::cpu_dp is not filed yet) so doing this at the time get_tag_protocol() is called and without exporting a helper function is desirable to limit our footprint into the framework.

Having the core (net/dsa/dsa2.c) return and enforce DSA_TAG_PROTO_NONE was considered and done initially but this leaves the driver outside of the decision to force/fallback to a particular protocol, instead of letting it in control. Also there is no reason to suspect that all tagging protocols are problematic, e.g.: "inner" Marvell EDSA with "outer" Broadcom tag may work just fine, and vice versa.

This was tested on:

- Lamobo R1 which now has working Broadcom tags for its external BCM53125 switch
- BCM7445 which has a BCM53125 hanging off one of its internal switch port, the BCM53125 still works with DSA_TAG_PROTO_NONE
- BCM7278 which has a peculiar dual CPU port set-up (so dual IMP mode needs to be enabled)
- Northstar Plus with DSA_TAG_PROTO_BRCM_PREPEND and no external switches hanging off the internal switch

Thanks!

Florian Fainelli (2):
net: dsa: Get information about stacked DSA protocol
net: dsa: b53: Enable Broadcom tags for 531x5/539x families

 drivers/net/dsa/b53/b53_common.c       | 66 +++++++++++++++++++-------
 drivers/net/dsa/b53/b53_priv.h         |  4 +-
 drivers/net/dsa/dsa_loop.c             |  3 +-
 drivers/net/dsa/lan9303-core.c         |  3 +-
 drivers/net/dsa/lantiq_gswip.c         |  3 +-
 drivers/net/dsa/microchip/ksz8795.c    |  3 +-
 drivers/net/dsa/microchip/ksz9477.c    |  3 +-
 drivers/net/dsa/mt7530.c               |  3 +-
 drivers/net/dsa/mv88e6060.c            |  3 +-
 drivers/net/dsa/mv88e6xxx/chip.c       |  3 +-
 drivers/net/dsa/ocelot/felix.c         |  3 +-
 drivers/net/dsa/qca/ar9331.c           |  3 +-
 drivers/net/dsa/qca8k.c                |  3 +-
 drivers/net/dsa/rtl8366rb.c            |  3 +-
 drivers/net/dsa/sja1105/sja1105_main.c |  3 +-
 drivers/net/dsa/vitesse-vsc73xx-core.c |  3 +-
 include/net/dsa.h                      |  3 +-
 net/dsa/dsa2.c                         | 31 +++++++++++-
 net/dsa/dsa_priv.h                     |  1 +
 net/dsa/slave.c                        |  4 +-
 20 files changed, 114 insertions(+), 37 deletions(-)
Signature · 1 line
2.17.1