All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 00/13] Ethernet PHY cable test support
@ 2019-06-12 16:05 Andrew Lunn
  2019-06-12 16:05 ` [PATCH RFC 01/13] net: phy: Add cable test support to state machine Andrew Lunn
                   ` (14 more replies)
  0 siblings, 15 replies; 19+ messages in thread
From: Andrew Lunn @ 2019-06-12 16:05 UTC (permalink / raw)
  To: netdev; +Cc: Florian Fainelli, Heiner Kallweit, Raju.Lakkaraju, Andrew Lunn

This patchset adds support for executing Ethernet PHY cable tests and
reporting the results back to user space. The Marvell PHY driver has
been extended so some of its cable test features can be used.

It builds upon the work of Michal Kubecek adding a netlink version of
ethtool. As such, that work needs to be merged first. However, with
Microchip posting their cable test work, i thought it a good idea to
post what i have.

A few examples:

./ethtool --cable-test lan6
Cable test for device lan6.
Pair: 0, result: OK
Pair: 1, result: OK
Pair: 2, result: OK
Pair: 3, result: OK

./ethtool --cable-test lan2
Cable test for device lan2.
Pair: 0, result: Open Circuit
Pair: 1, result: Open Circuit
Pair: 2, result: Open Circuit
Pair: 3, result: Open Circuit
Pair: 0, fault length: 14.40m
Pair: 1, fault length: 15.20m
Pair: 2, fault length: 14.40m
Pair: 3, fault length: 15.20m

./ethtool --cable-test lan5
Cable test for device lan5.
Pair: 0, result: OK
Pair: 1, result: OK
Pair: 2, result: Short within Pair
Pair: 3, result: Short within Pair
Pair: 2, fault length: 1.60m
Pair: 3, fault length: 0.80m

./ethtool --cable-test lan2 amplitude-graph
Cable test for device lan2.
Cable test Pulse: 1000mV
  Distance     Pair 0     Pair 1     Pair 2     Pair 3
         0       109         85         39         62
         1       -15         46         -7         31
         2         7          0          0         -7
         3         7          7          0         15
         4        15          7          7         15
         5        23          0          0          7
         6        15          0          0          7
         7        23          0          0          0
         8         7          0          0          7
         9         0          0          0          0
        10         0          0          0          0
        11         0          0          0          7
        12        -7          0          0          0
        13        -7          0         31          7
        14       359        140        273          7
        15       523        523        609        515
        16       601        570        632        585
        17       640        617        648        625
        18       562        625        179        640
        19       109        265         78        148
        20        85         93         70         70
        21        54         54         39         54
        22        46         46         31         39
        23        39         31         23         31
        24        15         23         15         23
        25         7         15         15         15
        26         0         15          7         15
        27         0          7          7          7
        28         0          7          7          7
        29         0          7          7          0
        30         7          0          7          0
        31         7          7          7          0
        32        -7          0        -23          7
        33       -15        -31        -39        -15
        34       -31        -39        -46        -23
        35       -39        -46        -39        -23
        36       -39        -46        -31        -39
        37       -23        -23        -23        -23
        38       -23        -23        -15        -15
        39       -15        -23        -15        -15


Andrew Lunn (13):
  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 Properties for cable test reports.
  net: ethtool: Make helpers public
  net: phy: Add infrastructure for reporting cable test results
  net: phy: cable test: Use request seq in broadcast reply
  net: phy: Add helpers for reporting test results
  net: phy: marvell: Add cable test support
  net: phy: Allow options to be passed to the cable test
  net: phy: Add helpers and attributes for amplitude graph
  net: phy: marvell: Add support for amplitude graph
  net: phy: Put interface into oper testing during cable test

 drivers/net/phy/Kconfig              |   1 +
 drivers/net/phy/marvell.c            | 374 +++++++++++++++++++++++++++
 drivers/net/phy/phy.c                | 215 +++++++++++++++
 include/linux/ethtool_netlink.h      |  12 +
 include/linux/phy.h                  |  49 ++++
 include/uapi/linux/ethtool_netlink.h |  87 +++++++
 net/ethtool/actions.c                |  84 ++++++
 net/ethtool/netlink.c                |  14 +-
 net/ethtool/netlink.h                |   7 +-
 9 files changed, 838 insertions(+), 5 deletions(-)

-- 
2.20.1


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

end of thread, other threads:[~2019-06-14  0:01 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-12 16:05 [PATCH RFC 00/13] Ethernet PHY cable test support Andrew Lunn
2019-06-12 16:05 ` [PATCH RFC 01/13] net: phy: Add cable test support to state machine Andrew Lunn
2019-06-12 16:05 ` [PATCH RFC 02/13] net: phy: Add support for polling cable test Andrew Lunn
2019-06-12 16:05 ` [PATCH RFC 03/13] net: ethtool: netlink: Add support for triggering a " Andrew Lunn
2019-06-12 16:05 ` [PATCH RFC 04/13] net: ethtool: Add Properties for cable test reports Andrew Lunn
2019-06-12 16:05 ` [PATCH RFC 05/13] net: ethtool: Make helpers public Andrew Lunn
2019-06-12 16:05 ` [PATCH RFC 06/13] net: phy: Add infrastructure for reporting cable test results Andrew Lunn
2019-06-12 16:05 ` [PATCH RFC 07/13] net: phy: cable test: Use request seq in broadcast reply Andrew Lunn
2019-06-12 16:05 ` [PATCH RFC 08/13] net: phy: Add helpers for reporting test results Andrew Lunn
2019-06-12 16:05 ` [PATCH RFC 09/13] net: phy: marvell: Add cable test support Andrew Lunn
2019-06-13  3:08   ` Florian Fainelli
2019-06-12 16:05 ` [PATCH RFC 10/13] net: phy: Allow options to be passed to the cable test Andrew Lunn
2019-06-12 16:05 ` [PATCH RFC 11/13] net: phy: Add helpers and attributes for amplitude graph Andrew Lunn
2019-06-12 16:05 ` [PATCH RFC 12/13] net: phy: marvell: Add support " Andrew Lunn
2019-06-12 16:05 ` [PATCH RFC 13/13] net: phy: Put interface into oper testing during cable test Andrew Lunn
2019-06-13  9:58 ` [PATCH RFC 00/13] Ethernet PHY cable test support Raju Lakkaraju
2019-06-13 13:06   ` Andrew Lunn
2019-06-14  0:01   ` Andrew Lunn
2019-06-13 11:31 ` Raju Lakkaraju

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.