When ptp4l is using multiple interfaces sharing the same clock, phc2sys in the automatic mode should not try to synchronize them to each other.
Signed-off-by: Miroslav Lichvar <[email protected]> --- phc2sys.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/phc2sys.c b/phc2sys.c index aa4186b..4bc05a5 100644 --- a/phc2sys.c +++ b/phc2sys.c @@ -638,6 +638,10 @@ static int do_loop(struct node *node, int subscriptions) if (!update_needed(clock)) continue; + /* don't try to synchronize the clock to itself */ + if (node->master->clkid == clock->clkid) + continue; + if (clock->clkid == CLOCK_REALTIME && node->master->sysoff_supported) { /* use sysoff */ -- 2.9.3 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxptp-devel
