From e2dad927a8c8f8b8477006fe4f26ca22400edead Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B8rn=20Mork?= Date: Mon, 29 Sep 2025 08:13:19 +0200 Subject: [PATCH] realtek: fix Zyxel GS1900-10HP SFP slots MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Parse the pcs-handle property regardless of phy-handle Signed-off-by: Bjørn Mork Link: https://github.com/openwrt/openwrt/pull/20228 Signed-off-by: Robert Marko --- .../realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c index 6bae35633d..c805d954ec 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c @@ -334,6 +334,9 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv) if (of_property_read_u32(dn, "reg", &pn)) continue; + pcs_node = of_parse_phandle(dn, "pcs-handle", 0); + priv->pcs[pn] = rtpcs_create(priv->dev, pcs_node, pn); + phy_node = of_parse_phandle(dn, "phy-handle", 0); if (!phy_node) { if (pn != priv->cpu_port) @@ -341,9 +344,6 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv) continue; } - pcs_node = of_parse_phandle(dn, "pcs-handle", 0); - priv->pcs[pn] = rtpcs_create(priv->dev, pcs_node, pn); - /* * TODO: phylink_pcs was completely converted to the standalone PCS driver - see * rtpcs_create(). Nevertheless the DSA driver still relies on the info about the -- 2.30.2