On 27.11.2026 10:50, James Clark wrote:
> On a Raspberry Pi CM4 and CM5, with one-step P2P, the BCM54210PE PHY
> sends an incorrect Pdelay_Resp: its correctionField does not include
> the time between receiving the Pdelay_Req and sending the Pdelay_Resp.
> This is because the driver sets up the PHY as for two-step. The peer
> then measures a path delay that is tens of microseconds too large.
>
> With one-step P2P, use mode 1 for Pdelay_Req on receive and for
> Pdelay_Resp on transmit; in this mode the PHY adds the time between the
> two to the correctionField. Also skip the normal processing of an RX
> timestamp for a Pdelay_Req, since in this mode the PHY does not insert
> one. Reject one-step P2P when the filter is HWTSTAMP_FILTER_NONE, since
> that filter turns off the PHY's processing of received messages, which
> would make the correctionField of Pdelay_Resp be incorrect.
>
> With this patch, on the CM4, the path delay measured with one-step P2P
> is the same as with E2E, over L2 and UDPv4. The PHY keeps the UDP
> checksum of Pdelay_Resp valid over UDPv4 and UDPv6, still captures the
> TX timestamp of Pdelay_Resp, and handles a Pdelay_Req and Pdelay_Resp on
> either side of a second boundary.
>
> Fixes: 39db6be781cd ("net: phy: broadcom: Add PTP support for some Broadcom PHYs.")
> Cc: stab…@vger.kernel.org
> Signed-off-by: James Clark <j…@jclark.com>
> [...]
Tested-by: Nicolai Buchwitz <n…@tipi-net.de> # CM4, CM5
Reviewed-by: Nicolai Buchwitz <n…@tipi-net.de>
Thanks,
Nicolai