diff options
| author | Markus Stockhausen | 2026-01-18 11:58:51 +0000 |
|---|---|---|
| committer | Robert Marko | 2026-01-24 10:44:09 +0000 |
| commit | 121f4d90d0b5febe288b09d41c0232b343788339 (patch) | |
| tree | 8b202a7b8249b552b0ae01e463bf7d1ea6ff88d9 | |
| parent | 07bb4f51158be149f5bef54faf9dc545ce2c40d5 (diff) | |
| download | openwrt-121f4d90d0b5febe288b09d41c0232b343788339.tar.gz | |
realtek: phy: save RTL8214FC extended page during power set
Changing the fibre/copper power of a RTL8214FC changes the
extended page via register 29. This is the write only companion
of register 30. The register is afterwards overwritten to 0.
Use the proper extended page register 30 and preserve its content
during the operation.
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>
| -rw-r--r-- | target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c index 81fa9799fd..8d0700d5ca 100644 --- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c +++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c @@ -466,14 +466,15 @@ static bool rtl8214fc_media_is_fibre(struct phy_device *phydev) static void rtl8214fc_power_set(struct phy_device *phydev, int port, bool on) { int page = port == PORT_FIBRE ? RTL821X_MEDIA_PAGE_FIBRE : RTL821X_MEDIA_PAGE_COPPER; + int oldxpage = __phy_read(phydev, RTL821XEXT_MEDIA_PAGE_SELECT); int pdown = on ? 0 : BMCR_PDOWN; phydev_info(phydev, "power %s %s\n", on ? "on" : "off", port == PORT_FIBRE ? "fibre" : "copper"); - phy_write(phydev, RTL821XINT_MEDIA_PAGE_SELECT, page); + phy_write(phydev, RTL821XEXT_MEDIA_PAGE_SELECT, page); phy_modify_paged(phydev, RTL821X_PAGE_POWER, 0x10, BMCR_PDOWN, pdown); - phy_write(phydev, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_AUTO); + phy_write(phydev, RTL821XEXT_MEDIA_PAGE_SELECT, oldxpage); } static int rtl8214fc_suspend(struct phy_device *phydev) |