mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
592025a03b
commit
6138e687c7
7 changed files with 15 additions and 6 deletions
|
|
@ -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]) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue