From patchwork Fri Dec 15 07:38:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagar Arun Kamble X-Patchwork-Id: 849016 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=osuosl.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yyj0Q39Hlz9sNr for ; Fri, 15 Dec 2017 18:36:06 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D087B88763; Fri, 15 Dec 2017 07:36:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2jU6PinM1a4g; Fri, 15 Dec 2017 07:36:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 1D96388736; Fri, 15 Dec 2017 07:36:03 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id A3E171C21D9 for ; Fri, 15 Dec 2017 07:36:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9C3F788736 for ; Fri, 15 Dec 2017 07:36:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GedkhT-sx92o for ; Fri, 15 Dec 2017 07:36:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id C6E1F81F4D for ; Fri, 15 Dec 2017 07:36:01 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Dec 2017 23:36:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,403,1508828400"; d="scan'208";a="158949417" Received: from sakamble-desktop.iind.intel.com ([10.223.26.118]) by orsmga004.jf.intel.com with ESMTP; 14 Dec 2017 23:35:58 -0800 From: Sagar Arun Kamble To: linux-kernel@vger.kernel.org Date: Fri, 15 Dec 2017 13:08:35 +0530 Message-Id: <1513323522-15021-21-git-send-email-sagar.a.kamble@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1513323522-15021-1-git-send-email-sagar.a.kamble@intel.com> References: <1513323522-15021-1-git-send-email-sagar.a.kamble@intel.com> Subject: [Intel-wired-lan] [PATCH 20/27] e1000e: Use timecounter_reset interface X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-wired-lan@lists.osuosl.org, Richard Cochran , Sagar Arun Kamble , netdev@vger.kernel.org MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" With new interface timecounter_reset we can update the start time for timecounter. Update e1000e_phc_settime with this new function. Signed-off-by: Sagar Arun Kamble Cc: Richard Cochran Cc: Jeff Kirsher Cc: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Tested-by: Aaron Brown --- drivers/net/ethernet/intel/e1000e/ptp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/e1000e/ptp.c b/drivers/net/ethernet/intel/e1000e/ptp.c index 03d5f2a..5b368aa 100644 --- a/drivers/net/ethernet/intel/e1000e/ptp.c +++ b/drivers/net/ethernet/intel/e1000e/ptp.c @@ -222,7 +222,7 @@ static int e1000e_phc_settime(struct ptp_clock_info *ptp, /* reset the timecounter */ spin_lock_irqsave(&adapter->systim_lock, flags); - timecounter_init(&adapter->tc, ns); + timecounter_reset(&adapter->tc, ns); spin_unlock_irqrestore(&adapter->systim_lock, flags); return 0;