Skip to content

net: ethernet: Rework EEE

Andrew Lunn netdev oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest23 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/23net: phy: Add phydev->eee_active to simplify adjust link callbacksdrivers/net/phy/phy.c include/linux/phy.h+9 -01 reply
2/23net: phylink: Plumb eee_active in mac_link_up calldrivers/net/dsa/b53/b53_common.c drivers/net/dsa/b53/b53_priv.h drivers/net/dsa/bcm_sf2.c +39 more+119 -563 replies
3/23net: phy: Add helper to set EEE Clock stop enable bitdrivers/net/phy/phy.c include/linux/phy.h+21 -04 replies
4/23net: phy: Keep track of EEE tx_lpi_enableddrivers/net/phy/phy.c include/linux/phy.h+6 -11 reply
5/23net: phy: Immediately call adjust_link if only tx_lpi_enabled changesdrivers/net/phy/phy-c45.c drivers/net/phy/phy.c+20 -62 replies
6/23net: marvell: mvneta: Simplify EEE configurationdrivers/net/ethernet/marvell/mvneta.c+2 -170 replies
7/23net: stmmac: Drop usage of phy_init_eee()drivers/net/ethernet/stmicro/stmmac/stmmac_main.c+3 -20 replies
8/23net: stmmac: Simplify ethtool get eeedrivers/net/ethernet/stmicro/stmmac/stmmac.h drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c+0 -100 replies
9/23net: lan743x: Fixup EEEdrivers/net/ethernet/microchip/lan743x_ethtool.c drivers/net/ethernet/microchip/lan743x_main.c+7 -220 replies
10/23net: fec: Move fec_enet_eee_mode_set() and helper earlierdrivers/net/ethernet/freescale/fec_main.c+40 -390 replies
11/23net: FEC: Fixup EEEdrivers/net/ethernet/freescale/fec_main.c+4 -240 replies
12/23net: genet: Fixup EEEdrivers/net/ethernet/broadcom/genet/bcmgenet.c drivers/net/ethernet/broadcom/genet/bcmgenet.h drivers/net/ethernet/broadcom/genet/bcmmii.c+12 -340 replies
13/23net: sxgdb: Fixup EEEdrivers/net/ethernet/samsung/sxgbe/sxgbe_common.h drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c+12 -480 replies
14/23net: dsa: mt7530: Swap to using phydev->eee_activedrivers/net/dsa/mt7530.c+1 -10 replies
15/23net: dsa: b53: Swap to using phydev->eee_activedrivers/net/dsa/b53/b53_common.c+1 -40 replies
16/23net: phylink: Remove unused phylink_init_eee()drivers/net/phy/phylink.c include/linux/phylink.h+0 -190 replies
17/23net: phy: remove unused phy_init_eee()drivers/net/phy/phy.c include/linux/phy.h+0 -350 replies
18/23net: usb: lan78xx: Fixup EEEdrivers/net/usb/lan78xx.c+14 -220 replies
19/23net: phy: Add phy_support_eee() indicating MAC support EEEdrivers/net/phy/phy_device.c include/linux/phy.h+18 -10 replies
20/23net: phylink: Add MAC_EEE to mac_capabilitesdrivers/net/phy/phylink.c include/linux/phylink.h+6 -02 replies
21/23net: phylink: Extend mac_capabilities in MAC drivers which support EEEdrivers/net/ethernet/marvell/mvneta.c drivers/net/ethernet/microchip/lan743x_main.c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +1 more+9 -10 replies
22/23net: phylib: call phy_support_eee() in MAC drivers which support EEEdrivers/net/ethernet/broadcom/genet/bcmmii.c drivers/net/ethernet/freescale/fec_main.c drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c +1 more+10 -00 replies
23/23net: phy: Disable EEE advertisement by defaultdrivers/net/phy/phy_device.c+4 -170 replies

Reviews trailers per patch

5 of 23 patches have a Reviewed-by or Acked-by.

PatchRussell King (Oracle)
1/23R-b
2/23R-b
3/23R-b
4/23R-b
5/23
6/23
7/23
8/23
9/23
10/23
11/23
12/23
13/23
14/23
15/23
16/23R-b
17/23
18/23
19/23
20/23
21/23
22/23
23/23

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

Read the v1 thread

Cover letter [RFC/RFT 00/23] net: ethernet: Rework EEE

Most MAC drivers get EEE wrong. The API to the PHY is not very obvious, which is probably why. Rework the API, pushing most of the EEE handling into phylib core, leaving the MAC drivers to just enable/disable support for EEE in there change_link call back, or phylink mac_link_up callback.

MAC drivers are now expect to indicate to phylib/phylink if they support EEE. If not, no EEE link modes are advertised. If the MAC does support EEE, on phy_start()/phylink_start() EEE advertisement is configured.

There is some overlap here with the addition of SMART EEE. This needs to be solved before either patchset is merged. This patchset is also large, so might need splitting into adding new infrastructure, migrating MAC drivers, removing old code.

I deliberately reduced the Cc: list down to just a few developers, who i hope can test the core and a couple of the MAC drivers, and review if the new API makes sense, before the other MAC drivers are reviewed.

Andrew Lunn (23):
net: phy: Add phydev->eee_active to simplify adjust link callbacks
net: phylink: Plumb eee_active in mac_link_up call
net: phy: Add helper to set EEE Clock stop enable bit
net: phy: Keep track of EEE tx_lpi_enabled
net: phy: Immediately call adjust_link if only tx_lpi_enabled changes
net: marvell: mvneta: Simplify EEE configuration
net: stmmac: Drop usage of phy_init_eee()
net: stmmac: Simplify ethtool get eee
net: lan743x: Fixup EEE
net: fec: Move fec_enet_eee_mode_set() and helper earlier
net: FEC: Fixup EEE
net: genet: Fixup EEE
net: sxgdb: Fixup EEE
net: dsa: mt7530: Swap to using phydev->eee_active
net: dsa: b53: Swap to using phydev->eee_active
net: phylink: Remove unused phylink_init_eee()
net: phy: remove unused phy_init_eee()
net: usb: lan78xx: Fixup EEE
net: phy: Add phy_support_eee() indicating MAC support EEE
net: phylink: Add MAC_EEE to mac_capabilites
net: phylink: Extend mac_capabilities in MAC drivers which support EEE
net: phylib: call phy_support_eee() in MAC drivers which support EEE
net: phy: Disable EEE advertisement by default

 drivers/net/dsa/b53/b53_common.c              |  8 +-
 drivers/net/dsa/b53/b53_priv.h                |  3 +-
 drivers/net/dsa/bcm_sf2.c                     |  3 +-
 drivers/net/dsa/lan9303-core.c                |  2 +-
 drivers/net/dsa/lantiq_gswip.c                |  3 +-
 drivers/net/dsa/microchip/ksz_common.c        | 10 ++-
 drivers/net/dsa/microchip/ksz_common.h        |  3 +-
 drivers/net/dsa/mt7530.c                      |  8 +-
 drivers/net/dsa/mv88e6xxx/chip.c              |  3 +-
 drivers/net/dsa/ocelot/felix.c                |  3 +-
 drivers/net/dsa/qca/ar9331.c                  |  3 +-
 drivers/net/dsa/qca/qca8k-8xxx.c              |  3 +-
 drivers/net/dsa/realtek/rtl8365mb.c           |  2 +-
 drivers/net/dsa/realtek/rtl8366rb.c           |  3 +-
 drivers/net/dsa/rzn1_a5psw.c                  |  3 +-
 drivers/net/dsa/sja1105/sja1105_main.c        |  3 +-
 drivers/net/dsa/xrs700x/xrs700x.c             |  3 +-
 drivers/net/ethernet/altera/altera_tse_main.c |  3 +-
 drivers/net/ethernet/atheros/ag71xx.c         |  3 +-
 .../net/ethernet/broadcom/genet/bcmgenet.c    | 42 +++------
 .../net/ethernet/broadcom/genet/bcmgenet.h    |  3 +-
 drivers/net/ethernet/broadcom/genet/bcmmii.c  |  3 +
 drivers/net/ethernet/cadence/macb_main.c      |  3 +-
 .../net/ethernet/freescale/dpaa2/dpaa2-mac.c  |  3 +-
 .../net/ethernet/freescale/enetc/enetc_pf.c   |  3 +-
 drivers/net/ethernet/freescale/fec_main.c     | 88 ++++++++-----------
 .../net/ethernet/freescale/fman/fman_dtsec.c  |  3 +-
 .../net/ethernet/freescale/fman/fman_memac.c  |  3 +-
 .../net/ethernet/freescale/fman/fman_tgec.c   |  3 +-
 drivers/net/ethernet/marvell/mvneta.c         | 24 ++---
 .../net/ethernet/marvell/mvpp2/mvpp2_main.c   |  5 +-
 .../ethernet/marvell/prestera/prestera_main.c |  3 +-
 drivers/net/ethernet/mediatek/mtk_eth_soc.c   |  3 +-
 .../net/ethernet/microchip/lan743x_ethtool.c  | 22 -----
 drivers/net/ethernet/microchip/lan743x_main.c |  9 ++
 .../microchip/lan966x/lan966x_phylink.c       |  3 +-
 .../microchip/sparx5/sparx5_phylink.c         |  3 +-
 drivers/net/ethernet/mscc/ocelot_net.c        |  3 +-
 .../net/ethernet/samsung/sxgbe/sxgbe_common.h |  3 -
 .../ethernet/samsung/sxgbe/sxgbe_ethtool.c    | 21 +----
 .../net/ethernet/samsung/sxgbe/sxgbe_main.c   | 39 +++-----
 drivers/net/ethernet/stmicro/stmmac/stmmac.h  |  1 -
 .../ethernet/stmicro/stmmac/stmmac_ethtool.c  |  7 --
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 13 +--
 drivers/net/ethernet/ti/am65-cpsw-nuss.c      |  3 +-
 .../net/ethernet/xilinx/xilinx_axienet_main.c |  3 +-
 drivers/net/phy/phy-c45.c                     | 11 ++-
 drivers/net/phy/phy-core.c                    | 11 +++
 drivers/net/phy/phy.c                         | 57 ++++++------
 drivers/net/phy/phy_device.c                  | 37 ++++----
 drivers/net/phy/phylink.c                     | 37 ++++----
 drivers/net/usb/asix_devices.c                |  2 +-
 drivers/net/usb/lan78xx.c                     | 38 ++++----
 include/linux/phy.h                           | 10 ++-
 include/linux/phylink.h                       | 25 +++---
 include/net/dsa.h                             |  3 +-
 net/dsa/port.c                                |  9 +-
 57 files changed, 295 insertions(+), 336 deletions(-)
Signature · 1 line
2.39.2