]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: phy: fix RTL8214FC fibre/copper initialization main master 21582/head
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Sun, 18 Jan 2026 21:09:00 +0000 (22:09 +0100)
committerRobert Marko <robimarko@gmail.com>
Sat, 24 Jan 2026 10:44:10 +0000 (11:44 +0100)
commit372f2563f602363c0b68d5263039c5649490a175
tree1f5954b86d9336a2035481cfac6f674c7dbd0479
parent45fb8f9739272fc6d12ee4bc44cae5c217341a10
realtek: phy: fix RTL8214FC fibre/copper initialization

A phy is configured in two stages

- phy_probe() for setup of structures
- config_init() for device setup (after reset)

RTL8214FC is a combo phy and the currently active port can be switched
with the SFP helper functions that are triggered during SFP insertion
and removal. In case a fibre SFP is inserted while booting the SFP
trigger is run between the above mentioned stages. During the final
setup in config_init() the phy is reset to the copper port. Thus no
link is available on fibre and the SFP must be reinserted for normal
operation.

For a consistent behaviour the fibre/copper port setup must run before
the SFP probing and not afterwards. Move the setup code from config_init()
into phy_probe().

Fixes: 10ae743 ("realtek: phy: simplify RTL8214FC configuration")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21582
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c