Re: [PATCH] net: lan743x_ptp: convert to ktime_get_clocktai_ts64

From: Arnd Bergmann
Date: Wed Aug 15 2018 - 16:33:21 EST


On Wed, Aug 15, 2018 at 8:03 PM <Bryan.Whitehead@xxxxxxxxxxxxx> wrote:
>
> >
> > Question: this is the only ptp driver that sets the hardware time to the
> > current system time in TAI. Why does it do that?
>
> This is done when the driver starts up after reset. Otherwise the clock is off by 48 years.
> It seemed to me that the system time was the most appropriate clock to sync to.
> If my reasoning is incorrect, please enlighten me.

I've never worked with PTP, but my understanding from looking at the other
drivers is that the time normally gets set either from another host through the
PTP protocol, or using clock_settime() from user space with the current time.

Arnd