Files
openwrt/target/linux/generic/pending-6.12/720-08-net-phy-realtek-rate-adapter-in-C22-mode.patch
T
Daniel Golle 468ee567c9 kernel: net: phy: realtek: backport upstream commits
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>
2026-01-19 13:51:41 +00:00

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 {