netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>,
	Miroslav Lichvar <mlichvar@redhat.com>,
	John Stultz <john.stultz@linaro.org>,
	Vincent Cheng <vincent.cheng.xh@renesas.com>
Subject: Re: [PATCH net-next] Let the ADJ_OFFSET interface respect the STA_NANO flag for PHC devices.
Date: Sun, 24 May 2020 10:57:33 -0700	[thread overview]
Message-ID: <20200524175733.GE22416@localhost> (raw)
In-Reply-To: <20200524132800.20010-1-richardcochran@gmail.com>

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

      reply	other threads:[~2020-05-24 17:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-24 13:28 [PATCH net-next] Let the ADJ_OFFSET interface respect the STA_NANO flag for PHC devices Richard Cochran
2020-05-24 17:57 ` Richard Cochran [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200524175733.GE22416@localhost \
    --to=richardcochran@gmail.com \
    --cc=davem@davemloft.net \
    --cc=john.stultz@linaro.org \
    --cc=mlichvar@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=vincent.cheng.xh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).