From: Nicolai Buchwitz <nb@tipi-net.de>
To: kimwooseok <5mghybrid@khu.ac.kr>
Cc: netdev@vger.kernel.org, theo.lebrun@bootlin.com,
conor.dooley@microchip.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, richardcochran@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net RESEND 2/2] net: macb: Use all-frame timestamping for PTPv1 RX filters
Date: Fri, 11 Sep 2026 11:55:14 +0200 [thread overview]
Message-ID: <185fa72f08b8d7882a48c3ba922c10b8@tipi-net.de> (raw)
In-Reply-To: <178911388671.25348.11008812384009904081.macb-resend-2@khu.ac.kr>
Hi Kimwoo
On 11.9.2026 10:04, kimwooseok wrote:
> gem_set_hwtst() accepts HWTSTAMP_FILTER_PTP_V1_L4_SYNC and
> HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ without changing rx_bd_control from
> TSTAMP_DISABLED. A successful request thus disables receive
> timestamping
> while reporting the requested nonempty filter to userspace.
>
> Handle these two filters through the existing all-frame fallback used
> for HWTSTAMP_FILTER_PTP_V1_L4_EVENT. This enables receive timestamping
> for a superset of the requested packets and returns HWTSTAMP_FILTER_ALL
> to describe the configuration actually selected.
>
> Fixes: ab91f0a9b5f4 ("net: macb: Add hardware PTP support")
> Assisted-by: GPT-6 Astra
> Signed-off-by: kimwooseok <5mghybrid@khu.ac.kr>
> ---
> Resending as plain text because the previous webmail submission
> included
> HTML and quoted and rewrapped the patch. No code changes; the
> Assisted-by
> trailer now names the tool.
>
> 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 51659bb..2ffc46b 100644
> --- a/drivers/net/ethernet/cadence/macb_ptp.c
> +++ b/drivers/net/ethernet/cadence/macb_ptp.c
> @@ -430,10 +430,6 @@ int gem_set_hwtst(struct net_device *netdev,
> switch (tstamp_config->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:
> @@ -448,6 +444,8 @@ int gem_set_hwtst(struct net_device *netdev,
> regval = macb_readl(bp, NCR);
> macb_writel(bp, NCR, (regval | 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@tip-net.de>
Tested-by: Nicolai Buchwitz <nb@tipi-net.de> # Raspberry Pi CM5
Thanks,
Nicolai
next prev parent reply other threads:[~2026-09-11 9:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 8:04 [PATCH net RESEND 0/2] net: macb: Fix PTP timestamp configuration handling kimwooseok
2026-09-11 8:04 ` [PATCH net RESEND 2/2] net: macb: Use all-frame timestamping for PTPv1 RX filters kimwooseok
2026-09-11 9:55 ` Nicolai Buchwitz [this message]
2026-09-11 8:04 ` [PATCH net RESEND 1/2] net: macb: Preserve one-step mode on rejected timestamp requests kimwooseok
2026-09-11 9:51 ` 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=185fa72f08b8d7882a48c3ba922c10b8@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=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