Re: [Linuxptp-devel] [PATCH v5 08/13] ts2phc: instantiate a pmc agent

2022-08-08 Thread Richard Cochran
On Fri, Aug 05, 2022 at 07:56:11PM +0300, Vladimir Oltean wrote: > Can't I just delete "case PS_INITIALIZING:" ... "case PS_GRAND_MASTER:" > since I have to put "default:" anyway (we may get arbitrary input over > the management messages)? sure > I'm also wondering if PS_PRE_MASTER and

Re: [Linuxptp-devel] [PATCH v5 08/13] ts2phc: instantiate a pmc agent

2022-08-05 Thread Vladimir Oltean
On Tue, Jun 14, 2022 at 05:58:13AM -0700, Richard Cochran wrote: > On Tue, Nov 23, 2021 at 02:14:16AM +0200, Vladimir Oltean wrote: > > > +static enum port_state ts2phc_normalize_state(enum port_state state) > > +{ > > + if (state != PS_MASTER && state != PS_SLAVE && > > + state !=

Re: [Linuxptp-devel] [PATCH v5 08/13] ts2phc: instantiate a pmc agent

2022-06-14 Thread Richard Cochran
On Tue, Nov 23, 2021 at 02:14:16AM +0200, Vladimir Oltean wrote: > +static enum port_state ts2phc_normalize_state(enum port_state state) > +{ > + if (state != PS_MASTER && state != PS_SLAVE && > + state != PS_PRE_MASTER && state != PS_UNCALIBRATED) { > + /* treat any other

[Linuxptp-devel] [PATCH v5 08/13] ts2phc: instantiate a pmc agent

2021-11-22 Thread Vladimir Oltean
This introduces the '-a' option in ts2phc, an option inspired from phc2sys that puts the clocks in "automatic" mode. In this mode, ts2phc listens, as a PMC, to port state change events from ptp4l, and detects which port state machine, if any, has transitioned to PS_SLAVE. That port's clock will