From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752020AbbCUVkM (ORCPT ); Sat, 21 Mar 2015 17:40:12 -0400 Received: from mail-we0-f178.google.com ([74.125.82.178]:33271 "EHLO mail-we0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751826AbbCUVkD (ORCPT ); Sat, 21 Mar 2015 17:40:03 -0400 From: Richard Cochran To: Cc: , Amir Vadai , Ariel Elior , Arnd Bergmann , Baolin Wang , Ben Hutchings , Bruce Allan , Carolyn Wyborny , Chris Metcalf , David Miller , Frank Li , Giuseppe Cavallaro , Jeff Kirsher , John Stultz , Luwei Zhou , Matthew Vick , Michael Chan , Prashant Sreedharan , Shradha Shah , Solarflare linux maintainers , Sonic Zhang , =?UTF-8?q?Stefan=20S=C3=B8rensen?= , Thomas Gleixner , Tom Lendacky Subject: [PATCH net-next V2 07/23] ptp: tg3: convert to the 64 bit get/set time methods. Date: Sat, 21 Mar 2015 22:39:25 +0100 Message-Id: <62908b9961a197b46ea337ef8746501f3fd2ca64.1426973658.git.richardcochran@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/net/ethernet/broadcom/tg3.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 22b33da..d02d19b 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) return 0; } -static int tg3_ptp_gettime(struct ptp_clock_info *ptp, struct timespec *ts) +static int tg3_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) { u64 ns; u32 remainder; @@ -6235,12 +6235,12 @@ static int tg3_ptp_gettime(struct ptp_clock_info *ptp, struct timespec *ts) } static int tg3_ptp_settime(struct ptp_clock_info *ptp, - const struct timespec *ts) + const struct timespec64 *ts) { u64 ns; struct tg3 *tp = container_of(ptp, struct tg3, ptp_info); - ns = timespec_to_ns(ts); + ns = timespec64_to_ns(ts); tg3_full_lock(tp, 0); tg3_refclk_write(tp, ns); @@ -6320,8 +6320,8 @@ static const struct ptp_clock_info tg3_ptp_caps = { .pps = 0, .adjfreq = tg3_ptp_adjfreq, .adjtime = tg3_ptp_adjtime, - .gettime = tg3_ptp_gettime, - .settime = tg3_ptp_settime, + .gettime64 = tg3_ptp_gettime, + .settime64 = tg3_ptp_settime, .enable = tg3_ptp_enable, }; -- 1.7.10.4