Skip to content

net: phy: Add ability to debug RGMII

Florian Fainelli lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesIn review
  2. v12 patches 14 repliesSuperseded

Changes in v2 from the cover letter

- differenciate c22 vs. c45 PHYs in phy_loopback()
- print SKB length mismatch
- check that link comes back up between each iteration since we go in and out of loopback mode
- prevent NPD by checking attached_dev later
- moved check for af_packet_priv earlier

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: phy: Use genphy_loopback() by defaultdrivers/net/phy/phy_device.c+3 -11 reply
2/2net: phy: Add ability to debug RGMII connectionsDocumentation/ABI/testing/sysfs-class-net-phydev drivers/net/phy/Kconfig drivers/net/phy/Makefile +3 more+345 -02 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchAndrew Lunn
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net-next v2 0/2] net: phy: Add ability to debug RGMII

Hi all,

This patch series is primarily intended to reduce the amount of support involved with bringing up RGMII connections with the PHY library (or PHYLINK) for that matter. The idea consists in looping back a packet we just crafted and check whether it did came back correctly, if that is the case, we are good, else we must try configuring the PHY for different delays until it either works or we bail out.

As indicated in the commit message, future improvements could probably be done in order to converge faster on the appropriate configuration. This is intended to be PHY centric, and we are not playing with delays on the MAC side other than through the parsing of the phydev->interface.

The typical output would look like this:

[   62.668701] bcmgenet 8f00000.ethernet eth0: Trying "rgmii-txid" PHY
interface
[   62.676094] bcmgenet 8f00000.ethernet eth0: Determined "rgmii-txid"

to be correct

Feedback highly welcome on this!

Changes in v2:

- differenciate c22 vs. c45 PHYs in phy_loopback()
- print SKB length mismatch
- check that link comes back up between each iteration since we go in and out of loopback mode
- prevent NPD by checking attached_dev later
- moved check for af_packet_priv earlier

Florian Fainelli (2):
net: phy: Use genphy_loopback() by default
net: phy: Add ability to debug RGMII connections

 .../ABI/testing/sysfs-class-net-phydev        |  11 +
 drivers/net/phy/Kconfig                       |   9 +
 drivers/net/phy/Makefile                      |   1 +
 drivers/net/phy/phy-rgmii-debug.c             | 284 ++++++++++++++++++
 drivers/net/phy/phy_device.c                  |  35 ++-
 include/linux/phy.h                           |   9 +
 6 files changed, 348 insertions(+), 1 deletion(-)
 create mode 100644 drivers/net/phy/phy-rgmii-debug.c
Signature · 1 line
2.17.1