lkml.org 
[lkml]   [2021]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH net 2/2] ptp: idt82p33: implement double dco time correction
Date

> -----Original Message-----
> From: Richard Cochran <richardcochran@gmail.com>
> Sent: June 23, 2021 11:44 PM
> To: Min Li <min.li.xe@renesas.com>
> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH net 2/2] ptp: idt82p33: implement double dco time
> correction
>
> On Wed, Jun 23, 2021 at 10:46:25AM -0400, min.li.xe@renesas.com wrote:
> > +static int idt82p33_start_ddco(struct idt82p33_channel *channel, s32
> > +delta_ns) {
> > + s32 current_ppm = channel->current_freq;
> > + u32 duration_ms = MSEC_PER_SEC;
>
> What happens if user space makes a new adjustment before this completes?
>
> After all, some PTP profiles update the clock several times per second.
>
> Thanks,
> Richard

Hi Richard

In that case, adjtime would simply return without doing anything as in

@@ -848,11 +914,15 @@ static int idt82p33_adjtime(struct ptp_clock_info *ptp, s64 delta_ns)
struct idt82p33 *idt82p33 = channel->idt82p33;
int err;

+ if (channel->ddco == true)
+ return 0;
+

\
 
 \ /
  Last update: 2021-06-24 16:41    [W:0.050 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site