Skip to content

MDIO and ethtool enhancements

Ben Hutchings netdev 1 version In review

Get series with b4
b4 am 1241028086.3246.30.camel@achroite

Versions newest first

  1. v1 Latest16 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16ethtool: Add port type PORT_OTHERinclude/linux/ethtool.h+1 -00 replies
2/16mdio: Add register definitions for MDIO (clause 45)include/linux/mdio.h+237 -00 replies
3/16mdio: Add generic MDIO (clause 45) support functionsdrivers/net/Kconfig drivers/net/Makefile drivers/net/mdio.c +1 more+429 -00 replies
4/16sfc: Use generic MDIO functions and definitionsdrivers/net/sfc/Kconfig drivers/net/sfc/efx.c drivers/net/sfc/ethtool.c +11 more+311 -8450 replies
5/16chelsio: Use generic MDIO definitions and mdio_mii_ioctl()drivers/net/Kconfig drivers/net/chelsio/common.h drivers/net/chelsio/cphy.h +4 more+82 -1000 replies
6/16cxgb3: Use generic MDIO definitions and mdio_mii_ioctl()drivers/net/Kconfig drivers/net/cxgb3/ael1002.c drivers/net/cxgb3/common.h +3 more+195 -2240 replies
7/16ixgbe: Use generic MDIO definitions and functionsdrivers/net/Kconfig drivers/net/ixgbe/ixgbe_82598.c drivers/net/ixgbe/ixgbe_82599.c +3 more+102 -1190 replies
8/16ixgb: Use generic MDIO definitionsdrivers/net/ixgb/ixgb_hw.c drivers/net/ixgb/ixgb_hw.h+12 -220 replies
9/16s2io: Use generic MDIO definitionsdrivers/net/s2io-regs.h drivers/net/s2io.c+11 -150 replies
10/16mii: Simplify mii_resolve_flowctrl_fdx()include/linux/mii.h+6 -121 reply
11/16mii: Add mii_advertise_flowctrl()include/linux/mii.h+16 -00 replies
12/16mdio: Add mdio45_ethtool_spauseparam_an()drivers/net/mdio.c include/linux/mdio.h+33 -00 replies
13/16sfc: Use generic MDIO flow control auto-negotiation functionsdrivers/net/sfc/ethtool.c drivers/net/sfc/mdio_10g.c drivers/net/sfc/mdio_10g.h +2 more+7 -480 replies
14/16ethtool/mdio: Report MDIO mode support and link partner advertisingdrivers/net/mdio.c include/linux/ethtool.h include/linux/mdio.h+18 -100 replies
15/16ethtool/mdio: Support backplane mode negotiationdrivers/net/mdio.c include/linux/ethtool.h include/linux/mdio.h+40 -50 replies
16/16mii: Rewrite mii_ethtool_gset() to report mdio_support and lp_advertisingdrivers/net/mii.c+57 -340 replies

Reviews trailers per patch

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

PatchSteve Glendinning
1/16
2/16
3/16
4/16
5/16
6/16
7/16
8/16
9/16
10/16A-b
11/16
12/16
13/16
14/16
15/16
16/16

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

Read the v1 thread

Cover letter [PATCH 00/16] MDIO and ethtool enhancements

The first part of this series introduce counterparts to <linux/mii.h> and the mii module for use with MDIO clause 45 devices and controllers that support both clause 22 and clause 45, and change several 10G Ethernet drivers to use them.

The remaining patches are a bit miscellaneous:
- Extend generic flow control/pause frame support and change the sfc driver to use it
- Add fields to the ethtool_cmd structure to report the supported MDIO mode(s) and link partner advertising flags, and implement these in the mdio and mii modules
- Add support for backplane (1000BASE-KR and 10GBASE-KR/KX4) modes to ethtool and the mdio module

I have a few questions to be resolved:
- Is the naming of functions and constants in <linux/mdio.h> reasonable, or is more qualification required?
- Is it reasonable to carry on using the MII ioctl interface with flags?
- Are there more drivers that could use these generic definitions (I haven't looked at the Broadcom drivers yet)?
- Does the backplane code work at all (I don't have any suitable hardware yet)?

Ben.

Ben Hutchings (16):
ethtool: Add port type PORT_OTHER
mdio: Add register definitions for MDIO (clause 45)
mdio: Add generic MDIO (clause 45) support functions
sfc: Use generic MDIO functions and definitions
chelsio: Use generic MDIO definitions and mdio_mii_ioctl()
cxgb3: Use generic MDIO definitions and mdio_mii_ioctl()
ixgbe: Use generic MDIO definitions and functions
ixgb: Use generic MDIO definitions
s2io: Use generic MDIO definitions
mii: Simplify mii_resolve_flowctrl_fdx()
mii: Add mii_advertise_flowctrl()
mdio: Add mdio45_ethtool_spauseparam_an()
sfc: Use generic MDIO flow control auto-negotiation functions ethtool/mdio: Report MDIO mode support and link partner advertising ethtool/mdio: Support backplane mode negotiation
mii: Report mdio_support and lp_advertising from generic_mii_ioctl()

 drivers/net/Kconfig             |    6 +
 drivers/net/Makefile            |    1 +
 drivers/net/chelsio/common.h    |    2 +-
 drivers/net/chelsio/cphy.h      |   45 +++--
 drivers/net/chelsio/cxgb2.c     |   36 +---
 drivers/net/chelsio/mv88x201x.c |   45 +++--
 drivers/net/chelsio/my3126.c    |   10 +-
 drivers/net/chelsio/subr.c      |   43 +++--
 drivers/net/cxgb3/ael1002.c     |  146 +++++++-------
 drivers/net/cxgb3/common.h      |   53 +++---
 drivers/net/cxgb3/cxgb3_main.c  |   71 ++------
 drivers/net/cxgb3/t3_hw.c       |   78 ++++----
 drivers/net/cxgb3/vsc8211.c     |   70 ++++---
 drivers/net/ixgb/ixgb_hw.c      |   20 +-
 drivers/net/ixgb/ixgb_hw.h      |   14 +--
 drivers/net/ixgbe/ixgbe_82598.c |   33 ++--
 drivers/net/ixgbe/ixgbe_82599.c |   17 +-
 drivers/net/ixgbe/ixgbe_main.c  |   42 ++++
 drivers/net/ixgbe/ixgbe_phy.c   |   95 +++------
 drivers/net/ixgbe/ixgbe_type.h  |   33 +---
 drivers/net/mdio.c              |  414 +++++++++++++++++++++++++++++++++++++++
 drivers/net/mii.c               |   91 ++++++----
 drivers/net/s2io-regs.h         |    5 -
 drivers/net/s2io.c              |   21 +-
 drivers/net/sfc/Kconfig         |    2 +-
 drivers/net/sfc/efx.c           |   10 +-
 drivers/net/sfc/ethtool.c       |   19 +--
 drivers/net/sfc/falcon.c        |  137 ++++----------
 drivers/net/sfc/falcon_hwdefs.h |    3 -
 drivers/net/sfc/falcon_xmac.c   |    2 +-
 drivers/net/sfc/mdio_10g.c      |  385 +++++++-----------------------------
 drivers/net/sfc/mdio_10g.h      |  282 ++++-----------------------
 drivers/net/sfc/net_driver.h    |   34 +---
 drivers/net/sfc/selftest.c      |   21 +-
 drivers/net/sfc/selftest.h      |    2 +-
 drivers/net/sfc/tenxpress.c     |  226 +++++++++-------------
 drivers/net/sfc/xenpack.h       |   15 +-
 drivers/net/sfc/xfp_phy.c       |   51 +++---
 include/linux/ethtool.h         |   15 ++-
 include/linux/mdio.h            |  312 +++++++++++++++++++++++++++++
 include/linux/mii.h             |   34 ++--
 41 files changed, 1532 insertions(+), 1409 deletions(-)
 create mode 100644 drivers/net/mdio.c
 create mode 100644 include/linux/mdio.h
Signature · 3 lines
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.