[PATCH net v3 0/8] net: dsa: b53: Preliminary fixes
From: Florian Fainelli
Date: Fri Oct 30 2026 - 17:22:08 EST
This patch series contains fixes to issues reported by Sashiko on the
b53 PCS bug fixes being submitted, and then some more that came from
code review and testing.
Except for issue #2, all of the other issues did trigger in testing and
needed to be corrected.
Changes in v3:
- patch 2: added Daniel's R-b tag
- patch 3: mention in the commit message that deleting an absent entry
now returns -ENOENT, including when the lookup runs out of space
- patch 4: document that the patch also fixes the clear of the capture
port field in b53_mirror_del()
- patch 6: reference count the mirror source bits per port and
direction, ignoring deletions without a matching reference
- patch 7: new, harden mirror register programming:
- reset the mirror capture and source control registers at setup for
b53 and bcm_sf2, since not all switches are reset
- check and propagate all mirror register read/write errors, only
taking a source reference once hardware programming succeeded
- use the source masks rather than MIRROR_EN to decide whether the
destination is occupied, and write the destination before the source
- log failures in b53_mirror_del() since it cannot return an error
- patch 8: new, fix the mirror capture port encoding on BCM5325 and
BCM5365, which use an 11-bit bitmap (CPU port at bit 8) instead of a
port ID, and translate the CPU port in the ingress/egress source
masks as well (verified against the BCM5325E, BCM5325M and BCM5365P
datasheets)
Changes in v2:
- collected Jonas' R-b tags
- corrected logic in patch #3 to propagate -ENOENT, memset after the
debug print, translate -ENOSPC to -ENOENT when deleting
Florian Fainelli (8):
net: dsa: b53: initialize the jumbo frame size register offset
net: dsa: b53: fix the SRAB grant timeout check
net: dsa: b53: clear stale state when creating an ARL entry
net: dsa: b53: reject conflicting mirror destinations
net: dsa: b53: use the correct override register 2 Gbps bit
net: dsa: b53: reference count shared mirror source bits
net: dsa: b53: harden mirror register programming
net: dsa: b53: fix mirror port encoding on BCM5325 and BCM5365
drivers/net/dsa/b53/b53_common.c | 183 ++++++++++++++++++++++++-------
drivers/net/dsa/b53/b53_priv.h | 3 +
drivers/net/dsa/b53/b53_regs.h | 1 +
drivers/net/dsa/b53/b53_srab.c | 2 +-
drivers/net/dsa/bcm_sf2.c | 5 +
5 files changed, 152 insertions(+), 42 deletions(-)
--
2.53.0