diff options
author | Richard Cochran <richardcochran@gmail.com> | 2019-11-14 21:45:02 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-15 23:48:32 +0300 |
commit | 6138e687c7b679da08c0feb55a88f448f7890c07 (patch) | |
tree | 5fa29b3639962a57b0b0e7e81690311ff2b06710 /drivers/ptp | |
parent | 592025a03b34927f35852058c933ffcd7c500321 (diff) | |
download | linux-6138e687c7b679da08c0feb55a88f448f7890c07.tar.xz |
ptp: Introduce strict checking of external time stamp options.
User space may request time stamps on rising edges, falling edges, or
both. However, the particular mode may or may not be supported in the
hardware or in the driver. This patch adds a "strict" flag that tells
drivers to ensure that the requested mode will be honored.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ptp')
-rw-r--r-- | drivers/ptp/ptp_chardev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c index cbbe1237ff8d..9d72ab593f13 100644 --- a/drivers/ptp/ptp_chardev.c +++ b/drivers/ptp/ptp_chardev.c @@ -150,6 +150,8 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg) break; } if (cmd == PTP_EXTTS_REQUEST2) { + /* Tell the drivers to check the flags carefully. */ + req.extts.flags |= PTP_STRICT_FLAGS; /* Make sure no reserved bit is set. */ if ((req.extts.flags & ~PTP_EXTTS_VALID_FLAGS) || req.extts.rsv[0] || req.extts.rsv[1]) { |