net: phy: Rework linkmodes handling in a dedicated file
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
- v5 Latest13 patches 25 repliesApplied 13/13
- v413 patches 9 repliesSuperseded
- v313 patches 6 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 13 patches | 4 replies | Superseded | |
| v1 | 13 patches | 8 replies | Superseded |
Patches in v5 All 13 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/13 | net: ethtool: Export the link_mode_params definitionsinclude/ net/ net/ | +9 | 0 replies | Applied |
| 2/13 | net: phy: Use an internal, searchable storage for the linkmodesdrivers/ drivers/ drivers/ +1 more | +139 | 0 replies | Applied |
| 3/13 | net: phy: phy_caps: Move phy_speeds to phy_capsdrivers/ drivers/ drivers/ +2 more | +38 | 0 replies | Applied |
| 4/13 | net: phy: phy_caps: Move __set_linkmode_max_speed to phy_capsdrivers/ drivers/ drivers/ | +24 | 0 replies | Applied |
| 5/13 | net: phy: phy_caps: Introduce phy_caps_validdrivers/ drivers/ drivers/ | +21 | 0 replies | Applied |
| 6/13 | net: phy: phy_caps: Implement link_capabilities lookup by linkmodedrivers/ drivers/ drivers/ | +65 | 0 replies | Applied |
| 7/13 | net: phy: phy_caps: Allow looking-up link caps based on speed and duplexdrivers/ drivers/ drivers/ +1 more | +67 | 4 replies | Applied |
| 8/13 | net: phy: phy_device: Use link_capabilities lookup for PHY aneg configdrivers/ | +6 | 0 replies | Applied |
| 9/13 | net: phylink: Use phy_caps_lookup for fixed-link configurationdrivers/ | +31 | 20 replies | Applied |
| 10/13 | net: phy: drop phy_settings and the associated lookup helpersdrivers/ include/ | +0 | 0 replies | Applied |
| 11/13 | net: phylink: Add a mapping between MAC_CAPS and LINK_CAPSdrivers/ | +25 | 0 replies | Applied |
| 12/13 | net: phylink: Convert capabilities to linkmodes using phy_capsdrivers/ drivers/ drivers/ | +36 | 0 replies | Applied |
| 13/13 | net: phylink: Use phy_caps to get an interface's capabilities and modesdrivers/ drivers/ drivers/ | +110 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.
Cover letter [PATCH net-next v5 00/13] net: phy: Rework linkmodes handling in a dedicated file
Hello everyone,
This is V5 of the phy_caps series. In a nutshell, this series reworks the way we maintain the list of speed/duplex capablities for each linkmode so that we no longer have multiple definition of these associations.
That will help making sure that when people add new linkmodes in include/uapi/linux/ethtool.h, they don't have to update phylib and phylink as well, making the process more straightforward and less error-prone.
It also generalises the phy_caps interface to be able to lookup linkmodes from phy_interface_t, which is needed for the multi-port work I've been working on for a while.
This V5 addresse Russell's and Paolo's reviews, namely :
- Error out when encountering an unknown SPEED_XXX setting
It prints an error and fails to initialize phylib. I've tested by introducing a dummy 1.6T speed, I guess it's only a matter of time before that actually happens :)
- Deal more gracefully with the fixed-link settings, keeping some level of compatibility with what we had before by making sure we report a single BaseT mode like before.
V1 : https://lore.kernel.org/netdev/[email protected]/
V2 : https://lore.kernel.org/netdev/[email protected]/
V3 : https://lore.kernel.org/netdev/[email protected]/
V4 : https://lore.kernel.org/netdev/[email protected]/
Maxime Chevallier (13):
net: ethtool: Export the link_mode_params definitions
net: phy: Use an internal, searchable storage for the linkmodes
net: phy: phy_caps: Move phy_speeds to phy_caps
net: phy: phy_caps: Move __set_linkmode_max_speed to phy_caps
net: phy: phy_caps: Introduce phy_caps_valid
net: phy: phy_caps: Implement link_capabilities lookup by linkmode
net: phy: phy_caps: Allow looking-up link caps based on speed and
duplex
net: phy: phy_device: Use link_capabilities lookup for PHY aneg config
net: phylink: Use phy_caps_lookup for fixed-link configuration
net: phy: drop phy_settings and the associated lookup helpers
net: phylink: Add a mapping between MAC_CAPS and LINK_CAPS
net: phylink: Convert capabilities to linkmodes using phy_caps
net: phylink: Use phy_caps to get an interface's capabilities and
modes
drivers/net/phy/Makefile | 2 +- drivers/net/phy/phy-caps.h | 63 ++++++ drivers/net/phy/phy-core.c | 253 ++---------------------- drivers/net/phy/phy.c | 37 +--- drivers/net/phy/phy_caps.c | 359 +++++++++++++++++++++++++++++++++++ drivers/net/phy/phy_device.c | 16 +- drivers/net/phy/phylink.c | 355 ++++++++++------------------------ include/linux/ethtool.h | 8 + include/linux/phy.h | 15 -- net/ethtool/common.c | 1 + net/ethtool/common.h | 7 - 11 files changed, 571 insertions(+), 545 deletions(-) create mode 100644 drivers/net/phy/phy-caps.h create mode 100644 drivers/net/phy/phy_caps.c
Signature · 1 line
2.48.1