Skip to content

Commit 7397005

Browse files
Russell Kingdavem330
authored andcommitted
sfp: add SFP module support
Add support for SFP hotpluggable modules via sfp-bus and phylink. This supports both copper and optical SFP modules, which require different Serdes modes in order to properly negotiate the link. Optical SFP modules typically require the Serdes link to be talking 1000BaseX mode - this is the gigabit ethernet mode defined by the 802.3 standard. Copper SFP modules typically integrate a PHY in the module to convert from Serdes to copper, and the PHY will be configured by the vendor to either present a 1000BaseX Serdes link (for fixed 1000BaseT) or a SGMII Serdes link. However, this is vendor defined, so we instead detect the PHY, switch the link to SGMII mode, and use traditional PHY based negotiation. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent da7c186 commit 7397005

File tree

3 files changed

+921
-0
lines changed

3 files changed

+921
-0
lines changed

drivers/net/phy/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ config LED_TRIGGER_PHY
200200

201201
comment "MII PHY device drivers"
202202

203+
config SFP
204+
tristate "SFP cage support"
205+
depends on I2C && PHYLINK
206+
select MDIO_I2C
207+
203208
config AMD_PHY
204209
tristate "AMD PHYs"
205210
---help---

drivers/net/phy/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ obj-$(CONFIG_MDIO_SUN4I) += mdio-sun4i.o
3838
obj-$(CONFIG_MDIO_THUNDER) += mdio-thunder.o
3939
obj-$(CONFIG_MDIO_XGENE) += mdio-xgene.o
4040

41+
obj-$(CONFIG_SFP) += sfp.o
4142
sfp-obj-$(CONFIG_SFP) += sfp-bus.o
4243
obj-y += $(sfp-obj-y) $(sfp-obj-m)
4344

0 commit comments

Comments
 (0)