Re: [PATCH net] ptp_qoriq: Don't write system time into PHC at boot

From
Richard Cochran <richardcochran@gmail.com>
Date
2019-10-01 02:37:47
Reply to
Vladimir Oltean, 2019-09-28
On Sun, Sep 29, 2019 at 01:22:28AM +0300, Vladimir Oltean wrote:
But I couldn't find a justification to just move the spin_lock_init a
few lines above, because I don't see why the ptp_qoriq_settime call
should be done at all at probe time. Writing a CLOCK_REALTIME value into
a timer that is supposed to track CLOCK_TAI means there will be a 37
second offset that's going to render it useless for any practical
purpose.
Rhetorical question:  Is off-by-37 more wrong than 1970?

Some PHC drivers start counting from zero (1970), and some from the
system time (which might be any value at all).  It really doesn't
matter what the initial value is, IMHO, because it will always be
wrong.
So just remove the ptp_qoriq_settime call and let the clock tick in 1970
until user space does something about it. Most other PTP drivers do the
same, except chelsio cxgb4 and maybe a few others.
Not sure about "most".

Please fix the actual bug, the spin lock issue, and don't worry about
changing the initial value.

Thanks,
Richard

Thread (3 messages) 3 messages, 3 authors, last reply 2019-10-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help