[openwrt/openwrt] rtl93xx: fix condition intended to only select internal serdes ports

LEDE Commits lede-commits at lists.infradead.org
Tue Oct 3 13:43:13 PDT 2023


ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/3fff6255422c9223fe91ce68dd227ec6942aa688

commit 3fff6255422c9223fe91ce68dd227ec6942aa688
Author: Peter Körner <git at mazdermind.de>
AuthorDate: Sun Sep 24 20:58:13 2023 +0200

    rtl93xx: fix condition intended to only select internal serdes ports
    
    This condition was introduced in commit 51c8f7661244 ("realtek: Improve
    MAC config handling for all SoCs") to correctly report the speed of the
    internal serdes ports as 10G, but instead makes all ports read 10G
    because the or-operator should have been an and-operator.
    
    Fixes: #9953
    Fixes: 51c8f7661244 ("realtek: Improve MAC config handling for all SoCs")
    Signed-off-by: Peter Körner <git at mazdermind.de>
    [ wrap comment to 72 column and improve commit ref ]
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit 9fb5082e258ac4672dc69636e5eb79f426defac8)
---
 target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
index 5744c70ea3..6f55f1e892 100644
--- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
@@ -559,7 +559,7 @@ static int rtl93xx_phylink_mac_link_state(struct dsa_switch *ds, int port,
 	}
 
 	if (priv->family_id == RTL9310_FAMILY_ID
-		&& (port >= 52 || port <= 55)) { /* Internal serdes */
+		&& (port >= 52 && port <= 55)) { /* Internal serdes */
 			state->speed = SPEED_10000;
 			state->link = 1;
 			state->duplex = 1;




More information about the lede-commits mailing list