All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v4 00/10] Ethernet Cable test support
@ 2020-05-10 19:12 Andrew Lunn
  2020-05-10 19:12 ` [PATCH net-next v4 01/10] net: phy: Add cable test support to state machine Andrew Lunn
                   ` (11 more replies)
  0 siblings, 12 replies; 18+ messages in thread
From: Andrew Lunn @ 2020-05-10 19:12 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, Florian Fainelli, Heiner Kallweit, Chris Healy,
	Michal Kubecek, Andrew Lunn

any copper Ethernet PHY have support for performing diagnostics of
the cable. Are the cable shorted, broken, not plugged into anything at
the other end? And they can report roughly how far along the cable any
fault is.

Add infrastructure in ethtool and phylib support for triggering a
cable test and reporting the results. The Marvell 1G PHY driver is
then extended to make use of this infrastructure.

For testing, a modified ethtool(1) can be found here:
https://github.com/lunn/ethtool.git feature/cable-test-v4. This also
contains extra code for TDR dump, which will be added to the kernel in
a later patch series.

Thanks to Chris Healy for extensive testing.

v2:
See individual patches but:

Remove _REPLY messages
Change length into a u32
Grammar fixes
Rename functions for consistency
Extack for cable test already running
Remove ethnl_cable_test_act_ops
Add status attributes
Rename pairs from numbers to letters

v3:

See individual patches but:
Remove ETHTOOL_MSG_CABLE_TEST_ACT_REPLY from documentation
Remove unused cable_test_get_policy
Fixed example in document
Add ETHTOOL_A_CABLE_NEST_* enum
Add ETHTOOL_MSG_CABLE_TEST_NTF to documentation
Poison phydev->skb
Return -EMSGSIZE when ethnl_bcastmsg_put() fails
Return valid error code when nla_nest_start() fails
Use u8 for results
Actually put u32 length into message
s/mavell/marvell/g
Remove include of <uapi/linux/ethtool_netlink.h>
EMSGSIZE when ethnl_bcastmsg_put() fails
Print an error message on failure, since this is a void function.

v4:
See individual patches but:
Remove unwanted blank line
ENOTSUPP->EOPNOTSUPP
Move EINVAL->EMSGSIZE fix to correct patch

Andrew Lunn (10):
  net: phy: Add cable test support to state machine
  net: phy: Add support for polling cable test
  net: ethtool: netlink: Add support for triggering a cable test
  net: ethtool: Add attributes for cable test reports
  net: ethtool: Make helpers public
  net: ethtool: Add infrastructure for reporting cable test results
  net: ethtool: Add helpers for reporting test results
  net: phy: marvell: Add cable test support
  net: phy: Put interface into oper testing during cable test
  net: phy: Send notifier when starting the cable test

 Documentation/networking/ethtool-netlink.rst |  57 +++++-
 drivers/net/phy/marvell.c                    | 201 +++++++++++++++++++
 drivers/net/phy/phy.c                        | 106 ++++++++++
 include/linux/ethtool_netlink.h              |  33 +++
 include/linux/phy.h                          |  42 ++++
 include/uapi/linux/ethtool_netlink.h         |  71 +++++++
 net/Kconfig                                  |   1 +
 net/ethtool/Makefile                         |   2 +-
 net/ethtool/cabletest.c                      | 201 +++++++++++++++++++
 net/ethtool/netlink.c                        |   9 +-
 net/ethtool/netlink.h                        |   3 +
 11 files changed, 722 insertions(+), 4 deletions(-)
 create mode 100644 net/ethtool/cabletest.c

-- 
2.26.2


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-07-02  1:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-10 19:12 [PATCH net-next v4 00/10] Ethernet Cable test support Andrew Lunn
2020-05-10 19:12 ` [PATCH net-next v4 01/10] net: phy: Add cable test support to state machine Andrew Lunn
2020-05-10 19:12 ` [PATCH net-next v4 1/1] net: phy: Send notifier when starting the cable test Andrew Lunn
2020-05-10 19:17   ` Andrew Lunn
2020-05-10 19:12 ` [PATCH net-next v4 02/10] net: phy: Add support for polling " Andrew Lunn
2020-05-10 19:12 ` [PATCH net-next v4 03/10] net: ethtool: netlink: Add support for triggering a " Andrew Lunn
2020-07-01 22:56   ` Jakub Kicinski
2020-07-01 23:00     ` David Miller
2020-07-02  0:26       ` Florian Fainelli
2020-07-02  1:06         ` David Miller
2020-05-10 19:12 ` [PATCH net-next v4 04/10] net: ethtool: Add attributes for cable test reports Andrew Lunn
2020-05-10 19:12 ` [PATCH net-next v4 05/10] net: ethtool: Make helpers public Andrew Lunn
2020-05-10 19:12 ` [PATCH net-next v4 06/10] net: ethtool: Add infrastructure for reporting cable test results Andrew Lunn
2020-05-10 19:12 ` [PATCH net-next v4 07/10] net: ethtool: Add helpers for reporting " Andrew Lunn
2020-05-10 19:12 ` [PATCH net-next v4 08/10] net: phy: marvell: Add cable test support Andrew Lunn
2020-05-10 19:12 ` [PATCH net-next v4 09/10] net: phy: Put interface into oper testing during cable test Andrew Lunn
2020-05-10 19:12 ` [PATCH net-next v4 10/10] net: phy: Send notifier when starting the " Andrew Lunn
2020-05-10 19:35 ` [PATCH net-next v4 00/10] Ethernet Cable test support Jakub Kicinski

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.