[Linuxptp-devel] [PATCH] port: fix fda initialization.

2014-11-05 Thread Miroslav Lichvar
Initialize all descriptors to prevent polling invalid descriptors from faulty ports. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/port.c b/port.c index aae5910..6ce63f7 100644 --- a/port.c +++ b/port.c @@

Re: [Linuxptp-devel] [PATCH RFC 0/3] Poor man's boundary clock

2014-11-05 Thread Jiri Benc
On Wed, 5 Nov 2014 17:34:23 +0100, Richard Cochran wrote: I like the idea of automatic phc2sys, if it would only work right. It's definitely not complete yet and I'm not surprised there are bugs (although I did my best to support also future cases, it's hard to get it right without the actual

Re: [Linuxptp-devel] [PATCH RFC 0/3] Poor man's boundary clock

2014-11-05 Thread Richard Cochran
On Wed, Nov 05, 2014 at 05:56:28PM +0100, Jiri Benc wrote: My plan for the next steps has been allowing ptp4l to work with multiple independent PHCs that would form a PTP clock (and rely on phc2sys to sync those PHCs). Doesn't my patch #2 do this? This needs separation of struct clock into

Re: [Linuxptp-devel] [PATCH RFC 0/3] Poor man's boundary clock

2014-11-05 Thread Jiri Benc
On Wed, 5 Nov 2014 19:58:32 +0100, Richard Cochran wrote: On Wed, Nov 05, 2014 at 05:56:28PM +0100, Jiri Benc wrote: My plan for the next steps has been allowing ptp4l to work with multiple independent PHCs that would form a PTP clock (and rely on phc2sys to sync those PHCs). Doesn't my

Re: [Linuxptp-devel] [PATCH RFC 0/3] Poor man's boundary clock

2014-11-05 Thread Richard Cochran
On Wed, Nov 05, 2014 at 08:28:04PM +0100, Jiri Benc wrote: I'm not sure whether this patch was enough to support the boundary clock or more was needed but I remember I had the boundary clock stuff done (though untested) and I cannot find anything on top of this, so this was probably enough.

Re: [Linuxptp-devel] [PATCH] port: fix fda initialization.

2014-11-05 Thread Richard Cochran
On Wed, Nov 05, 2014 at 12:22:43PM +0100, Miroslav Lichvar wrote: Initialize all descriptors to prevent polling invalid descriptors from faulty ports. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[Linuxptp-devel] [PATCH RFC V2 06/10] config: add a option to enable a poor man's boundary clock.

2014-11-05 Thread Richard Cochran
This patch adds a configuration option that allows running a boundary clock using just a bunch of devices. Normally each port is probed to make sure they all share the same PTP hardware clock, but this option will allow a heterogeneous collection of devices, should the user really want it.

[Linuxptp-devel] [PATCH RFC V2 03/10] trivial: do not assign a FP constant to an integer.

2014-11-05 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- clock.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clock.c b/clock.c index 726999e..df82d2b 100644 --- a/clock.c +++ b/clock.c @@ -789,7 +789,7 @@ struct clock *clock_create(int phc_index, struct

[Linuxptp-devel] [PATCH RFC V2 07/10] phc2sys: make automatic mode actually work.

2014-11-05 Thread Richard Cochran
The reconfigure function unnecessarily clears the 'new_state' variable. On the second and subsequent calls, this zero value incorrectly clobbers the state of any port whose state has *not* changed. If, for example, a port in the MASTER state goes FAULTY, when it returns to MASTER state, phc2sys

[Linuxptp-devel] [PATCH RFC V2 08/10] phc2sys: automatic mode: synchronize all non-slave ports.

2014-11-05 Thread Richard Cochran
When running a jbod Boundary Clock, as long as we have one slaved port, we always want the clocks on the other ports to be synchronized, regardless of their port state. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- phc2sys.c | 40 +--- 1 file

[Linuxptp-devel] [PATCH RFC V2 01/10] Use SO_SELECT_ERR_QUEUE when available.

2014-11-05 Thread Richard Cochran
The current implementation fetches a transmit time stamp by polling on the socket with pollfd.events set to zero, and then checking if POLLERR has been returned by the kernel in pollfd.revents. This has the unfortunate side effect of sleeping in poll() for the entire time out duration, regardless