From patchwork Sun Dec 21 18:47:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Cochran X-Patchwork-Id: 423204 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 B88A414007F for ; Mon, 22 Dec 2014 05:50:03 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753727AbaLUStr (ORCPT ); Sun, 21 Dec 2014 13:49:47 -0500 Received: from mail-wi0-f177.google.com ([209.85.212.177]:59416 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753149AbaLUSr1 (ORCPT ); Sun, 21 Dec 2014 13:47:27 -0500 Received: by mail-wi0-f177.google.com with SMTP id l15so6152182wiw.10; Sun, 21 Dec 2014 10:47:26 -0800 (PST) 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=21EItFx5/KP8zm7iI8zHdZ4riBPVU2cl4VMrjP0uNV0=; b=mO4mCcBId4oTGxWj3NknD4XELjw7ux7vp+L2gBvpq6fdSjXw38i4BYET5HawDMz0/e k4BtQjwKAuStdimgViflWxnyZ0EB9OqMZZrkTXPcMLuKqP3astuEn5qguqv5KUkXiMxn jG2sbFOfCnb0j9pZtI5ualzGyGZ36hVSKDtjFc36B1+xTP/aVdxDJshjHSBNy9np5Al7 nDCTFUBfTY+9WgKp4H0LBB6Zjb0nm4hIh6Yu0kItEF399VIMVlxjJK/d896ztHaAAx+C y0qpDRE7SzdXI586yJxZOICIAieu+MregGE1Ub56cBllxZCKSwVKKTgDY4Il5qOGYqNy dlWA== X-Received: by 10.180.228.72 with SMTP id sg8mr24859521wic.48.1419187646336; Sun, 21 Dec 2014 10:47:26 -0800 (PST) Received: from hoboy.home (91-115-101-48.adsl.highway.telekom.at. [91.115.101.48]) by mx.google.com with ESMTPSA id ep9sm10432411wid.3.2014.12.21.10.47.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Dec 2014 10:47:25 -0800 (PST) From: Richard Cochran To: Cc: , Amir Vadai , Ariel Elior , Carolyn Wyborny , David Miller , Frank Li , Jeff Kirsher , John Stultz , Matthew Vick , Miroslav Lichvar , Mugunthan V N , Or Gerlitz , Thomas Gleixner , Tom Lendacky Subject: [PATCH net-next 08/11] net: ixgbe: convert to timecounter adjtime. Date: Sun, 21 Dec 2014 19:47:03 +0100 Message-Id: <5d83679d541974c164cfc415c0bb171e2b363f16.1418504889.git.richardcochran@gmail.com> 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 patch changes the driver to use the new and improved method for adjusting the offset of a timecounter. Compile tested only. Signed-off-by: Richard Cochran Acked-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c index 5fd4b52..47c29ea 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c @@ -261,18 +261,9 @@ static int ixgbe_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta) struct ixgbe_adapter *adapter = container_of(ptp, struct ixgbe_adapter, ptp_caps); unsigned long flags; - u64 now; spin_lock_irqsave(&adapter->tmreg_lock, flags); - - now = timecounter_read(&adapter->tc); - now += delta; - - /* reset the timecounter */ - timecounter_init(&adapter->tc, - &adapter->cc, - now); - + timecounter_adjtime(&adapter->tc, delta); spin_unlock_irqrestore(&adapter->tmreg_lock, flags); ixgbe_ptp_setup_sdp(adapter);