> 14.10.2022 09:29 Jakub Raczyński <j.raczyn...@elpromaelectronics.com> 
> napisał(a):
> 
> 
> 
> 
> After some thought, my patch was huge overkill. The correct solution (with 
> same result) should be as in following patch.
> 
> I don't see a point in forcing CLOCK_REALTIME being master and completely 
> ignoring current portState. This patch is supposed to fix that.
> 
> 
> 
> --- a/phc2sys.c 2022-10-14 09:24:53.643279501 +0200
> +++ b/phc2sys.c 2022-10-14 09:17:27.256854202 +0200
> @@ -558,11 +558,11 @@
> rt->state = PS_SLAVE;
> } else if (rt) {
> if (rt->state != PS_MASTER) {
> - rt->state = PS_MASTER;
> - clock_reinit(priv, rt, rt->state);
> + pr_info("portState is not Master, not synchronizing");
> + } else {
> + LIST_INSERT_HEAD(&priv->dst_clocks, rt, dst_list);
> + pr_info("selecting %s for synchronization", rt->device);
> }
> - LIST_INSERT_HEAD(&priv->dst_clocks, rt, dst_list);
> - pr_info("selecting %s for synchronization", rt->device);
> }
> priv->master = src;
> pr_info("selecting %s as the master clock", src->device); My bad, this patch 
> is flawed, previous one was OK.
Awaiting response what you think about previous one.



Best regards
Jakub Raczynski

_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to