All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC net-next 0/5] Support for PHY test modes
@ 2018-04-28  0:32 Florian Fainelli
  2018-04-28  0:32 ` [RFC net-next 1/5] net: phy: Pass stringset argument to ethtool operations Florian Fainelli
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Florian Fainelli @ 2018-04-28  0:32 UTC (permalink / raw)
  To: netdev
  Cc: Florian Fainelli, Andrew Lunn, Russell King, open list, davem,
	cphealy, nikita.yoush, vivien.didelot, Nisar.Sayed,
	UNGLinuxDriver

Hi all,

This patch series adds support for specifying PHY test modes through ethtool
and paves the ground for adding support for more complex test modes that might
require data to be exchanged between user and kernel space.

As an example, patches are included to add support for the IEEE electrical test
modes for 100BaseT2 and 1000BaseT. Those do not require data to be passed back
and forth.

I believe the infrastructure to be usable enough to add support for other things
like:

- cable diagnostics
- pattern generator/waveform generator with specific pattern being indicated
  for instance

Questions for Andrew, and others:

- there could be room for adding additional ETH_TEST_FL_* values in order to
  help determine how the test should be running
- some of these tests can be disruptive to connectivity, the minimum we could
  do is stop the PHY state machine and restart it when "normal" is used to exit
  those test modes

Comments welcome!

Example:

# ethtool --get-phy-tests gphy
PHY tests gphy:
     normal (Test data: No)
     100baseT2-tx-waveform (Test data: No)
     100baseT2-tx-jitter (Test data: No)
     100baseT2-tx-idle (Test data: No)
     1000baseT-tx-waveform (Test data: No)
     1000baseT-tx-jitter-master (Test data: No)
     1000baseT-tx-jitter-slave (Test data: No)
     1000BaseT-tx-distorsion (Test data: No)
# ethtool --set-phy-test gphy 100baseT2-tx-waveform
# [   65.262513] brcm-sf2 f0b00000.ethernet_switch gphy: Link is Down


Florian Fainelli (5):
  net: phy: Pass stringset argument to ethtool operations
  net: ethtool: Add UAPI for PHY test modes
  net: ethtool: Add plumbing to get/set PHY test modes
  net: phy: Add support for IEEE standard test modes
  net: phy: broadcom: Add support for PHY test modes

 drivers/net/dsa/b53/b53_common.c |   4 +-
 drivers/net/phy/Kconfig          |   6 ++
 drivers/net/phy/Makefile         |   4 +-
 drivers/net/phy/bcm-phy-lib.c    |  21 ++++--
 drivers/net/phy/bcm-phy-lib.h    |   4 +-
 drivers/net/phy/bcm7xxx.c        |   9 ++-
 drivers/net/phy/broadcom.c       |   6 +-
 drivers/net/phy/marvell.c        |  11 ++-
 drivers/net/phy/micrel.c         |  11 ++-
 drivers/net/phy/phy-tests.c      | 159 +++++++++++++++++++++++++++++++++++++++
 drivers/net/phy/smsc.c           |  10 ++-
 include/linux/phy.h              |  99 +++++++++++++++++++++---
 include/net/dsa.h                |   4 +-
 include/uapi/linux/ethtool.h     |  23 ++++++
 net/core/ethtool.c               |  86 +++++++++++++++++++--
 net/dsa/master.c                 |   9 ++-
 net/dsa/port.c                   |   8 +-
 17 files changed, 427 insertions(+), 47 deletions(-)
 create mode 100644 drivers/net/phy/phy-tests.c

-- 
2.14.1

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

end of thread, other threads:[~2023-08-17 17:30 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-28  0:32 [RFC net-next 0/5] Support for PHY test modes Florian Fainelli
2018-04-28  0:32 ` [RFC net-next 1/5] net: phy: Pass stringset argument to ethtool operations Florian Fainelli
2018-04-28  0:32 ` [RFC net-next 2/5] net: ethtool: Add UAPI for PHY test modes Florian Fainelli
2018-04-28  0:32 ` [RFC net-next 3/5] net: ethtool: Add plumbing to get/set " Florian Fainelli
2018-04-28  0:32 ` [RFC net-next 4/5] net: phy: Add support for IEEE standard " Florian Fainelli
2018-04-30 23:20   ` Andrew Lunn
2018-05-01 17:03     ` Florian Fainelli
2018-05-01 17:29   ` Woojung.Huh
2018-05-01 18:43     ` Florian Fainelli
2018-05-01 20:07       ` Woojung.Huh
2018-05-01 20:51         ` Florian Fainelli
2018-05-07  0:02           ` Woojung.Huh
2018-04-28  0:32 ` [RFC net-next 5/5] net: phy: broadcom: Add support for PHY " Florian Fainelli
2018-04-28  0:32 ` [PATCH ethtool 1/2] ethtool-copy.h: Sync with net-next Florian Fainelli
2018-04-28  0:32 ` [PATCH ethtool 2/2] ethtool: Add support for PHY test modes Florian Fainelli
2023-08-17 17:29   ` Sverdlin, Alexander
2018-04-30  2:55 ` [RFC net-next 0/5] Support " David Miller
2018-04-30 16:30   ` Florian Fainelli
2018-04-30 16:40     ` Andrew Lunn
2018-04-30 19:23       ` Florian Fainelli
2018-04-30 23:24     ` Andrew Lunn
2018-05-01 17:21       ` Florian Fainelli
2018-05-01 17:47         ` Andrew Lunn
2018-05-01 18:27           ` Florian Fainelli
2018-05-01 19:59             ` Andrew Lunn
2018-05-01 18:06         ` David Miller

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.