netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Igor Russkikh <Igor.Russkikh@aquantia.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"epomozov@marvell.com" <epomozov@marvell.com>,
	Dmitry Bezrukov <Dmitry.Bezrukov@aquantia.com>,
	"andrew@lunn.ch" <andrew@lunn.ch>,
	Simon Edelhaus <sedelhaus@marvell.com>,
	Sergey Samoilenko <Sergey.Samoilenko@aquantia.com>
Subject: Re: [PATCH v3 net-next 03/12] net: aquantia: add basic ptp_clock callbacks
Date: Thu, 24 Oct 2019 07:04:28 -0700	[thread overview]
Message-ID: <20191024140428.GA1435@localhost> (raw)
In-Reply-To: <cc5ad0d429db914b3615d9a32224e1dc141ba91e.1571737612.git.igor.russkikh@aquantia.com>

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

  reply	other threads:[~2019-10-24 14:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22  9:53 [PATCH v3 net-next 00/12] net: aquantia: PTP support for AQC devices Igor Russkikh
2019-10-22  9:53 ` [PATCH v3 net-next 01/12] net: aquantia: PTP skeleton declarations and callbacks Igor Russkikh
2019-10-22  9:53 ` [PATCH v3 net-next 02/12] net: aquantia: unify styling of bit enums Igor Russkikh
2019-10-22  9:53 ` [PATCH v3 net-next 03/12] net: aquantia: add basic ptp_clock callbacks Igor Russkikh
2019-10-24 14:04   ` Richard Cochran [this message]
2019-10-22  9:53 ` [PATCH v3 net-next 04/12] net: aquantia: add PTP rings infrastructure Igor Russkikh
2019-10-23 18:18   ` kbuild test robot
2019-10-22  9:53 ` [PATCH v3 net-next 05/12] net: aquantia: styling fixes on ptp related functions Igor Russkikh
2019-10-22  9:53 ` [PATCH v3 net-next 06/12] net: aquantia: implement data PTP datapath Igor Russkikh
2019-10-23 19:44   ` kbuild test robot
2019-10-22  9:53 ` [PATCH v3 net-next 07/12] net: aquantia: rx filters for ptp Igor Russkikh
2019-10-22  9:53 ` [PATCH v3 net-next 08/12] net: aquantia: add support for ptp ioctls Igor Russkikh
2019-10-22  9:53 ` [PATCH v3 net-next 09/12] net: aquantia: implement get_ts_info ethtool Igor Russkikh
2019-10-22  9:53 ` [PATCH v3 net-next 10/12] net: aquantia: add support for Phy access Igor Russkikh
2019-10-22 12:35   ` Andrew Lunn
2019-10-22  9:53 ` [PATCH v3 net-next 11/12] net: aquantia: add support for PIN funcs Igor Russkikh
2019-10-23 21:15   ` kbuild test robot
2019-10-23 21:15   ` [RFC PATCH] net: aquantia: aq_ptp_poll_sync_work_cb() can be static kbuild test robot
2019-10-24 14:11   ` [PATCH v3 net-next 11/12] net: aquantia: add support for PIN funcs Richard Cochran
2019-10-22  9:53 ` [PATCH v3 net-next 12/12] net: aquantia: adding atlantic ptp maintainer Igor Russkikh
2019-10-24 14:12 ` [PATCH v3 net-next 00/12] net: aquantia: PTP support for AQC devices Richard Cochran
2019-10-24 16:51   ` David Miller
2019-10-25 14:35     ` Igor Russkikh

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=20191024140428.GA1435@localhost \
    --to=richardcochran@gmail.com \
    --cc=Dmitry.Bezrukov@aquantia.com \
    --cc=Igor.Russkikh@aquantia.com \
    --cc=Sergey.Samoilenko@aquantia.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=epomozov@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=sedelhaus@marvell.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).