* [PATCH net 0/3] net: freescale: fix PTP_EXTTS_REQUEST2 for QorIQ 1588
@ 2026-10-06 13:34 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
` (3 more replies)
0 siblings, 4 replies; 8+ 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
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.
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,
--
Vincent Jardin <vjardin@free.fr>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [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
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ 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] 8+ 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
2026-10-06 22:40 ` [PATCH net 0/3] net: freescale: fix PTP_EXTTS_REQUEST2 for QorIQ 1588 Jacob Keller
3 siblings, 1 reply; 8+ 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] 8+ 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
3 siblings, 1 reply; 8+ 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] 8+ 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
3 siblings, 0 replies; 8+ 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] 8+ 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; 8+ 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] 8+ 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; 8+ 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] 8+ 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; 8+ 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] 8+ messages in thread
end of thread, other threads:[~2026-10-07 23:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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-07 23:16 ` netdev-bot+sashiko
2026-10-06 13:34 ` [PATCH net 2/3] net: enetc: " 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
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
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®