From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.13.80.246 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796205252; b=RC4FasuCF1lkih2u/yLbp/J2HyINBbRt2eNCiCyXPt+g4FGwwAT24RUTAvixhf3h1oOZ wjnN0/ME/Wk679A0+inMO0Xo5VigFJDbxUYPveQj8QqjYK4z/y97oPLKwVlHqpugup8Ha wIPZMX3TZx1BVSboX6hV46keEJGJJsCzFlsWRrvqUg91JhspY4vSfwQh3C5avL7MQSI/m y31CSaXP5kbYrZIBiYUQ5EguPbJW4jNok/durULJQzLRXK7u1jVo0z2qq+RnWMJq6l+Bi AmD/XC3xI8uuPfL5dv25S9Zgr6wXC417IhK6XP5WuhfDC+vskM12ZliQC7hg187ogkQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796205252; h=DMARC-Filter:Received:DKIM-Signature:MIME-Version:Date:From:To:Cc: Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=kJ7LYUeTThuU7cfl0wcfnKhFZOvzAKhoofBj/urunrM=; b=UMX4n0p/B5ptTIDyEK5+9L7RAmeNEOXSLTOGMMf1xpyvKEO15Tuo7PYYydNq5SdONCeg tWRofVfZY3kDD6JpTglqEBaTZlfcT88oS+4Et0KiWmYAhPTwdmdqH6d42JUCvM970TkzH HY2PRowvNqHQu4aWYG+8gLQ/ajfyaCFVKZhhg6tPZd9wxlu7ArczoRcxxm6aAaXG5rBK/ rcFgEOnhrHNeSX9uoUwkhqo+AjDAYlWmbK4Nr2zzSfWwXfI50V4WbeEAOxJQU7zngvwIp QBeeLw3H1wNEaRDs7SxA0jwZyH97mINmO9C9RKTia8hJ4HRFsb4DgodWeSKIahWQkdQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=IQ3Dthv1; arc=none smtp.remote-ip=194.13.80.246 Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66A78606A323 for ; Wed, 2 Dec 2026 09:54:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 66A78606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=IQ3Dthv1 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 08B54A0044; Wed, 02 Dec 2026 10:53:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1796205242; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=kJ7LYUeTThuU7cfl0wcfnKhFZOvzAKhoofBj/urunrM=; b=IQ3Dthv1TaBIp8xde7drmK2XwKaX7njzhawPo2Xy/BruPPCDCyASLp3vbn+kSr0DJTcVMN sa2MjLlQDlVtA5UvSziBGPSrIwdnsfD9Z8ZXny8nmS8hxKZPW+FLRrbDfsQ1tuIC43qJ/A RVlehExEIyy3NgAKW+ksTit/jAHW/H5pC3MK2iupf2L88RKZRQlPmlzqSdxLsMafck3EOt kEziK8HyfWghyrotQw1Nkz6SuHsqUr4/3C5lobSxbakUXZmH0UIvfWt1IOkvHJ4r0LeNza 9aIkUYT0pPVRezIMgRG6bo3l1Z0wt482rIOGPjfs+fuMhUFg/aAIOJ3i5F3zBA== X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Date: Wed, 02 Dec 2026 10:53:59 +0100 From: Nicolai Buchwitz To: James Clark Cc: Florian Fainelli , Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Russell King , Broadcom internal kernel review list , Jonathan Lemon , netdev@vger.kernel.org Subject: Re: [PATCH net 1/2] net: phy: broadcom: fix two-step P2P timestamping In-Reply-To: <5cefa3ba7e356bd2d3fa05cef28e875f4fa6266b.1795772837.git.jjc@jclark.com> References: <5cefa3ba7e356bd2d3fa05cef28e875f4fa6266b.1795772837.git.jjc@jclark.com> Message-ID: <57463bb40dac300d7162ccebe32bc222@tipi-net.de> X-Sender: nb@tipi-net.de Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 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 > --- > 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 # CM4, CM5 Reviewed-by: Nicolai Buchwitz Thanks, Nicolai