Let the free running port state reflect the synchronization uncertain flag.

When using the "free running" option, a slaved port remains in the
UNCALIBRATED state.  If the actual servo resides in and external program,
for example when following the 802.1AS recommendations, that program can
signal the synchronization state using the "synchronization uncertain"
management message. This patch lets the port state transitions from
UNCALIBRATED to SLAVE based on that message.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2020-05-05 16:22:17 -07:00
parent 6c5b61a64c
commit f8078f00f7
1 changed files with 9 additions and 3 deletions

12
clock.c
View File

@ -589,10 +589,16 @@ static void clock_stats_display(struct clock_stats *s)
static enum servo_state clock_no_adjust(struct clock *c, tmv_t ingress, static enum servo_state clock_no_adjust(struct clock *c, tmv_t ingress,
tmv_t origin) tmv_t origin)
{ {
double fui;
double ratio, freq;
struct freq_estimator *f = &c->fest; struct freq_estimator *f = &c->fest;
enum servo_state state = SERVO_UNLOCKED; double freq, fui, ratio;
enum servo_state state;
if (c->local_sync_uncertain == SYNC_UNCERTAIN_FALSE) {
state = SERVO_LOCKED;
} else {
state = SERVO_UNLOCKED;
}
/* /*
* The ratio of the local clock freqency to the master clock * The ratio of the local clock freqency to the master clock
* is estimated by: * is estimated by: