From 93b7807aadb33874c5194b6d03f419c9639c39a2 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Fri, 20 Jun 2014 16:32:51 +0200 Subject: [PATCH] Disable clockcheck and kernel leap with ntpshm servo. Always disable the clock sanity check when the ntpshm servo is used, because it doesn't know when or how is the clock adjusted. Disable also the kernel leap option as the process controlling the clock is responsible for setting the kernel flag. Signed-off-by: Miroslav Lichvar --- phc2sys.c | 5 +++++ ptp4l.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/phc2sys.c b/phc2sys.c index 3f5d144..224c03e 100644 --- a/phc2sys.c +++ b/phc2sys.c @@ -1324,6 +1324,11 @@ int main(int argc, char *argv[]) goto bad_usage; } + if (node.servo_type == CLOCK_SERVO_NTPSHM) { + node.kernel_leap = 0; + node.sanity_freq_limit = 0; + } + print_set_progname(progname); print_set_verbose(verbose); print_set_syslog(use_syslog); diff --git a/ptp4l.c b/ptp4l.c index a33900f..25270c6 100644 --- a/ptp4l.c +++ b/ptp4l.c @@ -300,6 +300,10 @@ int main(int argc, char *argv[]) ds->flags & DDS_SLAVE_ONLY) { ds->clockQuality.clockClass = 255; } + if (cfg_settings.clock_servo == CLOCK_SERVO_NTPSHM) { + cfg_settings.dds.kernel_leap = 0; + cfg_settings.dds.sanity_freq_limit = 0; + } print_set_progname(progname); print_set_verbose(cfg_settings.verbose);