From: Richard Cochran <richardcochran@gmail.com>
To: <netdev@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, Amir Vadai <amirv@mellanox.com>,
Ariel Elior <ariel.elior@qlogic.com>,
Carolyn Wyborny <carolyn.wyborny@intel.com>,
David Miller <davem@davemloft.net>,
Frank Li <Frank.Li@freescale.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
John Stultz <john.stultz@linaro.org>,
Matthew Vick <matthew.vick@intel.com>,
Miroslav Lichvar <mlichvar@redhat.com>,
Mugunthan V N <mugunthanvnm@ti.com>,
Or Gerlitz <ogerlitz@mellanox.com>,
Thomas Gleixner <tglx@linutronix.de>,
Tom Lendacky <thomas.lendacky@amd.com>
Subject: [PATCH net-next 10/11] net: cpts: convert to timecounter adjtime.
Date: Sun, 21 Dec 2014 19:47:05 +0100 [thread overview]
Message-ID: <90dc7fc7d7550d5164474ca9995628f50989dbb2.1418504889.git.richardcochran@gmail.com> (raw)
In-Reply-To: <cover.1418504883.git.richardcochran@gmail.com>
This patch changes the driver to use the new and improved method
for adjusting the offset of a timecounter.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
---
drivers/net/ethernet/ti/cpts.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 4a4388b..fbe42cb 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -157,14 +157,11 @@ static int cpts_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb)
static int cpts_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
{
- s64 now;
unsigned long flags;
struct cpts *cpts = container_of(ptp, struct cpts, info);
spin_lock_irqsave(&cpts->lock, flags);
- now = timecounter_read(&cpts->tc);
- now += delta;
- timecounter_init(&cpts->tc, &cpts->cc, now);
+ timecounter_adjtime(&cpts->tc, delta);
spin_unlock_irqrestore(&cpts->lock, flags);
return 0;
--
1.7.10.4
next prev parent reply other threads:[~2014-12-21 18:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-21 18:46 [PATCH net-next 00/11] Time Counter fixes and improvements Richard Cochran
2014-12-21 18:46 ` [PATCH net-next 01/11] time: move the timecounter/cyclecounter code into its own file Richard Cochran
2014-12-23 21:03 ` Jeff Kirsher
2014-12-21 18:46 ` [PATCH net-next 02/11] timecounter: provide a helper function to shift the time Richard Cochran
2014-12-21 18:46 ` [PATCH net-next 03/11] net: xgbe: convert to timecounter adjtime Richard Cochran
2014-12-21 18:46 ` [PATCH net-next 04/11] net: bnx2x: " Richard Cochran
2014-12-21 19:01 ` Richard Cochran
2014-12-21 18:47 ` [PATCH net-next 05/11] net: fec: " Richard Cochran
2014-12-21 18:47 ` [PATCH net-next 06/11] net: e1000e: " Richard Cochran
2014-12-23 21:04 ` Jeff Kirsher
2014-12-21 18:47 ` [PATCH net-next 07/11] net: igb: " Richard Cochran
2014-12-23 21:04 ` Jeff Kirsher
2014-12-21 18:47 ` [PATCH net-next 08/11] net: ixgbe: " Richard Cochran
2014-12-23 21:07 ` Jeff Kirsher
2014-12-23 21:42 ` Richard Cochran
2014-12-21 18:47 ` [PATCH net-next 09/11] net: mlx4: " Richard Cochran
2014-12-21 18:47 ` Richard Cochran [this message]
2014-12-21 18:47 ` [PATCH net-next 11/11] timecounter: keep track of accumulated fractional nanoseconds Richard Cochran
2014-12-30 23:32 ` [PATCH net-next 00/11] Time Counter fixes and improvements David Miller
2014-12-31 17:42 ` Richard Cochran
2015-01-02 18:37 ` John Stultz
2015-01-02 18:49 ` Richard Cochran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=90dc7fc7d7550d5164474ca9995628f50989dbb2.1418504889.git.richardcochran@gmail.com \
--to=richardcochran@gmail.com \
--cc=Frank.Li@freescale.com \
--cc=amirv@mellanox.com \
--cc=ariel.elior@qlogic.com \
--cc=carolyn.wyborny@intel.com \
--cc=davem@davemloft.net \
--cc=jeffrey.t.kirsher@intel.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.vick@intel.com \
--cc=mlichvar@redhat.com \
--cc=mugunthanvnm@ti.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®