Skip to content

net: Introduce Ethernet Inband Extensions

Maxime Chevallier linux-arm-kernel linux-devicetree lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6net: phy: Introduce QUSGMII PHY modeDocumentation/networking/phy.rst drivers/net/phy/phylink.c include/linux/phy.h+15 -00 replies
2/6dt-bindings: net: ethernet-controller: add QUSGMII modeDocumentation/devicetree/bindings/net/ethernet-controller.yaml+1 -01 reply
3/6net: lan966x: Add QUSGMII support for lan966xdrivers/net/ethernet/microchip/lan966x/lan966x_main.c drivers/net/ethernet/microchip/lan966x/lan966x_main.h drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c +2 more+38 -72 replies
4/6net: phy: Add support for inband extensionsdrivers/net/phy/phy.c include/linux/phy.h+92 -12 replies
5/6net: lan966x: Allow using PCH extension for PTPdrivers/net/ethernet/microchip/lan966x/lan966x_main.c drivers/net/ethernet/microchip/lan966x/lan966x_port.c drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c +1 more+171 -110 replies
6/6net: phy: micrel: Add QUSGMII support and PCH extensiondrivers/net/phy/micrel.c+96 -60 replies

Reviews trailers per patch

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

PatchRob Herring
1/6
2/6A-b
3/6
4/6
5/6
6/6

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 net-next 0/6] net: Introduce Ethernet Inband Extensions

Hello everyone,

This series introduces support for Ethernet in-band extensions, a mechanism proposed by Cisco as part of the USXGMII spec.

The idea is to leverage the 7 bytes preamble to convey meaningful data, in what's called an "extension".

This series adds the QUSGMII mode, which is a quad variant of the USXGMII standard, and adds its support in the lan966x driver. In QUSGMII, extensions can be used.

The only extension support thus far is the PCH mode, a way to convey part of a timestamp into the ethernet preamble. That's a pretty straightfoward extension, documented in the Cisco spec. Other extensions can exist, each being identified by a 2 bits code in the preamble, parsed by the hardware.

We therefore need an API to synchronise which mode is supported by a given PHY, then a way to enable it in the PHY, from the MAC's control.

This is done through a new phy_driver callback, .inband_ext_config(), that the MAC driver will call to ask a PHY driver to enable a given extension.

The PCH mode that is added in this series is used to offload a bit the MDIO bus when doing PHY-side timestamping, by conveying the nanoseconds part of the timestamp into the preamble. The MAC driver then extracts the timestamp (using lan966x's IFH mechanism), puts the nanosecond part in the SKB. The RX deferred timestamping then asks the PHY for the rest of the timestamp.

Other modes exists, such as Microchip's MCH mode, but this series only include PCH since it's simple enough and keeps the code reviewable.

Thanks,

Maxime

Maxime Chevallier (6):
net: phy: Introduce QUSGMII PHY mode
dt-bindings: net: ethernet-controller: add QUSGMII mode
net: lan966x: Add QUSGMII support for lan966x
net: phy: Add support for inband extensions
net: lan966x: Allow using PCH extension for PTP
net: phy: micrel: Add QUSGMII support and PCH extension

 .../bindings/net/ethernet-controller.yaml     |   1 +
 Documentation/networking/phy.rst              |   9 ++
 .../ethernet/microchip/lan966x/lan966x_main.c |  14 +--
 .../ethernet/microchip/lan966x/lan966x_main.h |   6 ++
 .../microchip/lan966x/lan966x_phylink.c       |   9 +-
 .../ethernet/microchip/lan966x/lan966x_port.c |  33 ++++--
 .../ethernet/microchip/lan966x/lan966x_ptp.c  |  93 +++++++++++++++-
 .../ethernet/microchip/lan966x/lan966x_regs.h |  72 +++++++++++++
 drivers/net/phy/micrel.c                      | 102 ++++++++++++++++--
 drivers/net/phy/phy.c                         |  68 ++++++++++++
 drivers/net/phy/phylink.c                     |   3 +
 include/linux/phy.h                           |  28 ++++-
 12 files changed, 413 insertions(+), 25 deletions(-)
Signature · 1 line
2.36.1