mirror of
https://github.com/openwrt/openwrt.git
synced 2026-05-01 14:30:27 +04:00
468ee567c9
Backport a bunch of upstream commits simplifying the RealTek PHY driver and re-unifying the C22 and C45 driver instances. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 lines
814 B
Diff
23 lines
814 B
Diff
From: Daniel Golle <daniel@makrotopia.org>
|
|
Date: Mon, 5 Jan 2026 17:55:02 +0000
|
|
Subject: [PATCH] net: phy: realtek: rate-adapter in C22 mode
|
|
|
|
Use rate-adapter mode in case the PHY is connected to the host using
|
|
Clause-22 MDIO.
|
|
|
|
This is necessary because phylink only handles dynamically switching the
|
|
interface mode if the PHY is connected using Clause-45 MDIO.
|
|
|
|
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
--- a/drivers/net/phy/realtek/realtek_main.c
|
|
+++ b/drivers/net/phy/realtek/realtek_main.c
|
|
@@ -1387,7 +1387,7 @@ static int rtl822x_set_serdes_option_mod
|
|
return 0;
|
|
|
|
/* determine SerDes option mode */
|
|
- if (has_2500 && !has_sgmii) {
|
|
+ if (has_2500 && (!has_sgmii || !phydev->is_c45)) {
|
|
mode = RTL822X_VND1_SERDES_OPTION_MODE_2500BASEX;
|
|
phydev->rate_matching = RATE_MATCH_PAUSE;
|
|
} else {
|