Thread (37 messages) 37 messages, 5 authors, 2016-12-09

Re: [PATCH 4/6] net: ethernet: ti: cpts: add ptp pps support

flat view

From: Richard Cochran <richardcochran@gmail.com>
Date: 2016-11-30 18:45:26
Also in: linux-omap, lkml, netdev

On Mon, Nov 28, 2016 at 05:04:26PM -0600, Grygorii Strashko wrote:
quoted hunk ↗ jump to hunk
+static cycle_t cpts_cc_ns2cyc(struct cpts *cpts, u64 nsecs)
+{
+	cycle_t cyc = (nsecs << cpts->cc.shift) + nsecs;
+
+	do_div(cyc, cpts->cc.mult);
+
+	return cyc;
+}
So you set the comparison value once per second, based on cc.mult.
But when the clock is being actively synchronized, user space calls to
clock_adjtimex() will change cc.mult.  This can happen several times
per second, depending on the PTP Sync rate.

In order to produce the PPS edge correctly, you would have to adjust
the comparison value whenever cc.mult changes, but of course this is
unworkable.

So I'll have to say NAK for this patch.

Thanks,
Richard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help