Subject: Re: [PATCH net-next] Let the ADJ_OFFSET interface respect the STA_NANO flag for PHC devices.

From: Richard Cochran <[email-masked]>
Date: Sun, 24 May 2020 10:57:33 -0700

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