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 2/4] net: macb: Enable RX timestamping for specific PTPv1 filters
Date: Tue, 22 Sep 2026 12:47:29 +0200 [thread overview]
Message-ID: <3510714425aca52a9c6a8b716f8efbd7@tipi-net.de> (raw)
In-Reply-To: <20260922-codex-macb-hwtstamp-submit-v1-2-9d1abaa53296@khu.ac.kr>
On 22.9.2026 11:10, Kim Wooseok via B4 Relay wrote:
> From: Kim Wooseok <5mghybrid@khu.ac.kr>
>
> Selecting a PTPv1 Sync or Delay_Req filter in gem_set_hwtst() returns
> success, but leaves rx_bd_control at its initial value of
> TSTAMP_DISABLED. The requested filter therefore appears to have been
> applied, even though received packets have no hardware timestamps.
>
> The PTPv1 event case already enables timestamping for all frames, so
> use that path for Sync and Delay_Req as well. This enables timestamping
> for both requests and returns HWTSTAMP_FILTER_ALL to tell the caller
> which filter was actually applied.
>
> Fixes: ab91f0a9b5f4 ("net: macb: Add hardware PTP support")
> Assisted-by: GPT-6 Astra
> Signed-off-by: Kim Wooseok <5mghybrid@khu.ac.kr>
> ---
> drivers/net/ethernet/cadence/macb_ptp.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb_ptp.c
> b/drivers/net/ethernet/cadence/macb_ptp.c
> index 4dbb6daa6..b6d17fef4 100644
> --- a/drivers/net/ethernet/cadence/macb_ptp.c
> +++ b/drivers/net/ethernet/cadence/macb_ptp.c
> @@ -419,10 +419,6 @@ int gem_set_hwtst(struct net_device *netdev,
> switch (rx_filter) {
> case HWTSTAMP_FILTER_NONE:
> break;
> - case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
> - break;
> - case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
> - break;
> case HWTSTAMP_FILTER_PTP_V2_EVENT:
> case HWTSTAMP_FILTER_PTP_V2_L2_EVENT:
> case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
> @@ -437,6 +433,8 @@ int gem_set_hwtst(struct net_device *netdev,
> ncr_mask |= MACB_BIT(SRTSM);
> ncr_bits |= MACB_BIT(SRTSM);
> break;
> + case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
> + case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
> case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
> case HWTSTAMP_FILTER_ALL:
> rx_bd_control = TSTAMP_ALL_FRAMES;
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Thanks,
Nicolai
next prev parent reply other threads:[~2026-09-22 10:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 9:10 [PATCH net-next 0/4] net: macb: Rework hardware timestamp configuration 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 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 [this message]
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 ` [PATCH net-next 0/4] net: macb: Rework hardware timestamp configuration 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=3510714425aca52a9c6a8b716f8efbd7@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®