net: phy: add helpers to handle sfp phy connect/disconnect
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Thu, 21 Dec 2023 18:00:36 +0000 (19:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Jan 2024 18:38:56 +0000 (18:38 +0000)
commit034fcc210349b873ece7356905be5c6ca11eef2a
tree42441a55f804098300298a7b4ed2c98515b8a256
parent9c5625f559ad6fe9f6f733c11475bf470e637d34
net: phy: add helpers to handle sfp phy connect/disconnect

There are a few PHY drivers that can handle SFP modules through their
sfp_upstream_ops. Introduce Phylib helpers to keep track of connected
SFP PHYs in a netdevice's namespace, by adding the SFP PHY to the
upstream PHY's netdev's namespace.

By doing so, these SFP PHYs can be enumerated and exposed to users,
which will be able to use their capabilities.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/at803x.c
drivers/net/phy/marvell-88x2222.c
drivers/net/phy/marvell.c
drivers/net/phy/marvell10g.c
drivers/net/phy/phy_device.c
include/linux/phy.h