Subject: Re: [PATCH v3 net-next 03/12] net: aquantia: add basic ptp_clock callbacks

From: Richard Cochran <[email-masked]>
Date: Thu, 24 Oct 2019 07:04:28 -0700

On Tue, Oct 22, 2019 at 09:53:27AM +0000, Igor Russkikh wrote:
> +/* aq_ptp_adjfine
> + * @ptp: the ptp clock structure
> + * @ppb: parts per billion adjustment from base

Kdoc needs update.

> + *
> + * adjust the frequency of the ptp cycle counter by the
> + * indicated ppb from the base frequency.
> + */
> +static int aq_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
> +{
> +	struct aq_ptp_s *aq_ptp = container_of(ptp, struct aq_ptp_s, ptp_info);
> +	struct aq_nic_s *aq_nic = aq_ptp->aq_nic;
> +
> +	mutex_lock(&aq_nic->fwreq_mutex);
> +	aq_nic->aq_hw_ops->hw_adj_clock_freq(aq_nic->aq_hw,
> +					     scaled_ppm_to_ppb(scaled_ppm));

If your HW has sub-ppm bits in its frequency word, then it does make a
difference to actually use the low order bits (instead of truncating
as you do here).

> +	mutex_unlock(&aq_nic->fwreq_mutex);
> +
> +	return 0;
> +}

Thanks,
Richard