netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] Fix phy_link_topology initialization
@ 2024-05-07 10:28 Maxime Chevallier
  2024-05-07 10:28 ` [PATCH net-next 1/2] net: phy: phy_link_topology: Pass netdevice to phy_link_topo helpers Maxime Chevallier
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Maxime Chevallier @ 2024-05-07 10:28 UTC (permalink / raw)
  To: davem
  Cc: Maxime Chevallier, netdev, linux-kernel, thomas.petazzoni,
	Andrew Lunn, Jakub Kicinski, Eric Dumazet, Paolo Abeni,
	Russell King, linux-arm-kernel, Christophe Leroy, Herve Codina,
	Florian Fainelli, Heiner Kallweit, Vladimir Oltean,
	Köry Maincent, Jesse Brandeburg, Marek Behún,
	Piergiorgio Beruto, Oleksij Rempel, Nicolò Veronese,
	Simon Horman, mwojtas, Nathan Chancellor, Antoine Tenart

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-05-14  6:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-07 10:28 [PATCH net-next 0/2] Fix phy_link_topology initialization Maxime Chevallier
2024-05-07 10:28 ` [PATCH net-next 1/2] net: phy: phy_link_topology: Pass netdevice to phy_link_topo helpers Maxime Chevallier
2024-05-08  5:43   ` Heiner Kallweit
2024-05-07 10:28 ` [PATCH net-next 2/2] net: phy: phy_link_topology: Lazy-initialize the link topology Maxime Chevallier
2024-05-07 23:08   ` kernel test robot
2024-05-08  5:44   ` Heiner Kallweit
2024-05-13  7:30     ` Maxime Chevallier
2024-05-13  8:07     ` Maxime Chevallier
2024-05-13  8:15       ` Maxime Chevallier
2024-05-13  6:36 ` [PATCH net-next 0/2] Fix phy_link_topology initialization Nathan Chancellor
2024-05-13  9:15   ` Russell King (Oracle)
2024-05-13 15:11     ` Jakub Kicinski
2024-05-14  6:46       ` Maxime Chevallier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).