From a05990c6c7250ba0aaed94e0222b598e0190bad4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 12 Sep 2024 07:01:23 +0200 Subject: Merging upstream version 4.6. Signed-off-by: Daniel Baumann --- sys_linux.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sys_linux.c') diff --git a/sys_linux.c b/sys_linux.c index 6849637..5fe9c0e 100644 --- a/sys_linux.c +++ b/sys_linux.c @@ -990,6 +990,14 @@ SYS_Linux_SetPHCExtTimestamping(int fd, int pin, int channel, return 0; } +#if defined(PTP_MASK_CLEAR_ALL) && defined(PTP_MASK_EN_SINGLE) + /* Disable events from other channels on this descriptor */ + if (ioctl(fd, PTP_MASK_CLEAR_ALL)) + DEBUG_LOG("ioctl(%s) failed : %s", "PTP_MASK_CLEAR_ALL", strerror(errno)); + else if (ioctl(fd, PTP_MASK_EN_SINGLE, &channel)) + DEBUG_LOG("ioctl(%s) failed : %s", "PTP_MASK_EN_SINGLE", strerror(errno)); +#endif + return 1; } -- cgit v1.2.3