mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
Merge branch 'net-freescale-fix-ptp_extts_request2-for-qoriq-1588'
Vincent Jardin via says:
====================
net: freescale: fix PTP_EXTTS_REQUEST2 for QorIQ 1588
Since commit 7c571ac57d ("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 timer (dpaa2-ptp, enetc, ptp_qoriq) do not set
it, 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.
With PTP_STRICT_FLAGS declared, the core checks the edge flags of the
legacy PTP_EXTTS_REQUEST ioctl too: a legacy request for the falling
edge, or for both edges, now fails with -EOPNOTSUPP instead of being
timestamped on the rising edge. Each commit message says so.
Patch 1 fixes the failure seen on an LX2160A board.
Patches 2 and 3 are build-tested/code review only.
====================
Link: https://patch.msgid.link/20261009-for-upstream-qoriq-ptp-extts-flags-v2-0-0f4eeff2295d@free.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
23e687079e
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user