Skip to content

Commit 51d58c0

Browse files
jacob-kellerPaolo Abeni
authored andcommitted
renesas: reject PTP_STRICT_FLAGS as unsupported
The ravb_ptp_extts() function checks the flags coming from the PTP_EXTTS_REQUEST ioctl, to ensure that future flags are not accepted on accident. This was updated to 'honor' the PTP_STRICT_FLAGS in commit 6138e68 ("ptp: Introduce strict checking of external time stamp options."). However, the driver does not *actually* validate the flags. I originally fixed this driver to reject future flags in commit 592025a ("renesas: reject unsupported external timestamp flags"). It is still unclear whether this hardware timestamps the rising, falling, or both edges of the input signal. Accepting requests with PTP_STRICT_FLAGS is a bug, as this could lead to users mistakenly assuming a request with PTP_RISING_EDGE actually timestamps the rising edge only. Reject requests with PTP_STRICT_FLAGS (and hence all PTP_EXTTS_REQUEST2 requests) until someone with access to the datasheet or hardware knowledge can confirm the timestamping behavior and update this driver. Fixes: 6138e68 ("ptp: Introduce strict checking of external time stamp options.") Signed-off-by: Jacob Keller <[email protected]> Reviewed-by: Niklas Söderlund <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/20250312-jk-net-fixes-supported-extts-flags-v2-2-ea930ba82459@intel.com Signed-off-by: Paolo Abeni <[email protected]>
1 parent 5eada2a commit 51d58c0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/ethernet/renesas/ravb_ptp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,7 @@ static int ravb_ptp_extts(struct ptp_clock_info *ptp,
179179
/* Reject requests with unsupported flags */
180180
if (req->flags & ~(PTP_ENABLE_FEATURE |
181181
PTP_RISING_EDGE |
182-
PTP_FALLING_EDGE |
183-
PTP_STRICT_FLAGS))
182+
PTP_FALLING_EDGE))
184183
return -EOPNOTSUPP;
185184

186185
if (req->index)

0 commit comments

Comments
 (0)