[PATCH v2] realtek: do not reset SerDes on link change

Sander Vanheule sander at svanheule.net
Wed Apr 27 09:06:34 PDT 2022


Hi Birger,

On Sun, 2022-04-24 at 22:01 +0200, Birger Koblitz wrote:
> Do not reset the RTL930x SerDes on link changes, instead set up
> the SDS with internal PHYs for the SFP+ ports only.
> This fixes the 8 1GBit ports on the Zyxel XGS1250 which
> do not work without this patch.
> 
> Tested-by: Stijn Segers <foss at volatilesystems.org>
> Signed-off-by: Birger Koblitz <git at birger-koblitz.de>
> ---
> v2: A different patch was previously sent with this subject.
>     This is the correct patch.
>  target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c  | 3 ++-
>  .../linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/rtl83xx.h | 1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c
> b/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c
> index 858b692640..5f19a1f590 100644
> --- a/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c
> +++ b/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/dsa.c
> @@ -814,7 +814,8 @@ static void rtl93xx_phylink_mac_config(struct dsa_switch *ds, int
> port,
>                                __func__, phy_modes(state->interface));
>                         return;
>                 }
> -               rtl9300_sds_rst(sds_num, sds_mode);
> +               if (state->interface == PHY_INTERFACE_MODE_10GBASER)
> +                       rtl9300_serdes_setup(sds_num, state->interface);


Resetting the SerDes(-es?) makes it end up in a state where the 1Gb (copper) ports don't
work. So with fixed phy-s, I can see how skipping a reset could help.

Instead of a _reset_, you now only do a mode change on 10GBASER ports, using a _setup_
call. The reset and setup also are not entirely equivalent, so why change to
rtl9300_serdes_setup()? Do 1G SFP modules still work if you only change modes for
10GBASER?

Best,
Sander



More information about the openwrt-devel mailing list