diff options
author | Takahiro Shimizu <tshimizu818@gmail.com> | 2012-04-20 14:50:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-21 15:27:44 -0400 |
commit | d50566c7274376f5d9325d675d4854d27798018f (patch) | |
tree | 5143f70924a864c2f543fe76715768cc7a5bd7cd /drivers/ptp/ptp_pch.c | |
parent | 5f568e5afe35721f2f692bccab243ba87cd8f87a (diff) |
pch_gbe: scale time stamps to nanoseconds
This patch fixes the helper functions that give the transmit and
receive time stamps to return nanoseconds, instead of arbitrary clock
ticks.
[ RC - Rebased Takahiro's changes and wrote a commit message
explaining the changes. ]
Signed-off-by: Takahiro Shimizu <tshimizu818@gmail.com>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ptp/ptp_pch.c')
-rw-r--r-- | drivers/ptp/ptp_pch.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ptp/ptp_pch.c b/drivers/ptp/ptp_pch.c index 375eb04c16ea..847a3c3e31e4 100644 --- a/drivers/ptp/ptp_pch.c +++ b/drivers/ptp/ptp_pch.c | |||
@@ -261,6 +261,7 @@ u64 pch_rx_snap_read(struct pci_dev *pdev) | |||
261 | 261 | ||
262 | ns = ((u64) hi) << 32; | 262 | ns = ((u64) hi) << 32; |
263 | ns |= lo; | 263 | ns |= lo; |
264 | ns <<= TICKS_NS_SHIFT; | ||
264 | 265 | ||
265 | return ns; | 266 | return ns; |
266 | } | 267 | } |
@@ -277,6 +278,7 @@ u64 pch_tx_snap_read(struct pci_dev *pdev) | |||
277 | 278 | ||
278 | ns = ((u64) hi) << 32; | 279 | ns = ((u64) hi) << 32; |
279 | ns |= lo; | 280 | ns |= lo; |
281 | ns <<= TICKS_NS_SHIFT; | ||
280 | 282 | ||
281 | return ns; | 283 | return ns; |
282 | } | 284 | } |