lkml.org 
[lkml]   [2024]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH net-next 0/2] Fix phy_link_topology initialization
Date
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(-)

--
2.44.0


\
 
 \ /
  Last update: 2024-05-27 18:19    [W:0.982 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site