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.kam...@intel.com>
Cc: Richard Cochran <richardcoch...@gmail.com>
Cc: Saeed Mahameed <sae...@mellanox.com>
Cc: Matan Barak <mat...@mellanox.com>
Cc: Leon Romanovsky <leo...@mellanox.com>
Cc: Eugenia Emantayev <euge...@mellanox.com>
Cc: Eitan Rabin <ra...@mellanox.com>
Cc: Feras Daoud <fera...@mellanox.com>
Cc: Tariq Toukan <tar...@mellanox.com>
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: netdev@vger.kernel.org
Cc: linux-r...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
---
 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

Reply via email to