From: Nicolai Buchwitz <nb@tipi-net.de>
To: James Clark <jjc@jclark.com>
Cc: Florian Fainelli <florian.fainelli@broadcom.com>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Jonathan Lemon <jonathan.lemon@gmail.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH net 1/2] net: phy: broadcom: fix two-step P2P timestamping
Date: Wed, 02 Dec 2026 10:53:59 +0100 [thread overview]
Message-ID: <57463bb40dac300d7162ccebe32bc222@tipi-net.de> (raw)
In-Reply-To: <5cefa3ba7e356bd2d3fa05cef28e875f4fa6266b.1795772837.git.jjc@jclark.com>
On 27.11.2026 10:50, James Clark wrote:
> On a Raspberry Pi CM4 and CM5, with two-step P2P, the BCM54210PE PHY
> sends an incorrect Pdelay_Resp: its requestReceiptTimestamp is the time
> the Pdelay_Resp was sent, not the time the Pdelay_Req was received.
> This is because the driver puts every PTP event message in TX mode 3,
> in which the PHY writes the TX timestamp into the message. The peer
> then measures a path delay that is tens of microseconds too large.
>
> Use mode 0 for Pdelay_Resp, in which the PHY leaves the message
> unchanged and still captures the TX timestamp.
>
> With this patch, on the CM4, the path delay measured with P2P is the
> same as with E2E.
>
> Fixes: 39db6be781cd ("net: phy: broadcom: Add PTP support for some
> Broadcom PHYs.")
> Cc: stable@vger.kernel.org
> Signed-off-by: James Clark <jjc@jclark.com>
> ---
> drivers/net/phy/bcm-phy-ptp.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/phy/bcm-phy-ptp.c
> b/drivers/net/phy/bcm-phy-ptp.c
> index 443917c9d1bc..4b24ba7115d7 100644
> --- a/drivers/net/phy/bcm-phy-ptp.c
> +++ b/drivers/net/phy/bcm-phy-ptp.c
> @@ -826,8 +826,7 @@ static int bcm_ptp_hwtstamp_set(struct
> mii_timestamper *mii_ts,
>
> mode = TX_MODE_SEL(PORT, SYNC, REPLACE_TS) |
> TX_MODE_SEL(PORT, DELAY_REQ, REPLACE_TS) |
> - TX_MODE_SEL(PORT, PDELAY_REQ, REPLACE_TS) |
> - TX_MODE_SEL(PORT, PDELAY_RESP, REPLACE_TS);
> + TX_MODE_SEL(PORT, PDELAY_REQ, REPLACE_TS);
>
> bcm_phy_write_exp(priv->phydev, TX_EVENT_MODE, mode);
Tested-by: Nicolai Buchwitz <nb@tipi-net.de> # CM4, CM5
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Thanks,
Nicolai
next prev parent reply other threads:[~2026-12-02 9:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 9:50 [PATCH net 0/2] net: phy: broadcom: fix P2P timestamping James Clark
2026-11-27 9:50 ` [PATCH net 1/2] net: phy: broadcom: fix two-step " James Clark
2026-12-02 9:53 ` Nicolai Buchwitz [this message]
2026-11-27 9:50 ` [PATCH net 2/2] net: phy: broadcom: fix one-step " James Clark
2026-12-02 9:54 ` Nicolai Buchwitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57463bb40dac300d7162ccebe32bc222@tipi-net.de \
--to=nb@tipi-net.de \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=jjc@jclark.com \
--cc=jonathan.lemon@gmail.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox