]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: rtl93xx: Do not use media register to get link status
authorHarshal Gohel <hg@simonwunderlich.de>
Thu, 3 Jul 2025 13:28:22 +0000 (13:28 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 7 Aug 2025 13:50:01 +0000 (15:50 +0200)
The media_sts register only shows type of link, fiber/copper,
and has nothing to do with the link status

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19575
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c

index 425fffd065eea13847fd86dc53330c2d6979c86b..10438298adca74258ff5d0da6f4bd5dcf57b9671 100644 (file)
@@ -653,9 +653,6 @@ static void rtl93xx_pcs_get_state(struct phylink_pcs *pcs,
        if (priv->family_id == RTL9300_FAMILY_ID)
                media = sw_r32(RTL930X_MAC_LINK_MEDIA_STS);
 
-       if (media & BIT_ULL(port))
-               state->link = 1;
-
        pr_debug("%s: link state port %d: %llx, media %llx\n", __func__, port,
                 link & BIT_ULL(port), media);