From d50566c7274376f5d9325d675d4854d27798018f Mon Sep 17 00:00:00 2001 From: Takahiro Shimizu Date: Fri, 20 Apr 2012 18:50:28 +0000 Subject: 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 Signed-off-by: Richard Cochran Signed-off-by: David S. Miller --- drivers/ptp/ptp_pch.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/ptp/ptp_pch.c') 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) ns = ((u64) hi) << 32; ns |= lo; + ns <<= TICKS_NS_SHIFT; return ns; } @@ -277,6 +278,7 @@ u64 pch_tx_snap_read(struct pci_dev *pdev) ns = ((u64) hi) << 32; ns |= lo; + ns <<= TICKS_NS_SHIFT; return ns; } -- cgit v1.2.3