[Linuxptp-devel] [PATCH 0/5] PMC Agent - Part V - phc2sys cleanups

2020-12-05 Thread Richard Cochran
In the effort to reshape the PMC agent logic into a coherent form, it is necessary to understand how this code is used by phc2sys. However, that program is a tangle of at least four different program flows, and the time has come to sort it all out. This series continues the journey by simplifying

[Linuxptp-devel] [PATCH 1/5] phc2sys: Replace yet another magical test with a proper test.

2020-12-05 Thread Richard Cochran
In the manual wait mode, if the system clock is not being used, the program closes the PMC agent's connection once the ptp4l service has appeared. Presumably this is done because the TAI-UTC offset plays no role in synchronizing two PHC devices. In order to tell whether the system clock is being

[Linuxptp-devel] [PATCH 5/5] pmc_agent: Remove an obsolete method.

2020-12-05 Thread Richard Cochran
The one and only call site of run_pmc_events() has been eliminated. Remove the unused code. Signed-off-by: Richard Cochran --- pmc_agent.c | 7 --- pmc_agent.h | 1 - 2 files changed, 8 deletions(-) diff --git a/pmc_agent.c b/pmc_agent.c index 6e6627d..8d00e64 100644 --- a/pmc_agent.c +++ b

[Linuxptp-devel] [PATCH 2/5] phc2sys: Move static configuration to its own subroutine.

2020-12-05 Thread Richard Cochran
This will help to simplify the consolidation of the automatic and manual modes. Signed-off-by: Richard Cochran --- phc2sys.c | 47 +++ 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index 1b4f6ce..33f2da6 100644 -

[Linuxptp-devel] [PATCH 4/5] phc2sys: Simplify the main loop.

2020-12-05 Thread Richard Cochran
Now that the PMC agent update method polls for port state notifications, there is no need to call run_pmc_events(). Previously the 'subscriptions' flag shaped the program flow according to whether auto-configuration or manual mode was in effect. But now the PMC agent tracks this difference intern

[Linuxptp-devel] [PATCH 3/5] pmc_agent: Let the update method poll for push events.

2020-12-05 Thread Richard Cochran
Signed-off-by: Richard Cochran --- pmc_agent.c | 3 +++ pmc_agent.h | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pmc_agent.c b/pmc_agent.c index aa2347d..6e6627d 100644 --- a/pmc_agent.c +++ b/pmc_agent.c @@ -390,6 +390,7 @@ int pmc_agent_subscribe(struct pmc_agent *n