aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/tg3.c
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2015-03-29 17:11:57 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-31 12:01:17 -0400
commitf578b41812069e99504f0c2c54412e7ede08532b (patch)
treeafe1fdc8fffb83fdb3f6bf02770c40db895f8bb9 /drivers/net/ethernet/broadcom/tg3.c
parent5d45186b4772512e6db9f1494735c983518e3a09 (diff)
ptp: tg3: convert to the 64 bit get/set time methods.
The device appears to use a 64 bit nanoseconds register, and so with this patch the driver should be ready for the year 2038. Compile tested only. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/tg3.c')
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 22b33da32ba4..d02d19bd34e0 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -6217,7 +6217,7 @@ static int tg3_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
6217 return 0; 6217 return 0;
6218} 6218}
6219 6219
6220static int tg3_ptp_gettime(struct ptp_clock_info *ptp, struct timespec *ts) 6220static int tg3_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
6221{ 6221{
6222 u64 ns; 6222 u64 ns;
6223 u32 remainder; 6223 u32 remainder;
@@ -6235,12 +6235,12 @@ static int tg3_ptp_gettime(struct ptp_clock_info *ptp, struct timespec *ts)
6235} 6235}
6236 6236
6237static int tg3_ptp_settime(struct ptp_clock_info *ptp, 6237static int tg3_ptp_settime(struct ptp_clock_info *ptp,
6238 const struct timespec *ts) 6238 const struct timespec64 *ts)
6239{ 6239{
6240 u64 ns; 6240 u64 ns;
6241 struct tg3 *tp = container_of(ptp, struct tg3, ptp_info); 6241 struct tg3 *tp = container_of(ptp, struct tg3, ptp_info);
6242 6242
6243 ns = timespec_to_ns(ts); 6243 ns = timespec64_to_ns(ts);
6244 6244
6245 tg3_full_lock(tp, 0); 6245 tg3_full_lock(tp, 0);
6246 tg3_refclk_write(tp, ns); 6246 tg3_refclk_write(tp, ns);
@@ -6320,8 +6320,8 @@ static const struct ptp_clock_info tg3_ptp_caps = {
6320 .pps = 0, 6320 .pps = 0,
6321 .adjfreq = tg3_ptp_adjfreq, 6321 .adjfreq = tg3_ptp_adjfreq,
6322 .adjtime = tg3_ptp_adjtime, 6322 .adjtime = tg3_ptp_adjtime,
6323 .gettime = tg3_ptp_gettime, 6323 .gettime64 = tg3_ptp_gettime,
6324 .settime = tg3_ptp_settime, 6324 .settime64 = tg3_ptp_settime,
6325 .enable = tg3_ptp_enable, 6325 .enable = tg3_ptp_enable,
6326}; 6326};
6327 6327