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 09/11] net: mlx4: convert to timecounter adjtime.
Date: Sun, 21 Dec 2014 19:47:04 +0100 [thread overview]
Message-ID: <4992d674b60c48aed0d9babf0e4903726b20dfb2.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.
Compile tested only.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
---
drivers/net/ethernet/mellanox/mlx4/en_clock.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_clock.c b/drivers/net/ethernet/mellanox/mlx4/en_clock.c
index 9990144..df35d0e 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_clock.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_clock.c
@@ -147,12 +147,9 @@ static int mlx4_en_phc_adjtime(struct ptp_clock_info *ptp, s64 delta)
struct mlx4_en_dev *mdev = container_of(ptp, struct mlx4_en_dev,
ptp_clock_info);
unsigned long flags;
- s64 now;
write_lock_irqsave(&mdev->clock_lock, flags);
- now = timecounter_read(&mdev->clock);
- now += delta;
- timecounter_init(&mdev->clock, &mdev->cycles, now);
+ timecounter_adjtime(&mdev->clock, delta);
write_unlock_irqrestore(&mdev->clock_lock, flags);
return 0;
--
1.7.10.4
next prev parent reply other threads:[~2014-12-21 18:49 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 ` Richard Cochran [this message]
2014-12-21 18:47 ` [PATCH net-next 10/11] net: cpts: " Richard Cochran
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=4992d674b60c48aed0d9babf0e4903726b20dfb2.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®