summaryrefslogtreecommitdiffstats
path: root/sys_linux.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-12 05:01:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-12 05:01:23 +0000
commita05990c6c7250ba0aaed94e0222b598e0190bad4 (patch)
treec3661f2aea2badd5ef62949469ccb98935c8e20b /sys_linux.c
parentAdding debian version 4.5-3. (diff)
downloadchrony-a05990c6c7250ba0aaed94e0222b598e0190bad4.tar.xz
chrony-a05990c6c7250ba0aaed94e0222b598e0190bad4.zip
Merging upstream version 4.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--sys_linux.c8
1 files changed, 8 insertions, 0 deletions
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;
}