Commit 6138e687c7b6 ("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.
Showing the changes to include/uapi (1 of 1 file). Show all
Unified · Split
| @@ -37,6 +37,9 @@ · 36 unmodified lines | |||
| 37 | 37 | ||
| 38 | /* | 38 | /* |
| 39 | * flag fields valid for the new PTP_EXTTS_REQUEST2 ioctl. | 39 | * 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. | ||
| 40 | */ | 43 | */ |
| 41 | #define PTP_EXTTS_VALID_FLAGS (PTP_ENABLE_FEATURE | \ | 44 | #define PTP_EXTTS_VALID_FLAGS (PTP_ENABLE_FEATURE | \ |
| 42 | PTP_RISING_EDGE | \ | 45 | PTP_RISING_EDGE | \ |