[PATCH 24/27] net/mlx5: Use timecounter_reset interface

From: Sagar Arun Kamble
Date: Fri Dec 15 2017 - 02:37:12 EST


With new interface timecounter_reset we can update the start time for
timecounter. Update mlx5_ptp_settime with this new function.

Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@xxxxxxxxx>
Cc: Richard Cochran <richardcochran@xxxxxxxxx>
Cc: Saeed Mahameed <saeedm@xxxxxxxxxxxx>
Cc: Matan Barak <matanb@xxxxxxxxxxxx>
Cc: Leon Romanovsky <leonro@xxxxxxxxxxxx>
Cc: Eugenia Emantayev <eugenia@xxxxxxxxxxxx>
Cc: Eitan Rabin <rabin@xxxxxxxxxxxx>
Cc: Feras Daoud <ferasda@xxxxxxxxxxxx>
Cc: Tariq Toukan <tariqt@xxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: netdev@xxxxxxxxxxxxxxx
Cc: linux-rdma@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
index 071f78a..e490522 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
@@ -122,7 +122,7 @@ static int mlx5_ptp_settime(struct ptp_clock_info *ptp,
unsigned long flags;

write_lock_irqsave(&clock->lock, flags);
- timecounter_init(&clock->tc, ns);
+ timecounter_reset(&clock->tc, ns);
write_unlock_irqrestore(&clock->lock, flags);

return 0;
--
1.9.1