]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: phy: add helpers to handle sfp phy connect/disconnect
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Wed, 21 Aug 2024 15:09:57 +0000 (17:09 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Aug 2024 12:04:34 +0000 (13:04 +0100)
commitb2db6f4ace72e71fa09b8d1354f8ac9854140d74
tree6b689ac33cb21ddd5c85dedb0321386c6deea6f2
parent4d76f115ab9121f4458330da962ae9ef5430e60b
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>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Tested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/marvell-88x2222.c
drivers/net/phy/marvell.c
drivers/net/phy/marvell10g.c
drivers/net/phy/phy_device.c
drivers/net/phy/qcom/at803x.c
drivers/net/phy/qcom/qca807x.c
include/linux/phy.h