From patchwork Sat Mar 21 20:59:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Cochran X-Patchwork-Id: 453032 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3C65B140146 for ; Sun, 22 Mar 2015 08:04:35 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=ceFAY1Ir; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752349AbbCUVEP (ORCPT ); Sat, 21 Mar 2015 17:04:15 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:37261 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751960AbbCUVAa (ORCPT ); Sat, 21 Mar 2015 17:00:30 -0400 Received: by wixw10 with SMTP id w10so21328927wix.0; Sat, 21 Mar 2015 14:00:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=D1CEemk/ZRCX4eR9cudj5F16qUvahFPSbPRcMhCFu9M=; b=ceFAY1IrbYRQzLS42HNeDkY81Bc6bu0z+hGHRdwL4Tim1oYyUebS4BEVCtuwerBz6R xqg8i755nJZwDlu3xHpztvQvZ+wMItm8EubVk2OdYBd3xmJ+upcYMjjAsiTYXiBtwMLf LM3cNiLaXe4uKCZC6cZOK7YyxssG8mtbuyg2k2XtG8t8Y7HZQRqFD6FluOjh7hmTsJ1J uqndyC/Nsmk2/CskYVyTRu+ixB2AAvXyzLP9KDRmTeY6eLaloQ7uBbUe6vrl4Zkn+xVL kUNhD+nuy2tasPM/kiN70bBQD+hDKbbqEJNXCJjE78IFtWCOENTEVGzZxaVPxRj6kCmG 4cFA== X-Received: by 10.194.89.195 with SMTP id bq3mr149211198wjb.123.1426971629638; Sat, 21 Mar 2015 14:00:29 -0700 (PDT) Received: from hoboy.home (194-96-185-227.adsl.highway.telekom.at. [194.96.185.227]) by mx.google.com with ESMTPSA id dn7sm3916401wid.12.2015.03.21.14.00.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Mar 2015 14:00:28 -0700 (PDT) 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: [RFC net-next 13/22] ptp: ixgbe: convert to the 64 bit get/set time methods. Date: Sat, 21 Mar 2015 21:59:43 +0100 Message-Id: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This driver's clock is implemented using a timecounter, and so with this patch the driver is ready for the year 2038. Compile tested only. Signed-off-by: Richard Cochran --- drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c index bd46f5d..75b9e93 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c @@ -279,7 +279,7 @@ static int ixgbe_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) * read the timecounter and return the correct value on ns, * after converting it into a struct timespec. */ -static int ixgbe_ptp_gettime(struct ptp_clock_info *ptp, struct timespec *ts) +static int ixgbe_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) { struct ixgbe_adapter *adapter = container_of(ptp, struct ixgbe_adapter, ptp_caps); @@ -306,7 +306,7 @@ static int ixgbe_ptp_gettime(struct ptp_clock_info *ptp, struct timespec *ts) * wall timer value. */ static int ixgbe_ptp_settime(struct ptp_clock_info *ptp, - const struct timespec *ts) + const struct timespec64 *ts) { struct ixgbe_adapter *adapter = container_of(ptp, struct ixgbe_adapter, ptp_caps); @@ -407,7 +407,7 @@ void ixgbe_ptp_overflow_check(struct ixgbe_adapter *adapter) { bool timeout = time_is_before_jiffies(adapter->last_overflow_check + IXGBE_OVERFLOW_PERIOD); - struct timespec ts; + struct timespec64 ts; if (timeout) { ixgbe_ptp_gettime(&adapter->ptp_caps, &ts); @@ -874,8 +874,8 @@ static int ixgbe_ptp_create_clock(struct ixgbe_adapter *adapter) adapter->ptp_caps.pps = 1; adapter->ptp_caps.adjfreq = ixgbe_ptp_adjfreq; adapter->ptp_caps.adjtime = ixgbe_ptp_adjtime; - adapter->ptp_caps.gettime = ixgbe_ptp_gettime; - adapter->ptp_caps.settime = ixgbe_ptp_settime; + adapter->ptp_caps.gettime64 = ixgbe_ptp_gettime; + adapter->ptp_caps.settime64 = ixgbe_ptp_settime; adapter->ptp_caps.enable = ixgbe_ptp_feature_enable; break; case ixgbe_mac_82599EB: @@ -890,8 +890,8 @@ static int ixgbe_ptp_create_clock(struct ixgbe_adapter *adapter) adapter->ptp_caps.pps = 0; adapter->ptp_caps.adjfreq = ixgbe_ptp_adjfreq; adapter->ptp_caps.adjtime = ixgbe_ptp_adjtime; - adapter->ptp_caps.gettime = ixgbe_ptp_gettime; - adapter->ptp_caps.settime = ixgbe_ptp_settime; + adapter->ptp_caps.gettime64 = ixgbe_ptp_gettime; + adapter->ptp_caps.settime64 = ixgbe_ptp_settime; adapter->ptp_caps.enable = ixgbe_ptp_feature_enable; break; default: