net: fec: initialize clock with 0 rather than current kernel time
Initializing with 0 makes it much easier to identify time stamps from otherwise uninitialized clock. Initialization of PTP clock with current kernel time makes little sense as PTP time scale differs from UTC time scale that kernel time represents. It only leads to confusion when no actual PTP initialization happens, as these time scales differ in a small integer number of seconds (37 at the time of writing.) Signed-off-by: Sergey Organov <sorganov@gmail.com> Acked-by: Fugang Duan <fugang.duan@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
e53a57e56f
commit
199560343e
|
@ -264,7 +264,7 @@ void fec_ptp_start_cyclecounter(struct net_device *ndev)
|
|||
fep->cc.mult = FEC_CC_MULT;
|
||||
|
||||
/* reset the ns time counter */
|
||||
timecounter_init(&fep->tc, &fep->cc, ktime_to_ns(ktime_get_real()));
|
||||
timecounter_init(&fep->tc, &fep->cc, 0);
|
||||
|
||||
spin_unlock_irqrestore(&fep->tmreg_lock, flags);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue