Skip to content

Fix phy_link_topology initialization

Maxime Chevallier linux-arm-kernel lkml netdev oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: phy: phy_link_topology: Pass netdevice to phy_link_topo helpersdrivers/net/phy/phy_device.c drivers/net/phy/phy_link_topology.c include/linux/phy_link_topology.h +1 more+32 -291 reply
2/2net: phy: phy_link_topology: Lazy-initialize the link topologydrivers/net/phy/phy_link_topology.c include/linux/netdevice.h include/linux/phy_link_topology.h +2 more+58 -594 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/2] Fix phy_link_topology initialization

Nathan and Heiner reported issues that occur when phylib and phy drivers built as modules expect the phy_link_topology to be initialized, due to wrong use of IS_REACHABLE.

This small fixup series addresses that by moving the initialization code into net/core/dev.c, but at the same time implementing lazy initialization to only allocate the topology upon the first PHY insertion.

This needed some refactoring, namely pass the netdevice itself as a parameter for phy_link_topology helpers.

Thanks Heiner for the help on untangling this, and Nathan for the report.

Maxime Chevallier (2):
net: phy: phy_link_topology: Pass netdevice to phy_link_topo helpers
net: phy: phy_link_topology: Lazy-initialize the link topology

 drivers/net/phy/phy_device.c           | 25 +++++----------
 drivers/net/phy/phy_link_topology.c    | 44 +++++++++++---------------
 include/linux/netdevice.h              |  2 ++
 include/linux/phy_link_topology.h      | 40 +++++++++++++----------
 include/linux/phy_link_topology_core.h | 23 +++-----------
 net/core/dev.c                         | 38 ++++++++++++++++++----
 net/ethtool/netlink.c                  |  2 +-
 7 files changed, 88 insertions(+), 86 deletions(-)
Signature · 1 line
2.44.0