[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1405059506-3996-1-git-send-email-stefan.sorensen@spectralink.com>
Date: Fri, 11 Jul 2014 08:18:26 +0200
From: Stefan Sørensen
<stefan.sorensen@...ctralink.com>
To: <davem@...emloft.net>
CC: <richardcochran@...il.com>, <netdev@...r.kernel.org>,
Stefan Sørensen
<stefan.sorensen@...ctralink.com>
Subject: [PATCH net-next] dp83640: Adjust ptp event timestamps
>From the dp86340 Software Development Guide:
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@...ctralink.com>
Acked-by: Richard Cochran <richardcochran@...il.com>
---
drivers/net/phy/dp83640.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index 53bd1af..76fbd39 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;
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists