[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200524175733.GE22416@localhost>
Date: Sun, 24 May 2020 10:57:33 -0700
From: Richard Cochran <richardcochran@...il.com>
To: netdev@...r.kernel.org
Cc: David Miller <davem@...emloft.net>,
Miroslav Lichvar <mlichvar@...hat.com>,
John Stultz <john.stultz@...aro.org>,
Vincent Cheng <vincent.cheng.xh@...esas.com>
Subject: Re: [PATCH net-next] Let the ADJ_OFFSET interface respect the
STA_NANO flag for PHC devices.
On Sun, May 24, 2020 at 06:28:00AM -0700, Richard Cochran wrote:
> @@ -147,8 +147,13 @@ static int ptp_clock_adjtime(struct posix_clock *pc, struct __kernel_timex *tx)
> err = ops->adjfreq(ops, ppb);
> ptp->dialed_frequency = tx->freq;
> } else if (tx->modes & ADJ_OFFSET) {
> - if (ops->adjphase)
> - err = ops->adjphase(ops, tx->offset);
> + if (ops->adjphase) {
> + s32 offset = tx->offset;
> + if (!(tx->status & STA_NANO)) {
> + offset *= NSEC_PER_USEC;
Oh man. This should check for ADJ_NANO instead. V2 follows soon...
Thanks,
Richard
Powered by blists - more mailing lists