Fix drift calculation in PI servo with large values.

When the drift value is adjusted by the newly measured frequency offset,
multiply the frequencies instead of adding the measured offset to the
old value to get accurate result even when updating a large drift.

[ RC: use a simpler form of the frequency update calculation. ]

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Clarify c1, c2, c3 in negative path delay log message.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Change level of negative path delay messages to debug.

Negative path delay measurements are expected with E2E, the user doesn't
need to know when that happens.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Print current frequency when PI servo is in unlocked state.

Store the current frequency and return it when the servo is in unlocked
state instead of zero. This fixes values printed in log messages.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
phc2sys: Mention that PPS output needs to be enabled without -s.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
uds: take the interface data off the stack.

The 'struct interface' for the UDS port is allocated on the stack, and
when this gets passed to port_open, the port instance takes a pointer to
the string in the 'name' field. Currently this is harmless for the UDS
port, but it is not good form. This patch fixes the issue by making the
interface part of the clock instance.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reported-by: Miroslav Lichvar <mlichvar@redhat.com>
uds: disable the accidentally enabled announce timer.

Commit e425da2f inadvertently enabled the announce timer on the UDS port,
causing it to continually reopen the socket when in slave mode. This patch
fixes the issue by passing zero in the 'span' field of the new function,
set_tmo_random, which disables the timer again.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reported-by: Rohrer Hansjoerg <hj.rohrer@mobatime.com>
pmc: support retrieving neighborPropDelayThresh and asCapable using management interface

Define new PORT_DATA_SET_NP TLV
neighborPropDelayThresh can also be set using the same TLV

Signed-off-by: Delio Brignoli <dbrignoli@audioscience.com>
Merge branch 'asi1230-upstream-tracking' into asi1230-master