RE: [PATCH 25/27] qede: Use timecounter_reset interface

From: Kalluru, Sudarsana
Date: Mon Dec 18 2017 - 09:13:54 EST


Acked-by: Sudarsana Kalluru <Sudarsana.Kalluru@xxxxxxxxxx>

-----Original Message-----
From: Sagar Arun Kamble [mailto:sagar.a.kamble@xxxxxxxxx]
Sent: 15 December 2017 13:09
To: linux-kernel@xxxxxxxxxxxxxxx
Cc: Sagar Arun Kamble <sagar.a.kamble@xxxxxxxxx>; Richard Cochran <richardcochran@xxxxxxxxx>; Elior, Ariel <Ariel.Elior@xxxxxxxxxx>; Dept-Eng Everest Linux L2 <Dept-EngEverestLinuxL2@xxxxxxxxxx>; netdev@xxxxxxxxxxxxxxx
Subject: [PATCH 25/27] qede: Use timecounter_reset interface

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

Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@xxxxxxxxx>
Cc: Richard Cochran <richardcochran@xxxxxxxxx>
Cc: Ariel Elior <Ariel.Elior@xxxxxxxxxx>
Cc: everest-linux-l2@xxxxxxxxxx
Cc: netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
drivers/net/ethernet/qlogic/qede/qede_ptp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qede/qede_ptp.c b/drivers/net/ethernet/qlogic/qede/qede_ptp.c
index 0d054dc..c2de311 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_ptp.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_ptp.c
@@ -129,9 +129,9 @@ static int qede_ptp_settime(struct ptp_clock_info *info,

DP_VERBOSE(edev, QED_MSG_DEBUG, "PTP settime called, ns = %llu\n", ns);

- /* Re-init the timecounter */
+ /* Reset the timecounter */
spin_lock_bh(&ptp->lock);
- timecounter_init(&ptp->tc, ns);
+ timecounter_reset(&ptp->tc, ns);
spin_unlock_bh(&ptp->lock);

return 0;
--
1.9.1