mirror of
https://github.com/openwrt/openwrt.git
synced 2026-06-17 12:40:16 +04:00
45633073fe
At least the XikeStor SKT-2.5G-100M SFP module seems to internally use MDIO address 0 to access the PHY. This module allows accessing PHY registers using Rollball protocol on address 0x51, and also provides read-only C22 access on address 0x56. However, after disabling the PHYAD0 configuration bit, only 0xffff can be read via both methods (except for MMD device 30 which can still be accessed). Since having MDIO address 0 enabled shouldn't do any harm on SFP modules just leave the configuration bit alone in that case. Signed-off-by: Jan Hoffmann <jan@3e8.eu> Link: https://github.com/openwrt/openwrt/pull/23065 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
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
|
|
@@ -1393,7 +1393,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 {
|