Subject: Re: [PATCH net-next 5/8] ice: register 1588 PTP clock device object for E810 devices

From: Richard Cochran <[email-masked]>
Date: Mon, 14 Jun 2021 11:12:20 -0700

On Mon, Jun 14, 2021 at 09:43:17AM -0700, Jacob Keller wrote:
> > Since dialed_freq is updated regardless of return value of .adjfine 
> > the driver has no clear way to reject bad scaled_ppm>
> 
> I'm not sure. +Richard?

The driver advertises "max_adj".  The PHC layer checks user space inputs:

ptp_clock.c line 140:
	} else if (tx->modes & ADJ_FREQUENCY) {
		s32 ppb = scaled_ppm_to_ppb(tx->freq);
		if (ppb > ops->max_adj || ppb < -ops->max_adj)
			return -ERANGE;

So, if the max_adj is correct for the driver/HW, then all is well.

Thanks,
Richard