Skip to content

net: phy: microchip: add downshift support for LAN88xx

Nicolai Buchwitz lkml netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 2 repliesApplied 2/2
  2. v22 patches 7 repliesSuperseded
  3. v12 patches 4 repliesSuperseded

Changes in v3 from the cover letter

- Store downshift count in priv struct and restore in config_init to preserve user settings across suspend/resume (Russell King)

Patches in v3 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net: phy: microchip: add downshift tunable support for LAN88xxdrivers/net/phy/microchip.c include/linux/microchipphy.h+69 -00 repliesApplied
2/2net: phy: microchip: enable downshift by default on LAN88xxdrivers/net/phy/microchip.c+15 -20 repliesApplied

Reviews trailers per patch

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

PatchAndrew LunnRussell King (Oracle)
1/2R-b R-b
2/2

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

Read the v3 thread

Cover letter [PATCH net-next v3 0/2] net: phy: microchip: add downshift support for LAN88xx

Add standard ETHTOOL_PHY_DOWNSHIFT tunable support for the Microchip LAN88xx PHY, following the same pattern used by Marvell and other PHY drivers.

Ethernet cables with faulty or missing pairs (specifically C and D) can successfully auto-negotiate 1000BASE-T but fail to establish a stable link. The LAN88xx PHY supports automatic downshift to 100BASE-TX after a configurable number of failed attempts (2-5).

Patch 1 adds the get/set tunable implementation.
Patch 2 enables downshift by default with a count of 2. The setting is stored in the driver's private data so that user changes via ethtool are preserved across suspend/resume cycles.

Based on an earlier downstream implementation by Phil Elwell.

Tested on Raspberry Pi 3B+ (LAN7515/LAN88xx).

Changes since v2:
- Store downshift count in priv struct and restore in config_init to preserve user settings across suspend/resume (Russell King)

Changes since v1:
- Replace switch statements with FIELD_GET()/FIELD_PREP() (Andrew Lunn)
- Drop unused per-count register defines from microchipphy.h

Nicolai Buchwitz (2):
net: phy: microchip: add downshift tunable support for LAN88xx
net: phy: microchip: enable downshift by default on LAN88xx

 drivers/net/phy/microchip.c  | 79 +++++++++++++++++++++++++++++++++++-
 include/linux/microchipphy.h |  5 +++
 2 files changed, 83 insertions(+), 1 deletion(-)
Signature · 1 line
2.51.0