devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>,
	devicetree@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Miroslav Lichvar <mlichvar@redhat.com>,
	Murali Karicheri <m-karicheri2@ti.com>,
	Rob Herring <robh+dt@kernel.org>,
	Willem de Bruijn <willemb@google.com>,
	Wingman Kwok <w-kwok2@ti.com>
Subject: [PATCH V9 net-next 00/12] Peer to Peer One-Step time stamping
Date: Wed, 25 Dec 2019 18:16:08 -0800	[thread overview]
Message-ID: <cover.1577326042.git.richardcochran@gmail.com> (raw)

This series adds support for PTP (IEEE 1588) P2P one-step time
stamping along with a driver for a hardware device that supports this.

If the hardware supports p2p one-step, it subtracts the ingress time
stamp value from the Pdelay_Request correction field.  The user space
software stack then simply copies the correction field into the
Pdelay_Response, and on transmission the hardware adds the egress time
stamp into the correction field.

This new functionality extends CONFIG_NETWORK_PHY_TIMESTAMPING to
cover MII snooping devices, but it still depends on phylib, just as
that option does.  Expanding beyond phylib is not within the scope of
the this series.

User space support is available in the current linuxptp master branch.

- Patch 1 adds phy_device methods for existing time stamping fields.
- Patches 2-5 convert the stack and drivers to the new methods.
- Patch 6 moves code around the dp83640 driver.
- Patches 7-10 add support for MII time stamping in non-PHY devices.
- Patch 11 adds the new P2P 1-step option.
- Patch 12 adds a driver implementing the new option.

Thanks,
Richard

Changed in v9:
~~~~~~~~~~~~~~

- Fix two more drivers' switch/case blocks WRT the new HWTSTAMP ioctl.
- Picked up two more review tags from Andrew.

Changed in v8:
~~~~~~~~~~~~~~

- Avoided adding forward functional declarations in the dp83640 driver.
- Picked up Florian's new review tags and another one from Andrew.

Changed in v7:
~~~~~~~~~~~~~~

- Converted pr_debug|err to dev_ variants in new driver.
- Fixed device tree documentation per Rob's v6 review.
- Picked up Andrew's and Rob's review tags.
- Silenced sparse warnings in new driver.

Changed in v6:
~~~~~~~~~~~~~~

- Added methods for accessing the phy_device time stamping fields.
- Adjust the device tree documentation per Rob's v5 review.
- Fixed the build failures due to missing exports.

Changed in v5:
~~~~~~~~~~~~~~

- Fixed build failure in macvlan.
- Fixed latent bug with its gcc warning in the driver.

Changed in v4:
~~~~~~~~~~~~~~

- Correct error paths and PTR_ERR return values in the framework.
- Expanded KernelDoc comments WRT PHY locking.
- Pick up Andrew's review tag.

Changed in v3:
~~~~~~~~~~~~~~

- Simplify the device tree binding and document the time stamping
  phandle by itself.

Changed in v2:
~~~~~~~~~~~~~~

- Per the v1 review, changed the modeling of MII time stamping
  devices.  They are no longer a kind of mdio device.

Richard Cochran (12):
  net: phy: Introduce helper functions for time stamping support.
  net: macvlan: Use the PHY time stamping interface.
  net: vlan: Use the PHY time stamping interface.
  net: ethtool: Use the PHY time stamping interface.
  net: netcp_ethss: Use the PHY time stamping interface.
  net: phy: dp83640: Move the probe and remove methods around.
  net: Introduce a new MII time stamping interface.
  net: Add a layer for non-PHY MII time stamping drivers.
  dt-bindings: ptp: Introduce MII time stamping devices.
  net: mdio: of: Register discovered MII time stampers.
  net: Introduce peer to peer one step PTP time stamping.
  ptp: Add a driver for InES time stamping IP core.

 .../devicetree/bindings/ptp/ptp-ines.txt      |  35 +
 .../devicetree/bindings/ptp/timestamper.txt   |  42 +
 .../net/ethernet/broadcom/bnx2x/bnx2x_main.c  |   1 +
 .../ethernet/mellanox/mlxsw/spectrum_ptp.c    |   1 +
 drivers/net/ethernet/microchip/lan743x_ptp.c  |   3 +
 drivers/net/ethernet/qlogic/qede/qede_ptp.c   |   1 +
 drivers/net/ethernet/ti/netcp_ethss.c         |   8 +-
 drivers/net/macvlan.c                         |   4 +-
 drivers/net/phy/Makefile                      |   2 +
 drivers/net/phy/dp83640.c                     | 217 ++---
 drivers/net/phy/mii_timestamper.c             | 125 +++
 drivers/net/phy/phy.c                         |   4 +-
 drivers/net/phy/phy_device.c                  |   5 +
 drivers/of/of_mdio.c                          |  30 +-
 drivers/ptp/Kconfig                           |  10 +
 drivers/ptp/Makefile                          |   1 +
 drivers/ptp/ptp_ines.c                        | 852 ++++++++++++++++++
 include/linux/mii_timestamper.h               | 121 +++
 include/linux/phy.h                           |  85 +-
 include/uapi/linux/net_tstamp.h               |   8 +
 net/8021q/vlan_dev.c                          |   4 +-
 net/Kconfig                                   |   7 +-
 net/core/dev_ioctl.c                          |   1 +
 net/core/timestamping.c                       |  20 +-
 net/ethtool/ioctl.c                           |   4 +-
 25 files changed, 1437 insertions(+), 154 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/ptp/ptp-ines.txt
 create mode 100644 Documentation/devicetree/bindings/ptp/timestamper.txt
 create mode 100644 drivers/net/phy/mii_timestamper.c
 create mode 100644 drivers/ptp/ptp_ines.c
 create mode 100644 include/linux/mii_timestamper.h

-- 
2.20.1


             reply	other threads:[~2019-12-26  2:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-26  2:16 Richard Cochran [this message]
2019-12-26  2:16 ` [PATCH V9 net-next 01/12] net: phy: Introduce helper functions for time stamping support Richard Cochran
2019-12-26  2:16 ` [PATCH V9 net-next 02/12] net: macvlan: Use the PHY time stamping interface Richard Cochran
2019-12-26  2:16 ` [PATCH V9 net-next 03/12] net: vlan: " Richard Cochran
2019-12-26  2:16 ` [PATCH V9 net-next 04/12] net: ethtool: " Richard Cochran
2019-12-26  2:16 ` [PATCH V9 net-next 05/12] net: netcp_ethss: " Richard Cochran
2019-12-26  2:16 ` [PATCH V9 net-next 06/12] net: phy: dp83640: Move the probe and remove methods around Richard Cochran
2019-12-26  2:16 ` [PATCH V9 net-next 07/12] net: Introduce a new MII time stamping interface Richard Cochran
2019-12-26  2:16 ` [PATCH V9 net-next 08/12] net: Add a layer for non-PHY MII time stamping drivers Richard Cochran
2019-12-26  2:16 ` [PATCH V9 net-next 09/12] dt-bindings: ptp: Introduce MII time stamping devices Richard Cochran
2019-12-26 22:58   ` Rob Herring
2019-12-26  2:16 ` [PATCH V9 net-next 10/12] net: mdio: of: Register discovered MII time stampers Richard Cochran
2019-12-26  2:16 ` [PATCH V9 net-next 11/12] net: Introduce peer to peer one step PTP time stamping Richard Cochran
2019-12-26  2:16 ` [PATCH V9 net-next 12/12] ptp: Add a driver for InES time stamping IP core Richard Cochran
2019-12-26  3:51 ` [PATCH V9 net-next 00/12] Peer to Peer One-Step time stamping David Miller

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=cover.1577326042.git.richardcochran@gmail.com \
    --to=richardcochran@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=jacob.e.keller@intel.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=m-karicheri2@ti.com \
    --cc=mark.rutland@arm.com \
    --cc=mlichvar@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=w-kwok2@ti.com \
    --cc=willemb@google.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).