Skip to content

Commit cd87562

Browse files
jacob-kellerkuba-moo
authored andcommitted
ptp: document behavior of PTP_STRICT_FLAGS
Commit 6138e68 ("ptp: Introduce strict checking of external time stamp options.") added the PTP_STRICT_FLAGS to the set of flags supported for the external timestamp request ioctl. It is only supported by PTP_EXTTS_REQUEST2, as it was introduced the introduction of the new ioctls. Further, the kernel has always set this flag for PTP_EXTTS_REQUEST2 regardless of whether or not the user requested the behavior. This effectively means that the flag is not useful for userspace. If the user issues a PTP_EXTTS_REQUEST ioctl, the flag is ignored due to not being supported on the old ioctl. If the user issues a PTP_EXTTS_REQUEST2 ioctl, the flag will be set by the kernel regardless of whether the user set the flag in their structure. Add a comment documenting this behavior in the uAPI header file. Signed-off-by: Jacob Keller <[email protected]> Reviewed-by: Vadim Fedorenko <[email protected]> Acked-by: Richard Cochran <[email protected]> Reviewed-by: Kory Maincent <[email protected]> Tested-by: James Clark <[email protected]> Link: https://patch.msgid.link/20250918-jk-fix-bcm-phy-supported-flags-v1-3-747b60407c9c@intel.com Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 3200fdd commit cd87562

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/uapi/linux/ptp_clock.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737

3838
/*
3939
* flag fields valid for the new PTP_EXTTS_REQUEST2 ioctl.
40+
*
41+
* Note: PTP_STRICT_FLAGS is always enabled by the kernel for
42+
* PTP_EXTTS_REQUEST2 regardless of whether it is set by userspace.
4043
*/
4144
#define PTP_EXTTS_VALID_FLAGS (PTP_ENABLE_FEATURE | \
4245
PTP_RISING_EDGE | \

0 commit comments

Comments
 (0)