Skip to content

Commit

Permalink
tsproc: Fix time stamp handling with P2P one shot mode.
Browse files Browse the repository at this point in the history
When the P2P link partner is using one shot mode, the residence time
in the peer (t3 - t2) is reflected in the correction field of the
peer delay response message, and t2 and t3 are both zero.

The function port_peer_delay() calls clock_peer_delay(), passing in
the zero valued 't2' to the 'rx' argument.  The latter function then
stores the zero value in the 't4' field of the clock's tsproc
instance.

As a result, tsproc_update_offset() returns an error to
clock_synchronize(), and so a slave clock will never leave the
"uncalibrated" state.

This patch fixes the issue by removing the test for a non-zero 't4'
field within the tsproc.

Acked-by: Miroslav Lichvar <[email protected]>
Signed-off-by: Richard Cochran <[email protected]>
  • Loading branch information
richardcochran committed Apr 3, 2016
1 parent 999c86f commit 3f2ef92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tsproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ int tsproc_update_offset(struct tsproc *tsp, tmv_t *offset, double *weight)
tmv_t delay, raw_delay = 0;

if (tmv_is_zero(tsp->t1) || tmv_is_zero(tsp->t2) ||
tmv_is_zero(tsp->t3) || tmv_is_zero(tsp->t4))
tmv_is_zero(tsp->t3))
return -1;

if (tsp->raw_mode || tsp->weighting)
Expand Down

0 comments on commit 3f2ef92

Please sign in to comment.