mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolai Buchwitz <nb@tipi-net.de>
To: 5mghybrid@khu.ac.kr
Cc: netdev@vger.kernel.org, "Théo Lebrun" <theo.lebrun@bootlin.com>,
	"Rafal Ozieblo" <rafalo@cadence.com>,
	"Conor Dooley" <conor.dooley@microchip.com>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Richard Cochran" <richardcochran@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 0/4] net: macb: Rework hardware timestamp configuration
Date: Tue, 22 Sep 2026 13:15:18 +0200	[thread overview]
Message-ID: <1130cfbd992c343c4cc32d08b9bad662@tipi-net.de> (raw)
In-Reply-To: <20260922-codex-macb-hwtstamp-submit-v1-0-9d1abaa53296@khu.ac.kr>

Hi Kim

On 22.9.2026 11:10, Kim Wooseok via B4 Relay wrote:
> This started with two problems I found while using PTP hardware
> timestamping on a Raspberry Pi 5. A rejected RX filter could still
> change the TX one-step setting, and the PTPv1 Sync and Delay_Req 
> filters
> returned success without enabling RX timestamps.
> 
> This series reworks gem_set_hwtst() to validate the whole request 
> before
> programming the hardware. It calculates the settings locally, then
> updates the registers and saved configuration under bp->lock. With the
> register writes now in the setter, the two helpers are no longer 
> needed.
> 
> The remaining patches use the existing ALL fallback for the specific
> PTPv1 filters, turn off one-step mode for TX_OFF, and clear SRTSM when
> switching away from a PTPv2 filter. Each change is kept in its own 
> patch.
> 
> I compared the old and new behavior on the Pi 5. When I requested a TX
> mode change together with an invalid RX filter, the patched driver
> rejected the request without changing the saved settings or NCR. I
> also switched from one-step TX and PTPv2 RX to other settings and back.
> Only the relevant bits changed, and restoring the original settings
> restored NCR.
> 
> For the PTPv1 filters, I checked the effect by sending Sync and 
> Delay_Req
> packets over Ethernet. Before the change, the packets arrived without
> hardware timestamps. With the patches, the driver returned ALL and I
> could read the hardware timestamps from the received packets. PTPv2
> multicast reception continued to provide hardware timestamps, and
> selecting NONE disabled timestamping. I ran these tests with the 
> changes
> backported to the Pi's existing Linux 6.18.46 RT kernel.
> 
> On net-next, I built the series with ARM64 allyesconfig and 
> allmodconfig,
> both with W=1. Sparse reported no diagnostics in macb_ptp.c.
> 
> Assisted-by: GPT-6 Astra
> Signed-off-by: Kim Wooseok <5mghybrid@khu.ac.kr>
> ---
> Kim Wooseok (4):
>       net: macb: Preserve timestamp settings on rejected requests
>       net: macb: Enable RX timestamping for specific PTPv1 filters
>       net: macb: Disable one-step mode when TX timestamping is off
>       net: macb: Clear SRTSM outside PTPv2 receive filters
> 
>  drivers/net/ethernet/cadence/macb_ptp.c | 63 
> ++++++++++++---------------------
>  1 file changed, 23 insertions(+), 40 deletions(-)
> ---
> base-commit: 8830e65ed46de41f849eefb8ba227d4852c460f6
> change-id: 20260922-codex-macb-hwtstamp-submit-25ab4a2e6b94
> 
> Best regards,
> --
> Kim Wooseok <5mghybrid@khu.ac.kr>

For the series:

Tested-by: Nicolai Buchwitz <nb@tipi-net.de> # Raspberry Pi CM5 (macb 
rp1 with BCM54210PE)

Regards
Nicolai

      parent reply	other threads:[~2026-09-22 11:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22  9:10 Kim Wooseok via B4 Relay
2026-09-22  9:10 ` [PATCH net-next 1/4] net: macb: Preserve timestamp settings on rejected requests Kim Wooseok via B4 Relay
2026-09-22 10:47   ` Nicolai Buchwitz
2026-09-22 19:01   ` Théo Lebrun
2026-09-22 19:36     ` Théo Lebrun
2026-09-22  9:10 ` [PATCH net-next 2/4] net: macb: Enable RX timestamping for specific PTPv1 filters Kim Wooseok via B4 Relay
2026-09-22 10:47   ` Nicolai Buchwitz
2026-09-22 19:01   ` Théo Lebrun
2026-09-22  9:10 ` [PATCH net-next 3/4] net: macb: Disable one-step mode when TX timestamping is off Kim Wooseok via B4 Relay
2026-09-22 10:47   ` Nicolai Buchwitz
2026-09-22 19:15   ` Théo Lebrun
2026-09-22  9:10 ` [PATCH net-next 4/4] net: macb: Clear SRTSM outside PTPv2 receive filters Kim Wooseok via B4 Relay
2026-09-22 10:48   ` Nicolai Buchwitz
2026-09-22 19:27   ` Théo Lebrun
2026-09-22 11:15 ` Nicolai Buchwitz [this message]

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=1130cfbd992c343c4cc32d08b9bad662@tipi-net.de \
    --to=nb@tipi-net.de \
    --cc=5mghybrid@khu.ac.kr \
    --cc=andrew+netdev@lunn.ch \
    --cc=conor.dooley@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rafalo@cadence.com \
    --cc=richardcochran@gmail.com \
    --cc=theo.lebrun@bootlin.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

all inboxes | Powered by JetHome®