From: Richard Cochran <richardcochran@gmail.com>
To: Sudarsana Kalluru <Sudarsana.Kalluru@cavium.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, Yuval.Mintz@cavium.com
Subject: Re: [PATCH net-next v2 2/2] qede: Add driver support for PTP.
Date: Sun, 29 Jan 2017 16:35:36 +0100 [thread overview]
Message-ID: <20170129153536.GD2223@localhost.localdomain> (raw)
In-Reply-To: <1485674903-27689-3-git-send-email-Sudarsana.Kalluru@cavium.com>
On Sat, Jan 28, 2017 at 11:28:23PM -0800, Sudarsana Kalluru wrote:
> +/**
> + * qede_ptp_adjfreq
> + * @ptp: the ptp clock structure
> + * @ppb: parts per billion adjustment from base
> + *
> + * Adjust the frequency of the ptp cycle counter by the
> + * indicated ppb from the base frequency.
> + */
> +static int qede_ptp_adjfreq(struct ptp_clock_info *info, s32 ppb)
> +{
> + struct qede_ptp *ptp = container_of(info, struct qede_ptp, clock_info);
> + struct qede_dev *edev = ptp->edev;
> + int rc;
> +
> + __qede_lock(edev);
> + if (edev->state == QEDE_STATE_OPEN) {
> + spin_lock_bh(&ptp->lock);
> + rc = ptp->ops->adjfreq(edev->cdev, ppb);
Why add this extra layer of indirection?
You could put these this test into qed_ptp_hw_adjfreq() and register
that function directly.
> + spin_unlock_bh(&ptp->lock);
> + } else {
> + DP_ERR(edev, "PTP adjfreq called while interface is down\n");
> + return -EFAULT;
> + }
> + __qede_unlock(edev);
> +
> + return rc;
> +}
Thanks,
Richard
next prev parent reply other threads:[~2017-01-29 15:35 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-29 7:28 [PATCH net-next v2 0/2] qed*: Add support for PTP Sudarsana Kalluru
2017-01-29 7:28 ` [PATCH net-next v2 1/2] qed: Add infrastructure for PTP support Sudarsana Kalluru
2017-01-29 8:32 ` kbuild test robot
2017-01-29 15:28 ` Richard Cochran
2017-01-29 15:31 ` Richard Cochran
2017-01-29 17:26 ` Mintz, Yuval
2017-01-29 20:51 ` Richard Cochran
2017-01-29 21:36 ` Mintz, Yuval
2017-01-30 13:26 ` Richard Cochran
2017-01-30 18:00 ` Mintz, Yuval
2017-01-29 7:28 ` [PATCH net-next v2 2/2] qede: Add driver support for PTP Sudarsana Kalluru
2017-01-29 15:35 ` Richard Cochran [this message]
2017-01-29 17:30 ` Mintz, Yuval
2017-01-29 21:02 ` Richard Cochran
2017-01-29 21:40 ` Mintz, Yuval
2017-01-30 14:34 ` David Laight
2017-01-30 17:55 ` Mintz, Yuval
2017-01-31 10:03 ` David Laight
2017-01-31 14:31 ` Mintz, Yuval
2017-01-31 14:53 ` Richard Cochran
2017-01-31 15:08 ` Mintz, Yuval
2017-01-31 17:43 ` Richard Cochran
2017-01-29 15:09 ` [PATCH net-next v2 0/2] qed*: Add " Richard Cochran
2017-01-29 17:23 ` Mintz, Yuval
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=20170129153536.GD2223@localhost.localdomain \
--to=richardcochran@gmail.com \
--cc=Sudarsana.Kalluru@cavium.com \
--cc=Yuval.Mintz@cavium.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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).