]> www.infradead.org Git - users/hch/misc.git/commit
net: phy: add helpers to handle sfp phy connect/disconnect
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Thu, 4 Apr 2024 09:29:53 +0000 (11:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 6 Apr 2024 17:25:14 +0000 (18:25 +0100)
commite75e4e074c4475a3a6145593ecf2dcaf3995fa50
treef452e94d277b9e0a50ee0a8c21254e75220ca274
parent0ec5ed6c130e3906ba4ec82d740444a21504fbbf
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>
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