* [PATCH net 1/3] dpaa2-ptp: fix support for PTP_EXTTS_REQUEST2 ioctl
2026-10-06 13:34 [PATCH net 0/3] net: freescale: fix PTP_EXTTS_REQUEST2 for QorIQ 1588 Vincent Jardin via B4 Relay
@ 2026-10-06 13:34 ` Vincent Jardin via B4 Relay
2026-10-07 23:16 ` netdev-bot+sashiko
2026-10-06 13:34 ` [PATCH net 2/3] net: enetc: " Vincent Jardin via B4 Relay
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Vincent Jardin via B4 Relay @ 2026-10-06 13:34 UTC (permalink / raw)
To: Yangbo Lu, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Richard Cochran, Jacob Keller,
Kory Maincent, Claudiu Manoil, Vladimir Oltean, Wei Fang,
Clark Wang
Cc: netdev, linux-kernel, imx, Ioana Ciornei, Vincent Jardin
From: Vincent Jardin <vjardin@free.fr>
Commit 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to
ptp_clock_info") moved the validation of the external timestamp request
flags into the PTP core. A driver that does not set
.supported_extts_flags still accepts the legacy PTP_EXTTS_REQUEST ioctl,
but every PTP_EXTTS_REQUEST2 request is rejected with -EOPNOTSUPP
On an LX2160A board, linuxptp ts2phc arms the external timestamp channel
of the 1588 timer with PTP_EXTTS_REQUEST2, gets -EOPNOTSUPP and exits,
so the PHC cannot be disciplined from an external 1PPS.
ptp_qoriq_init() programs TMR_CTRL with ETEP1 and ETEP2 cleared, so the
timer timestamps the rising edge of its external trigger inputs. Declare
that, with PTP_STRICT_FLAGS, so that a falling edge request is rejected
instead of being timestamped on the rising edge.
Fixes: 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to ptp_clock_info")
Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c
index 4497e3c0456d..ac2b873dcf8e 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c
@@ -78,6 +78,7 @@ static const struct ptp_clock_info dpaa2_ptp_caps = {
.n_per_out = 3,
.n_pins = 0,
.pps = 1,
+ .supported_extts_flags = PTP_RISING_EDGE | PTP_STRICT_FLAGS,
.adjfine = ptp_qoriq_adjfine,
.adjtime = ptp_qoriq_adjtime,
.gettime64 = ptp_qoriq_gettime,
--
2.43.0
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH net 1/3] dpaa2-ptp: fix support for PTP_EXTTS_REQUEST2 ioctl
2026-10-06 13:34 ` [PATCH net 1/3] dpaa2-ptp: fix support for PTP_EXTTS_REQUEST2 ioctl Vincent Jardin via B4 Relay
@ 2026-10-07 23:16 ` netdev-bot+sashiko
0 siblings, 0 replies; 9+ messages in thread
From: netdev-bot+sashiko @ 2026-10-07 23:16 UTC (permalink / raw)
To: vjardin
Cc: yangbo.lu, andrew+netdev, davem, edumazet, kuba, pabeni,
richardcochran, jacob.e.keller, kory.maincent, claudiu.manoil,
vladimir.oltean, wei.fang, xiaoning.wang, netdev, linux-kernel,
imx, ioana.ciornei
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] Declaring PTP_STRICT_FLAGS in dpaa2_ptp_caps also makes the
legacy PTP_EXTTS_REQUEST (v1) ioctl strict on DPAA2, and the commit…
--
dpaa2-ptp: fix support for PTP_EXTTS_REQUEST2 ioctl
This patch sets .supported_extts_flags on dpaa2_ptp_caps to
PTP_RISING_EDGE | PTP_STRICT_FLAGS. With that set, the PTP core accepts
PTP_EXTTS_REQUEST2 on DPAA2 and rejects requests for the falling edge,
which the timer does not support.
> diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c
> index 4497e3c0456d1..ac2b873dcf8e6 100644
> --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c
> +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c
> @@ -78,6 +78,7 @@ static const struct ptp_clock_info dpaa2_ptp_caps = {
> .n_per_out = 3,
> .n_pins = 0,
> .pps = 1,
> + .supported_extts_flags = PTP_RISING_EDGE | PTP_STRICT_FLAGS,
[Severity: Medium]
Does declaring PTP_STRICT_FLAGS here also make the legacy
PTP_EXTTS_REQUEST ioctl strict on DPAA2?
In ptp_extts_request() in drivers/ptp/ptp_chardev.c, v1 requests are
only masked to PTP_EXTTS_V1_VALID_FLAGS. They then go through the same
supported-flags check as v2:
} else {
req.extts.flags &= PTP_EXTTS_V1_VALID_FLAGS;
memset(req.extts.rsv, 0, sizeof(req.extts.rsv));
}
[ ... ]
if (!(supported_extts_flags & PTP_STRICT_FLAGS))
supported_extts_flags |= PTP_EXTTS_EDGES;
/* Reject unsupported flags */
if (req.extts.flags & ~supported_extts_flags)
return -EOPNOTSUPP;
Before this patch, supported_extts_flags was 0. The effective mask was
therefore ENABLE | RISING | FALLING, and v1 accepted any edge
combination as a hint.
After this patch the mask is ENABLE | RISING | STRICT. A v1 request
with PTP_ENABLE_FEATURE | PTP_FALLING_EDGE, or with both edge bits set,
now returns -EOPNOTSUPP before ops->enable() is called.
One in-tree caller hits this. tools/testing/selftests/ptp/testptp.c
run with -e N -E 2 or -E 3 sends the edge through the legacy ioctl:
extts_request.flags = PTP_ENABLE_FEATURE | edge;
if (ioctl(fd, PTP_EXTTS_REQUEST, &extts_request)) {
perror("PTP_EXTTS_REQUEST");
extts = 0;
That used to succeed on DPAA2. Now it fails and skips timestamp
collection.
Commit 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to
ptp_clock_info") said that the edge flags are "merely 'hints' when
using the old PTP_EXTTS_REQUEST ioctl, and are not expected to be
enforced".
The commit message says falling-edge requests should be rejected. It
doesn't say that legacy v1 users are affected too, including the
both-edges hint case.
Should the commit message mention this change for PTP_EXTTS_REQUEST
users? The later patches in the series apply the same change to ENETC
and generic QorIQ PTP, so it would reach those devices as well.
> .adjfine = ptp_qoriq_adjfine,
> .adjtime = ptp_qoriq_adjtime,
> .gettime64 = ptp_qoriq_gettime,
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261006-for-upstream-qoriq-ptp-extts-flags-v1-0-b4a161b92832%40free.fr
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net 2/3] net: enetc: fix support for PTP_EXTTS_REQUEST2 ioctl
2026-10-06 13:34 [PATCH net 0/3] net: freescale: fix PTP_EXTTS_REQUEST2 for QorIQ 1588 Vincent Jardin via B4 Relay
2026-10-06 13:34 ` [PATCH net 1/3] dpaa2-ptp: fix support for PTP_EXTTS_REQUEST2 ioctl Vincent Jardin via B4 Relay
@ 2026-10-06 13:34 ` Vincent Jardin via B4 Relay
2026-10-07 23:16 ` netdev-bot+sashiko
2026-10-06 13:34 ` [PATCH net 3/3] ptp: qoriq: " Vincent Jardin via B4 Relay
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Vincent Jardin via B4 Relay @ 2026-10-06 13:34 UTC (permalink / raw)
To: Yangbo Lu, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Richard Cochran, Jacob Keller,
Kory Maincent, Claudiu Manoil, Vladimir Oltean, Wei Fang,
Clark Wang
Cc: netdev, linux-kernel, imx, Ioana Ciornei, Vincent Jardin
From: Vincent Jardin <vjardin@free.fr>
Commit 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to
ptp_clock_info") moved the validation of the external timestamp request
flags into the PTP core. A driver that does not set
.supported_extts_flags still accepts the legacy PTP_EXTTS_REQUEST ioctl,
but every PTP_EXTTS_REQUEST2 request is rejected with -EOPNOTSUPP
The ENETC timer is the QorIQ 1588 timer, set up by ptp_qoriq_init(), which
programs TMR_CTRL with ETEP1 and ETEP2 cleared, so it timestamps the
rising edge of its external trigger inputs. Declare that, with
PTP_STRICT_FLAGS, so that a falling edge request is rejected instead of
being timestamped on the rising edge.
Fixes: 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to ptp_clock_info")
Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
drivers/net/ethernet/freescale/enetc/enetc_ptp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_ptp.c b/drivers/net/ethernet/freescale/enetc/enetc_ptp.c
index 162cbc801730..5ffee882d624 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_ptp.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_ptp.c
@@ -16,6 +16,7 @@ static struct ptp_clock_info enetc_ptp_caps = {
.n_per_out = 0,
.n_pins = 0,
.pps = 1,
+ .supported_extts_flags = PTP_RISING_EDGE | PTP_STRICT_FLAGS,
.adjfine = ptp_qoriq_adjfine,
.adjtime = ptp_qoriq_adjtime,
.gettime64 = ptp_qoriq_gettime,
--
2.43.0
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH net 2/3] net: enetc: fix support for PTP_EXTTS_REQUEST2 ioctl
2026-10-06 13:34 ` [PATCH net 2/3] net: enetc: " Vincent Jardin via B4 Relay
@ 2026-10-07 23:16 ` netdev-bot+sashiko
0 siblings, 0 replies; 9+ messages in thread
From: netdev-bot+sashiko @ 2026-10-07 23:16 UTC (permalink / raw)
To: vjardin
Cc: yangbo.lu, andrew+netdev, davem, edumazet, kuba, pabeni,
richardcochran, jacob.e.keller, kory.maincent, claudiu.manoil,
vladimir.oltean, wei.fang, xiaoning.wang, netdev, linux-kernel,
imx, ioana.ciornei
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The concern: drivers/ptp/ptp_qoriq.c `ptp_qoriq_caps` uses the
same QorIQ 1588 timer, the same `ptp_qoriq_enable()` and the same…
--
net: enetc: fix support for PTP_EXTTS_REQUEST2 ioctl
This patch sets .supported_extts_flags in enetc_ptp_caps to
PTP_RISING_EDGE | PTP_STRICT_FLAGS. Without it, the PTP core rejects
PTP_EXTTS_REQUEST2 requests with -EOPNOTSUPP. The QorIQ 1588 timer that
ptp_qoriq_init() sets up only timestamps the rising edge.
> diff --git a/drivers/net/ethernet/freescale/enetc/enetc_ptp.c b/drivers/net/ethernet/freescale/enetc/enetc_ptp.c
> index 162cbc8017304..5ffee882d6241 100644
> --- a/drivers/net/ethernet/freescale/enetc/enetc_ptp.c
> +++ b/drivers/net/ethernet/freescale/enetc/enetc_ptp.c
> @@ -16,6 +16,7 @@ static struct ptp_clock_info enetc_ptp_caps = {
> .n_per_out = 0,
> .n_pins = 0,
> .pps = 1,
> + .supported_extts_flags = PTP_RISING_EDGE | PTP_STRICT_FLAGS,
[Severity: Low]
Does ptp_qoriq_caps in drivers/ptp/ptp_qoriq.c need the same change?
It uses the same QorIQ 1588 timer, ptp_qoriq_enable() and ptp_qoriq_init()
as ENETC, but this patch leaves its .supported_extts_flags unset.
ptp_extts_request() in drivers/ptp/ptp_chardev.c always adds
PTP_STRICT_FLAGS to PTP_EXTTS_REQUEST2 requests. On eTSEC/FMan clocks
registered through ptp_qoriq_probe(), would every PTP_EXTTS_REQUEST2 still
return -EOPNOTSUPP?
err = ptp_qoriq_init(ptp_qoriq, base, &ptp_qoriq_caps);
This looks resolved later in the same series. The earlier patch
"dpaa2-ptp: fix support for PTP_EXTTS_REQUEST2 ioctl" covers dpaa2_ptp_caps.
The later patch "ptp: qoriq: fix support for PTP_EXTTS_REQUEST2 ioctl" adds
the same line to ptp_qoriq_caps.
ptp_qoriq_init() has three callers: enetc, dpaa2-ptp and ptp_qoriq. At the
end of the series, all three caps tables declare
PTP_RISING_EDGE | PTP_STRICT_FLAGS. Mentioning that in the commit message
might be useful, since this patch only fixes ENETC.
> .adjfine = ptp_qoriq_adjfine,
> .adjtime = ptp_qoriq_adjtime,
> .gettime64 = ptp_qoriq_gettime,
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261006-for-upstream-qoriq-ptp-extts-flags-v1-0-b4a161b92832%40free.fr
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net 3/3] ptp: qoriq: fix support for PTP_EXTTS_REQUEST2 ioctl
2026-10-06 13:34 [PATCH net 0/3] net: freescale: fix PTP_EXTTS_REQUEST2 for QorIQ 1588 Vincent Jardin via B4 Relay
2026-10-06 13:34 ` [PATCH net 1/3] dpaa2-ptp: fix support for PTP_EXTTS_REQUEST2 ioctl Vincent Jardin via B4 Relay
2026-10-06 13:34 ` [PATCH net 2/3] net: enetc: " Vincent Jardin via B4 Relay
@ 2026-10-06 13:34 ` Vincent Jardin via B4 Relay
2026-10-07 23:16 ` netdev-bot+sashiko
2026-10-06 22:40 ` [PATCH net 0/3] net: freescale: fix PTP_EXTTS_REQUEST2 for QorIQ 1588 Jacob Keller
2026-10-07 11:22 ` Kory Maincent
4 siblings, 1 reply; 9+ messages in thread
From: Vincent Jardin via B4 Relay @ 2026-10-06 13:34 UTC (permalink / raw)
To: Yangbo Lu, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Richard Cochran, Jacob Keller,
Kory Maincent, Claudiu Manoil, Vladimir Oltean, Wei Fang,
Clark Wang
Cc: netdev, linux-kernel, imx, Ioana Ciornei, Vincent Jardin
From: Vincent Jardin <vjardin@free.fr>
Commit 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to
ptp_clock_info") moved the validation of the external timestamp request
flags into the PTP core. A driver that does not set
.supported_extts_flags still accepts the legacy PTP_EXTTS_REQUEST ioctl,
but every PTP_EXTTS_REQUEST2 request is rejected with -EOPNOTSUPP, since
the core always adds PTP_STRICT_FLAGS to it
ptp_qoriq_init() programs TMR_CTRL with ETEP1 and ETEP2 cleared, so the
timer timestamps the rising edge of its external trigger inputs. Declare
that, with PTP_STRICT_FLAGS, so that a falling edge request is rejected
instead of being timestamped on the rising edge.
Fixes: 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to ptp_clock_info")
Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
drivers/ptp/ptp_qoriq.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/ptp/ptp_qoriq.c b/drivers/ptp/ptp_qoriq.c
index 76272e5ac5b8..bcd29104effe 100644
--- a/drivers/ptp/ptp_qoriq.c
+++ b/drivers/ptp/ptp_qoriq.c
@@ -355,6 +355,7 @@ static const struct ptp_clock_info ptp_qoriq_caps = {
.n_per_out = 0,
.n_pins = 0,
.pps = 1,
+ .supported_extts_flags = PTP_RISING_EDGE | PTP_STRICT_FLAGS,
.adjfine = ptp_qoriq_adjfine,
.adjtime = ptp_qoriq_adjtime,
.gettime64 = ptp_qoriq_gettime,
--
2.43.0
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH net 3/3] ptp: qoriq: fix support for PTP_EXTTS_REQUEST2 ioctl
2026-10-06 13:34 ` [PATCH net 3/3] ptp: qoriq: " Vincent Jardin via B4 Relay
@ 2026-10-07 23:16 ` netdev-bot+sashiko
0 siblings, 0 replies; 9+ messages in thread
From: netdev-bot+sashiko @ 2026-10-07 23:16 UTC (permalink / raw)
To: vjardin
Cc: yangbo.lu, andrew+netdev, davem, edumazet, kuba, pabeni,
richardcochran, jacob.e.keller, kory.maincent, claudiu.manoil,
vladimir.oltean, wei.fang, xiaoning.wang, netdev, linux-kernel,
imx, ioana.ciornei
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] This patch sets `.supported_extts_flags = PTP_RISING_EDGE |
PTP_STRICT_FLAGS` in `ptp_qoriq_caps` (drivers/ptp/ptp_qoriq.c).
--
ptp: qoriq: fix support for PTP_EXTTS_REQUEST2 ioctl
The patch sets .supported_extts_flags in ptp_qoriq_caps to
PTP_RISING_EDGE | PTP_STRICT_FLAGS. As a result, PTP_EXTTS_REQUEST2 requests
are no longer rejected with -EOPNOTSUPP by the PTP core. It also makes the
core reject falling edge requests, which the hardware does not support.
> diff --git a/drivers/ptp/ptp_qoriq.c b/drivers/ptp/ptp_qoriq.c
> index 76272e5ac5b85..bcd29104effe7 100644
> --- a/drivers/ptp/ptp_qoriq.c
> +++ b/drivers/ptp/ptp_qoriq.c
> @@ -355,6 +355,7 @@ static const struct ptp_clock_info ptp_qoriq_caps = {
> .n_per_out = 0,
> .n_pins = 0,
> .pps = 1,
> + .supported_extts_flags = PTP_RISING_EDGE | PTP_STRICT_FLAGS,
[Severity: Low]
Does this also change the behaviour of the legacy PTP_EXTTS_REQUEST ioctl
on qoriq clocks? The commit message doesn't mention it.
For the legacy ioctl, ptp_extts_request() in drivers/ptp/ptp_chardev.c
masks the flags to the V1 set, which still includes PTP_FALLING_EDGE. It
never adds PTP_STRICT_FLAGS:
} else {
req.extts.flags &= PTP_EXTTS_V1_VALID_FLAGS;
memset(req.extts.rsv, 0, sizeof(req.extts.rsv));
}
Whether the edge bits are treated as hints depends only on what the driver
declares, not on which ioctl was used:
if (!(supported_extts_flags & PTP_STRICT_FLAGS))
supported_extts_flags |= PTP_EXTTS_EDGES;
/* Reject unsupported flags */
if (req.extts.flags & ~supported_extts_flags)
return -EOPNOTSUPP;
Before this patch, supported_extts_flags was 0. Legacy requests with
PTP_FALLING_EDGE, or with PTP_RISING_EDGE | PTP_FALLING_EDGE to mean either
edge, were accepted and timestamped on the rising edge.
With this patch, those same legacy requests return -EOPNOTSUPP. For
example, testptp -e N -E 2 or -E 3 in tools/testing/selftests/ptp issues
PTP_EXTTS_REQUEST with PTP_FALLING_EDGE set. That worked on qoriq before
this patch and fails after it.
The rejection itself looks consistent with how the core treats strict
drivers. It also matches dpaa2-ptp and enetc_ptp, which use the same flag
set.
However, the subject and first paragraph describe a PTP_EXTTS_REQUEST2-only
fix, and present the legacy ioctl as the path that already works:
A driver that does not set
.supported_extts_flags still accepts the legacy PTP_EXTTS_REQUEST ioctl,
but every PTP_EXTTS_REQUEST2 request is rejected with -EOPNOTSUPP
The last paragraph says "a falling edge request is rejected", but it doesn't
say this also applies to legacy PTP_EXTTS_REQUEST users. It also doesn't
mention the rising plus falling "either edge" case.
The Fixes: tag makes this a likely stable backport. Could the commit message
say explicitly that legacy PTP_EXTTS_REQUEST callers asking for a falling
edge or both edges will now get -EOPNOTSUPP?
> .adjfine = ptp_qoriq_adjfine,
> .adjtime = ptp_qoriq_adjtime,
> .gettime64 = ptp_qoriq_gettime,
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261006-for-upstream-qoriq-ptp-extts-flags-v1-0-b4a161b92832%40free.fr
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH net 0/3] net: freescale: fix PTP_EXTTS_REQUEST2 for QorIQ 1588
2026-10-06 13:34 [PATCH net 0/3] net: freescale: fix PTP_EXTTS_REQUEST2 for QorIQ 1588 Vincent Jardin via B4 Relay
` (2 preceding siblings ...)
2026-10-06 13:34 ` [PATCH net 3/3] ptp: qoriq: " Vincent Jardin via B4 Relay
@ 2026-10-06 22:40 ` Jacob Keller
2026-10-07 11:22 ` Kory Maincent
4 siblings, 0 replies; 9+ messages in thread
From: Jacob Keller @ 2026-10-06 22:40 UTC (permalink / raw)
To: vjardin, Yangbo Lu, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Richard Cochran, Kory Maincent,
Claudiu Manoil, Vladimir Oltean, Wei Fang, Clark Wang
Cc: netdev, linux-kernel, imx, Ioana Ciornei
On 10/6/2026 6:34 AM, Vincent Jardin via B4 Relay wrote:
> Since commit 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags
> to ptp_clock_info"), the PTP core rejects every PTP_EXTTS_REQUEST2
> request for a driver that does not set .supported_extts_flags. The three
> users of the QorIQ 1588 (dpaa2-ptp, enetc, ptp_qoriq),
> so linuxptp ts2phc cannot arm their external timestamp inputs.
>
> The timer timestamps the rising edge only, since ptp_qoriq_init() clears
> ETEP1 and ETEP2. Each patch declares PTP_RISING_EDGE | PTP_STRICT_FLAGS
> for one driver.
>
> Patch 1 fixes the failure seen on an LX2160A board.
> Patches 2 and 3 are build-tested/code review only.
>
Yep. This change was intentional so that PTP_EXTTS_REQUEST2 would be
rejected until the drivers were updated to specifically indicated which
set of flags they actually supported.
Thanks for verifying which edge these drivers timestamp.
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> Signed-off-by: Vincent Jardin <vjardin@free.fr>
> ---
> Vincent Jardin (3):
> dpaa2-ptp: fix support for PTP_EXTTS_REQUEST2 ioctl
> net: enetc: fix support for PTP_EXTTS_REQUEST2 ioctl
> ptp: qoriq: fix support for PTP_EXTTS_REQUEST2 ioctl
>
> drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c | 1 +
> drivers/net/ethernet/freescale/enetc/enetc_ptp.c | 1 +
> drivers/ptp/ptp_qoriq.c | 1 +
> 3 files changed, 3 insertions(+)
> ---
> base-commit: d5a007b9b457c915ab1a53227e8939e4018aa97a
> change-id: 20261006-for-upstream-qoriq-ptp-extts-flags-1c6fd731d66f
>
> Best regards,
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH net 0/3] net: freescale: fix PTP_EXTTS_REQUEST2 for QorIQ 1588
2026-10-06 13:34 [PATCH net 0/3] net: freescale: fix PTP_EXTTS_REQUEST2 for QorIQ 1588 Vincent Jardin via B4 Relay
` (3 preceding siblings ...)
2026-10-06 22:40 ` [PATCH net 0/3] net: freescale: fix PTP_EXTTS_REQUEST2 for QorIQ 1588 Jacob Keller
@ 2026-10-07 11:22 ` Kory Maincent
4 siblings, 0 replies; 9+ messages in thread
From: Kory Maincent @ 2026-10-07 11:22 UTC (permalink / raw)
To: vjardin, Yangbo Lu, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Richard Cochran, Jacob Keller,
Claudiu Manoil, Vladimir Oltean, Wei Fang, Clark Wang
Cc: netdev, linux-kernel, imx, Ioana Ciornei
On 10/6/26 15:34, Vincent Jardin via B4 Relay wrote:
> Since commit 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags
> to ptp_clock_info"), the PTP core rejects every PTP_EXTTS_REQUEST2
> request for a driver that does not set .supported_extts_flags. The three
> users of the QorIQ 1588 (dpaa2-ptp, enetc, ptp_qoriq),
> so linuxptp ts2phc cannot arm their external timestamp inputs.
>
> The timer timestamps the rising edge only, since ptp_qoriq_init() clears
> ETEP1 and ETEP2. Each patch declares PTP_RISING_EDGE | PTP_STRICT_FLAGS
> for one driver.
>
> Patch 1 fixes the failure seen on an LX2160A board.
> Patches 2 and 3 are build-tested/code review only.
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Thank you!
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
text:
Message-ID: <a259892d-1b6b-4caa-82d3-ba24efd5a409@bootlin.com>
Date: Wed, 7 Oct 2026 13:22:49 +0200
MIME-Version: 1.0
User-Agent: Betterbird (Linux)
Bcc: kory.maincent@bootlin.com
Subject: Re: [PATCH net 0/3] net: freescale: fix PTP_EXTTS_REQUEST2 for QorIQ
1588
To: vjardin@free.fr, Yangbo Lu <yangbo.lu@nxp.com>,
Andrew Lunn <andrew+netdev@lunn.ch>, "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>,
Jacob Keller <jacob.e.keller@intel.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>, Wei Fang <wei.fang@nxp.com>,
Clark Wang <xiaoning.wang@nxp.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
imx@lists.linux.dev, Ioana Ciornei <ioana.ciornei@nxp.com>
References: <20261006-for-upstream-qoriq-ptp-extts-flags-v1-0-b4a161b92832@free.fr>
From: Kory Maincent <kory.maincent@bootlin.com>
Content-Language: en-US
In-Reply-To: <20261006-for-upstream-qoriq-ptp-extts-flags-v1-0-b4a161b92832@free.fr>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
On 10/6/26 15:34, Vincent Jardin via B4 Relay wrote:
> Since commit 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags
> to ptp_clock_info"), the PTP core rejects every PTP_EXTTS_REQUEST2
> request for a driver that does not set .supported_extts_flags. The three
> users of the QorIQ 1588 (dpaa2-ptp, enetc, ptp_qoriq),
> so linuxptp ts2phc cannot arm their external timestamp inputs.
>
> The timer timestamps the rising edge only, since ptp_qoriq_init() clears
> ETEP1 and ETEP2. Each patch declares PTP_RISING_EDGE | PTP_STRICT_FLAGS
> for one driver.
>
> Patch 1 fixes the failure seen on an LX2160A board.
> Patches 2 and 3 are build-tested/code review only.
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Thank you!
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
text:
Return-Path: <netdev+bounces-342316-kory.maincent=bootlin.com@vger.kernel.org>
Delivered-To: kory.maincent@bootlin.com
Received: from mail.galae.net ([172.22.1.253])
by 9e7fea892943 with LMTP
id UHMYGtM3xmrHxw0AtaWaaQ
(envelope-from <netdev+bounces-342316-kory.maincent=bootlin.com@vger.kernel.org>)
for <kory.maincent@bootlin.com>; Wed, 07 Oct 2026 14:15:15 +0200
X-Original-To: kory.maincent@bootlin.com
Received: from smtpin-01.galae.net (smtpin-01.galae.net [51.159.2.148])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
(No client certificate requested)
by mail.galae.net (Postcow) with ESMTPS id 01B0911D50173
for <kory.maincent@bootlin.com>; Wed, 7 Oct 2026 14:15:10 +0200 (CEST)
Authentication-Results: mail.galae.net;
dkim=pass header.d=bootlin.com header.s=dkim header.b=BX2s35zm;
arc=pass ("subspace.kernel.org:s=arc-20240116:i=1");
dmarc=pass (policy=reject) header.from=bootlin.com;
spf=pass (mail.galae.net: domain of "netdev+bounces-342316-kory.maincent=bootlin.com@vger.kernel.org" designates 172.234.253.10 as permitted sender) smtp.mailfrom="netdev+bounces-342316-kory.maincent=bootlin.com@vger.kernel.org"
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com;
s=dkim; t=1791375311;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:list-id:
list-unsubscribe:list-subscribe:dkim-signature;
bh=PvKbS35WCOo741y4COP9Dw8++nPpWhukTi3m3k0URa4=;
b=0yhkHEgiICxNRjk62IuxxGjduWVV1wN4wVmRxRNSohv5Tm63DkwFV6mLaZmimr8/NnRP3+
9la/FkwEEVyKpi91bVAhTiFutd/7O7yWZ7MuPCC2ZiHJNuJlMn60x/ahU0zM+757o0Oymt
a2ltDrPBJpYtAwpy0mMStZXV+pOBzRvk6XRdSzrLDBTobSyJYaqJHANkEDfM170w4c+hBR
CpOeBmV5Xs5s5Bl/kRuOrguDZxSZ62RvUm1IPHEb650i+RcwH9f4o70uxKwqjj6PJRsRX4
GBmasQBpvbwSQvFlSny0OlQSAS534krbzSLbmgn3AZs3Qp9qC5u3ox9HPuI3sw==
ARC-Authentication-Results: i=2;
mail.galae.net;
dkim=pass header.d=bootlin.com header.s=dkim header.b=BX2s35zm;
arc=pass ("subspace.kernel.org:s=arc-20240116:i=1");
dmarc=pass (policy=reject) header.from=bootlin.com;
spf=pass (mail.galae.net: domain of "netdev+bounces-342316-kory.maincent=bootlin.com@vger.kernel.org" designates 172.234.253.10 as permitted sender) smtp.mailfrom="netdev+bounces-342316-kory.maincent=bootlin.com@vger.kernel.org"
ARC-Seal: i=2; s=dkim; d=bootlin.com; t=1791375311; a=rsa-sha256; cv=pass;
b=DeCJhqJTpIlMrLrjUHS+c9rAees+Ku6qXSBBl7kjqZw9oWLDbdFe1wEDJSamfAX+HK13tr
r61x0ZUJTVB4NFoRkcTUp1MLnL1FYwQ5g+t6W9GcvVQBmxMPOErpI6QhO8ZOklbLDvf0EZ
ICAf0HPvIfk5QJQ75C9suU8f4MFSlZubV4UrTLeHD70Xc5N0Hx2F+8HJ8nkdV/DMgHOqPa
hAw/eVoYE1Y+RmUM1lI04+Le14rkkbqomeykMUWVviKsPu0XFu+U6Dh3iF8gKqEEVyc0gZ
m+e3q7GpivRcAF5Df7apnn0efZzmUbRKgj+EKJPBt25W6AzRZsuXeSKOfw3iow==
Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by smtpin-01.galae.net (Postfix) with ESMTPS id 5F46C340C98
for <kory.maincent@bootlin.com>; Wed, 7 Oct 2026 12:15:10 +0000 (UTC)
Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
by sea.lore.kernel.org (Postfix) with ESMTP id 32EB863063
for <kory.maincent@bootlin.com>; Wed, 7 Oct 2026 11:30:49 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 316384908DA;
Wed, 7 Oct 2026 11:23:28 +0000 (UTC)
X-Original-To: netdev@vger.kernel.org
Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C68CF48D864
for <netdev@vger.kernel.org>; Wed, 7 Oct 2026 11:23:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1791372205; cv=none; b=rxSepAA7qUBkIoBbeR3yfPw5CGNxeyTi4VaHLMb/luddLdifsv+NVMBXRj1BrZeTPV8UG8iuikbimTP8VpgZJSSV5jUzsa0Gw2YRtaPGC81aWsnfmYhvEcCK1zKpYu5pz4vrZ7MhE8x9dk5/EcmOBKER9pPVm6qh7imhUyX9YVs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1791372205; c=relaxed/simple;
bh=h8d/UDxIiosp7oKyeZyf8gbt0wo0wMFoYO35PxF2CZg=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=pGNWxW2ydr/TsctW+3e5qKMSINpTJ6qFNnVYXe0bd0Zduu+AdTm2JdiZWFWWvzIkB2+s/xeKfXjU1ONio6bqRhuNLU969dVLEvkLLXcXRPphbSGXEsKnSqApSKQXUPOhL1ALs+DqJrlFSR/E7yS/TXyWv6GiQTIUBTjfacJ2ftY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=BX2s35zm; arc=none smtp.client-ip=185.246.84.56
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com
Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233])
by smtpout-02.galae.net (Postfix) with ESMTPS id CE30C1A1152;
Wed, 7 Oct 2026 11:23:01 +0000 (UTC)
Received: from mail.galae.net (mail.galae.net [212.83.136.155])
by smtpout-01.galae.net (Postfix) with ESMTPS id 91A8E6074B;
Wed, 7 Oct 2026 11:23:01 +0000 (UTC)
Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 90EDF11D5011B;
Wed, 7 Oct 2026 13:22:53 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim;
t=1791372180; h=from:subject:date:message-id:to:cc:mime-version:content-type:
content-transfer-encoding:content-language:in-reply-to:references;
bh=PvKbS35WCOo741y4COP9Dw8++nPpWhukTi3m3k0URa4=;
b=BX2s35zmkef7Sd0hozR3MEerPUh9PNugMMxhrJSYacDtHw6B6CaRddr7h/Vj4ELoYsW2PX
dNfWX5KT0tPIYItO/7rQaJOqTGzOHCcAxzfznmT2WeF8PmBUBNiGlDXCjgSp7H8kba0se7
bAX0oUvspDTjjIc3zY6v2GBf1PMzIuzoWI/mn7RCgtg7efTOgMYjJDvHqIXA4PLsDrdOnf
bL/bxb7yDYjl0Gyz4KPA0uLBvD0RfrprksbARuYMz+KXXL+gvZBBDbedjC3D2MHsRrsyL1
QcuG5IvKuwJPX2GbuKjw74wU7rms2yhkwyB5NYbReYAdv1Lq9dJ9/ugjJqNvNw==
Message-ID: <a259892d-1b6b-4caa-82d3-ba24efd5a409@bootlin.com>
Date: Wed, 7 Oct 2026 13:22:49 +0200
Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
List-Id: <netdev.vger.kernel.org>
List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
User-Agent: Betterbird (Linux)
Subject: Re: [PATCH net 0/3] net: freescale: fix PTP_EXTTS_REQUEST2 for QorIQ
1588
To: vjardin@free.fr, Yangbo Lu <yangbo.lu@nxp.com>,
Andrew Lunn <andrew+netdev@lunn.ch>, "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>,
Jacob Keller <jacob.e.keller@intel.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>, Wei Fang <wei.fang@nxp.com>,
Clark Wang <xiaoning.wang@nxp.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
imx@lists.linux.dev, Ioana Ciornei <ioana.ciornei@nxp.com>
References: <20261006-for-upstream-qoriq-ptp-extts-flags-v1-0-b4a161b92832@free.fr>
From: Kory Maincent <kory.maincent@bootlin.com>
Content-Language: en-US
In-Reply-To: <20261006-for-upstream-qoriq-ptp-extts-flags-v1-0-b4a161b92832@free.fr>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Last-TLS-Session-Version: TLSv1.3
X-Last-TLS-Session-Version: TLSv1.3
X-Spamd-Result: default: False [-2000.46 / 30.00];
MAILCOW_WHITE(-1998.00)[];
SUSPICIOUS_RECIPS(1.50)[];
IP_REPUTATION_HAM(-1.41)[asn: 63949(-0.40), country: SG(-0.01), ip: 172.234.253.10(-1.00)];
ARC_ALLOW(-1.00)[subspace.kernel.org:s=arc-20240116:i=1];
DMARC_POLICY_ALLOW(-0.50)[bootlin.com,reject];
BAYES_HAM(-0.39)[71.86%];
R_SPF_ALLOW(-0.20)[+ip4:172.234.253.10:c];
R_DKIM_ALLOW(-0.20)[bootlin.com:s=dkim];
MAILLIST(-0.15)[generic];
MIME_GOOD(-0.10)[text/plain];
XM_UA_NO_VERSION(0.01)[];
HAS_LIST_UNSUB(-0.01)[];
MX_GOOD(-0.01)[];
RECEIVED_HELO_LOCALHOST(0.00)[];
FREEMAIL_TO(0.00)[free.fr,nxp.com,lunn.ch,davemloft.net,kernel.org,redhat.com,gmail.com,intel.com];
MAILCOW_DOMAIN_HEADER_FROM(0.00)[bootlin.com];
RCPT_COUNT_TWELVE(0.00)[17];
TO_DN_SOME(0.00)[];
RCPT_MAILCOW_DOMAIN(0.00)[bootlin.com];
MIME_TRACE(0.00)[0:+];
BCC(0.00)[];
FORGED_SENDER_MAILLIST(0.00)[];
URIBL_BLOCKED(0.00)[bootlin.com:mid,bootlin.com:url,bootlin.com:email,bootlin.com:dkim,sea.lore.kernel.org:helo,sea.lore.kernel.org:rdns];
RCVD_TLS_LAST(0.00)[];
RBL_SENDERSCORE_REPUT_BLOCKED(0.00)[172.234.253.10:from];
ARC_SIGNED(0.00)[bootlin.com:s=dkim:i=2];
DNSWL_BLOCKED(0.00)[212.83.136.155:received,185.246.84.56:received,212.83.139.233:received,100.90.174.1:received,172.234.253.10:from];
NEURAL_HAM(-0.00)[-1.000];
MID_RHS_MATCH_FROM(0.00)[];
PRECEDENCE_BULK(0.00)[];
FROM_HAS_DN(0.00)[];
FROM_NEQ_ENVFROM(0.00)[kory.maincent@bootlin.com,netdev@vger.kernel.org];
TAGGED_FROM(0.00)[bounces-342316-kory.maincent=bootlin.com];
DWL_DNSWL_BLOCKED(0.00)[bootlin.com:dkim];
RCVD_VIA_SMTP_AUTH(0.00)[];
DKIM_TRACE(0.00)[bootlin.com:+];
TAGGED_RCPT(0.00)[netdev];
FORGED_RECIPIENTS_MAILLIST(0.00)[];
EXTERNAL_RELAY_AUTHENTICATED(0.00)[];
ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG];
RCVD_COUNT_SEVEN(0.00)[7]
X-Rspamd-Queue-Id: 01B0911D50173
On 10/6/26 15:34, Vincent Jardin via B4 Relay wrote:
> Since commit 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags
> to ptp_clock_info"), the PTP core rejects every PTP_EXTTS_REQUEST2
> request for a driver that does not set .supported_extts_flags. The three
> users of the QorIQ 1588 (dpaa2-ptp, enetc, ptp_qoriq),
> so linuxptp ts2phc cannot arm their external timestamp inputs.
>
> The timer timestamps the rising edge only, since ptp_qoriq_init() clears
> ETEP1 and ETEP2. Each patch declares PTP_RISING_EDGE | PTP_STRICT_FLAGS
> for one driver.
>
> Patch 1 fixes the failure seen on an LX2160A board.
> Patches 2 and 3 are build-tested/code review only.
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Thank you!
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 9+ messages in thread