On Mon, Jun 14, 2021 at 09:43:17AM -0700, Jacob Keller wrote:
quoted
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