Re: [Linuxptp-devel] [PATCH] Avoid setting clock frequency when free running.

2020-11-11 Thread Jacob Keller
On 11/9/2020 8:14 AM, Richard Cochran wrote: > On Mon, Nov 09, 2020 at 10:12:58AM +0100, Miroslav Lichvar wrote: >> >> Makes sense to me, but maybe it's time to drop the workaround? Looking >> at the git log, it was added in 2013. Are people still using linuxptp >> on kernels older than that? >

Re: [Linuxptp-devel] [PATCH] Avoid setting clock frequency when free running.

2020-11-09 Thread Richard Cochran
On Mon, Nov 09, 2020 at 10:12:58AM +0100, Miroslav Lichvar wrote: > > Makes sense to me, but maybe it's time to drop the workaround? Looking > at the git log, it was added in 2013. Are people still using linuxptp > on kernels older than that? Yes, I think so. When I was collaborating with Balint

Re: [Linuxptp-devel] [PATCH] Avoid setting clock frequency when free running.

2020-11-09 Thread Miroslav Lichvar
On Sun, Nov 08, 2020 at 08:34:33AM -0800, Richard Cochran wrote: > @@ -1114,8 +1114,9 @@ struct clock *clock_create(enum clock_type type, struct > config *config, > /* Due to a bug in older kernels, the reading may silently fail > and return 0. Set the frequency back

Re: [Linuxptp-devel] [PATCH] Avoid setting clock frequency when free running.

2020-11-08 Thread Richard Cochran
On Sun, Nov 08, 2020 at 06:51:27PM -, Richard Hill wrote: > You're ok with a modern style ? > if (a) > { > exit(-1); > } No, patches for this project should conform to the guidelines in CODING_STYLE.org. Sorry if that isn't "modern" enough for you. Now, if you will excuse

Re: [Linuxptp-devel] [PATCH] Avoid setting clock frequency when free running.

2020-11-08 Thread Richard Hill
uxptp-devel@lists.sourceforge.net Subject: Re: [Linuxptp-devel] [PATCH] Avoid setting clock frequency when free running. On Sun, Nov 08, 2020 at 08:23:57PM +0200, Vladimir Oltean wrote: > What is the convention for single statement blocks in linuxptp? Use > braces or not? I've seen both

Re: [Linuxptp-devel] [PATCH] Avoid setting clock frequency when free running.

2020-11-08 Thread Richard Cochran
On Sun, Nov 08, 2020 at 08:23:57PM +0200, Vladimir Oltean wrote: > What is the convention for single statement blocks in linuxptp? Use > braces or not? I've seen both used. I prefer braces always, for the reasons in the CODING_STYLE.org, but I often overlook this when reviewing patches. It isn't

Re: [Linuxptp-devel] [PATCH] Avoid setting clock frequency when free running.

2020-11-08 Thread Vladimir Oltean
On Sun, Nov 08, 2020 at 08:34:33AM -0800, Richard Cochran wrote: > The "free_running" configuration option is meant to allow running the > software without actually adjusting the clock at all. However, both the > ptp4l and the ts2phc programs set the clock frequency unconditionally > on startup.

[Linuxptp-devel] [PATCH] Avoid setting clock frequency when free running.

2020-11-08 Thread Richard Cochran
The "free_running" configuration option is meant to allow running the software without actually adjusting the clock at all. However, both the ptp4l and the ts2phc programs set the clock frequency unconditionally on startup. This patch fixes issue by testing whether the clock is free running befor