diff options
author | Stefan Sørensen <stefan.sorensen@spectralink.com> | 2014-07-11 08:18:26 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-11 14:05:15 -0700 |
commit | a0077a9fa3fef18ab0890e79a367270c5ae5fe54 (patch) | |
tree | 62768c6201ebbb491d0b5f92add5fe1f2bcc9dfa | |
parent | 5e6438db34d522ee1c78b5d4c1c35a4a3bbd5054 (diff) | |
download | linux-a0077a9fa3fef18ab0890e79a367270c5ae5fe54.tar.bz2 |
dp83640: Adjust ptp event timestamps
Event timestamp values should be adjusted by 3*reference clock period +
11 ns = 35 ns to compensate for input path and synchronization delays.
So subtract 35ns from event timestamps.
Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/phy/dp83640.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index 53bd1af68422..76fbd3948736 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c @@ -755,6 +755,9 @@ static int decode_evnt(struct dp83640_private *dp83640, event.type = PTP_CLOCK_EXTTS; event.timestamp = phy2txts(&dp83640->edata); + /* Compensate for input path and synchronization delays */ + event.timestamp -= 35; + for (i = 0; i < N_EXT_TS; i++) { if (ext_status & exts_chan_to_edata(i)) { event.index = i; |