All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Chris Healy <cphealy@gmail.com>,
	Michal Kubecek <mkubecek@suse.cz>, Andrew Lunn <andrew@lunn.ch>
Subject: [PATCH v3 net-next 0/7] Raw PHY TDR data
Date: Wed, 27 May 2020 00:21:36 +0200	[thread overview]
Message-ID: <20200526222143.793613-1-andrew@lunn.ch> (raw)

Some ethernet PHYs allow access to raw TDR data in addition to summary
diagnostics information. Add support for retrieving this data via
netlink ethtool. The basic structure in the core is the same as for
normal phy diagnostics, the PHY driver simply uses different helpers
to fill the netlink message with different data.

There is a graphical tool under development, as well a ethtool(1)
which can dump the data as text and JSON.

A patched ethtool(1) can be found in
https://github.com/lunn/ethtool.git feature/cable-test-v5

Thanks for Chris Healy for lots of testing.

v2:
See the individual patches but:

Pass distances in centimeters, not meters

Allow the PHY to round distances to what it supports and report what
it actually used along with the results.

Make the Marvell PHY use steps a multiple of 0.805 meters, its native
step size.

v3:
Move the TDR configuration into a structure
Add a range check on step
Use NL_SET_ERR_MSG_ATTR() when appropriate
Move TDR configuration into a nest
Document attributes in the request
Unsquash the last two patches

Andrew Lunn (7):
  net: ethtool: Add attributes for cable test TDR data
  net: ethtool: Add generic parts of cable test TDR
  net: ethtool: Add helpers for cable test TDR data
  net: phy: marvell: Add support for amplitude graph
  net: ethtool: Allow PHY cable test TDR data to configured
  net : phy: marvell: Speedup TDR data retrieval by only changing page
    once
  net: phy: marvell: Configure TDR pulse based on measurement length

 Documentation/networking/ethtool-netlink.rst |  97 +++++++
 drivers/net/phy/marvell.c                    | 285 ++++++++++++++++++-
 drivers/net/phy/nxp-tja11xx.c                |   2 +-
 drivers/net/phy/phy.c                        |  66 ++++-
 include/linux/ethtool_netlink.h              |  25 +-
 include/linux/phy.h                          |  28 ++
 include/uapi/linux/ethtool_netlink.h         |  76 +++++
 net/ethtool/cabletest.c                      | 246 +++++++++++++++-
 net/ethtool/netlink.c                        |   5 +
 net/ethtool/netlink.h                        |   1 +
 10 files changed, 818 insertions(+), 13 deletions(-)

-- 
2.27.0.rc0


             reply	other threads:[~2020-05-26 22:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26 22:21 Andrew Lunn [this message]
2020-05-26 22:21 ` [PATCH v3 net-next 1/7] net: ethtool: Add attributes for cable test TDR data Andrew Lunn
2020-05-26 22:21 ` [PATCH v3 net-next 2/7] net: ethtool: Add generic parts of cable test TDR Andrew Lunn
2020-05-26 22:21 ` [PATCH v3 net-next 3/7] net: ethtool: Add helpers for cable test TDR data Andrew Lunn
2020-05-26 22:21 ` [PATCH v3 net-next 4/7] net: phy: marvell: Add support for amplitude graph Andrew Lunn
2020-05-26 22:21 ` [PATCH v3 net-next 5/7] net: ethtool: Allow PHY cable test TDR data to configured Andrew Lunn
2020-05-26 22:21 ` [PATCH v3 net-next 6/7] net : phy: marvell: Speedup TDR data retrieval by only changing page once Andrew Lunn
2020-05-26 22:21 ` [PATCH v3 net-next 7/7] net: phy: marvell: Configure TDR pulse based on measurement length Andrew Lunn
2020-05-27  6:22 ` [PATCH v3 net-next 0/7] Raw PHY TDR data 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=20200526222143.793613-1-andrew@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=cphealy@gmail.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=mkubecek@suse.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.