From 8b706d9297ed9aa9ba15e759bfacf207640e43ad Mon Sep 17 00:00:00 2001 From: Tobias Schramm Date: Sat, 23 Dec 2023 13:41:01 +0100 Subject: [PATCH] realtek: 5.15: rtl93xx: support 100BASE-T and 10BASE-T MAC modes The MAC embedded in rtl93xx switch SoCs needs different mac mode bits set to support 10BaseT and 100BaseT link modes. Set them accordingly. This change has been tested on a ZyXEL XGS1250-12. Signed-off-by: Tobias Schramm --- .../linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c | 5 ++++- 1 file changed, 4 insertions(+), 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 063ce9b8c5d0..d246e60cb2ac 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 @@ -854,8 +854,11 @@ static void rtl93xx_phylink_mac_config(struct dsa_switch *ds, int port, case SPEED_1000: reg |= 2 << 3; break; + case SPEED_100: + reg |= 1 << 3; + break; default: - reg |= 2 << 3; + /* Also covers 10M */ break; } -- 2.30.2