linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Richard Cochran <richardcochran@gmail.com>
Cc: netdev@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org,
	Krzysztof Halasa <khc@pm.waw.pl>
Subject: Re: [PATCH 03/12] phylib: add a driver method for the SIOCSHWTSTAMP ioctl.
Date: Tue, 15 Jun 2010 10:27:59 -0600	[thread overview]
Message-ID: <AANLkTiml5FyHstY-0ZPHxFDvA349BZv3TeX9gXtURFFN@mail.gmail.com> (raw)
In-Reply-To: <77fe18d640e35dcbfad1e117a4321f935500d5ac.1276615626.git.richard.cochran@omicron.at>

On Tue, Jun 15, 2010 at 10:08 AM, Richard Cochran
<richardcochran@gmail.com> wrote:
> This patch adds a phy driver method for configuring hardware time stampin=
g.
> Drivers may optionally implement this function.
>
> Signed-off-by: Richard Cochran <richard.cochran@omicron.at>

Adding an ioctl to the userspace ABI.  Make sure you cc: linux-kernel
on the next spin of this series.

g.

> ---
> =A0drivers/net/phy/phy.c | =A0 =A05 +++++
> =A0include/linux/phy.h =A0 | =A0 =A03 +++
> =A02 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index bd88d81..5130db8 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -361,6 +361,11 @@ int phy_mii_ioctl(struct phy_device *phydev,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break;
>
> + =A0 =A0 =A0 case SIOCSHWTSTAMP:
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (phydev->drv->hwtstamp)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return phydev->drv->hwtstam=
p(phydev, ifr);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* fall through */
> +
> =A0 =A0 =A0 =A0default:
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return -EOPNOTSUPP;
> =A0 =A0 =A0 =A0}
> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index d63736a..a5e9df1 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -402,6 +402,9 @@ struct phy_driver {
> =A0 =A0 =A0 =A0/* Clears up any memory if needed */
> =A0 =A0 =A0 =A0void (*remove)(struct phy_device *phydev);
>
> + =A0 =A0 =A0 /* Handles SIOCSHWTSTAMP ioctl for hardware time stamping. =
*/
> + =A0 =A0 =A0 int (*hwtstamp)(struct phy_device *phydev, struct ifreq *if=
r);
> +
> =A0 =A0 =A0 =A0struct device_driver driver;
> =A0};
> =A0#define to_phy_driver(d) container_of(d, struct phy_driver, driver)
> --
> 1.6.3.3
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>



--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

  reply	other threads:[~2010-06-15 16:27 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-15 16:06 [PATCH v4 00/12] ptp: IEEE 1588 clock support Richard Cochran
2010-06-15 16:07 ` [PATCH 01/12] phylib: preserve ifreq parameter when calling generic phy_mii_ioctl() Richard Cochran
2010-06-15 16:07 ` [PATCH 02/12] phylib: do not filter phy_mii_ioctl() Richard Cochran
2010-06-15 16:26   ` Grant Likely
2010-06-15 16:08 ` [PATCH 03/12] phylib: add a driver method for the SIOCSHWTSTAMP ioctl Richard Cochran
2010-06-15 16:27   ` Grant Likely [this message]
2010-06-15 16:34     ` Richard Cochran
2010-06-15 16:49       ` Grant Likely
2010-06-15 16:53         ` Grant Likely
2010-06-15 16:08 ` [PATCH 04/12] phylib: add a way to make PHY time stamps possible Richard Cochran
2010-06-15 16:33   ` Grant Likely
2010-06-16  5:40     ` Richard Cochran
2010-06-16  6:29   ` Richard Cochran
2010-06-17  1:03   ` David Miller
2010-06-15 16:08 ` [PATCH 05/12] phylib: Allow reading and writing a mii bus from atomic context Richard Cochran
2010-06-15 16:43   ` Grant Likely
2010-06-15 17:08     ` Richard Cochran
2010-06-15 18:29       ` Grant Likely
2010-06-16  6:20         ` Richard Cochran
2010-06-15 16:09 ` [PATCH 06/12] ptp: add a BPF to help drivers detect PTP packets Richard Cochran
2010-06-15 16:09 ` [PATCH 07/12] phylib: support the National Semiconductor DP83640 PHY Richard Cochran
2010-06-15 16:09 ` [PATCH 08/12] ptp: Added a brand new class driver for ptp clocks Richard Cochran
2010-06-15 17:00   ` Grant Likely
2010-06-16 14:22     ` Richard Cochran
2010-06-15 19:11   ` Grant Likely
2010-08-13  9:34     ` Richard Cochran
2010-08-13 23:54       ` Grant Likely
2010-06-15 16:09 ` [PATCH 09/12] ptp: Added a clock that uses the Linux system time Richard Cochran
2010-06-15 16:10 ` [PATCH 10/12] ptp: Added a clock that uses the eTSEC found on the MPC85xx Richard Cochran
2010-06-15 17:20   ` Grant Likely
2010-06-16  6:45     ` Richard Cochran
2010-06-15 16:10 ` [PATCH 11/12] ptp: Added a clock driver for the IXP46x Richard Cochran
2010-06-15 18:41   ` Grant Likely
2010-06-16  6:54     ` Richard Cochran
2010-06-15 16:10 ` [PATCH 12/12] ptp: Added a clock driver for the National Semiconductor PHYTER Richard Cochran
2010-06-15 18:49   ` Grant Likely
2010-06-16 10:05     ` Richard Cochran
2010-06-16 15:10       ` Grant Likely

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=AANLkTiml5FyHstY-0ZPHxFDvA349BZv3TeX9gXtURFFN@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=khc@pm.waw.pl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.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).