Re: [PATCH net-next v3] net: dsa: b53: mirror CPU-bound frames to port 5 when port 8 is unused

From: Joseph Telaak

Date: Thu Dec 03 2026 - 21:20:48 EST


On Thu, Dec 03, 2026 at 07:14AM, netdev-bot+sashiko@xxxxxxxxxx wrote:
> This check covers every 531x5 part (BCM53101, 53115, 53125, 53128,
> 53134) whenever port 5 is the CPU port, tags are on and port 8 is not in
> DT. Does "unused in DT" reliably mean that port 8 is physically
> unconnected and can transmit with a forced link?

Not reliably. Port 8's interface comes from the IMP_MODE straps, which
select RGMII, MII, RvMII or GMII. In RGMII, GMII and RvMII the switch
drives its own transmit clock, so port 8 sends with nothing attached.
In MII mode the clock comes from the other side, so with nothing there
the mirror would get nothing. I only tested a BCM53125 strapped to
RGMII.

A MAC that is wired to port 8 but left out of the DT would get the
mirrored copies. With Rx disabled on port 8 (below), it can't send
anything into the switch.

Florian, Jonas: the public BCM53125 datasheet documents the IMP_MODE
straps but no register that reports them, and b53 only defines
B53_STRAP_VALUE (page 01h, 0x70) for the 53115. Is there one on the
531x5 parts? If so, v4 can skip the mirror when port 8 is strapped to
MII. If not, would you rather v4 enable it only on the BCM53125, which
is what I tested?

> Would it be enough for the egress mirror to keep PORT_CTRL_RX_DISABLE
> set here along with PORT_CTRL_DIS_STATE?

Yes. The mirror only needs port 8 to transmit, so v4 will keep Rx
disabled on it.

pw-bot: cr

Thanks,
Joseph