From: Mieczyslaw Nalewaj <namiltd@yahoo.com>
To: juraj.sladek@littleit.sk, "Linus Walleij" <linusw@kernel.org>,
"Luiz Angelo Daros de Luca" <luizluca@gmail.com>,
"Alvin Šipraga" <alvin.sipraga@analog.com>,
"Andrew Lunn" <andrew@lunn.ch>,
"Vladimir Oltean" <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Russell King" <linux@armlinux.org.uk>
Cc: Johan Alvarado <contact@c127.dev>, netdev@vger.kernel.org
Subject: Re: [PATCH net 1/2] net: dsa: realtek: rtl8365mb: reset SerDes data path when conduit comes up
Date: Sat, 28 Nov 2026 00:09:38 +0100 [thread overview]
Message-ID: <447ca9fd-5f70-4e70-b080-d0d2b74478b9@yahoo.com> (raw)
In-Reply-To: <20261127-rtl8365mb-hsgmii-fix-v1-1-f2827126aa6a@littleit.sk>
On 11/27/2026 2:15 PM, Juraj Sladek via B4 Relay wrote:
> From: Juraj Sladek <juraj.sladek@littleit.sk>
>
> The SerDes of the external interface is configured from phylink long
> before the conduit Ethernet controller starts transmitting on the link.
> On a TP-Link Archer AX55 v1, where the IPQ5018 GMAC is connected to port
> 6 of an RTL8367S over a 2500base-x (HSGMII) fixed link, the SerDes
> receiver regularly comes out of this in a state where every frame
> received from the CPU is counted with an FCS error, so the CPU port does
> not work at all until the switch is reset.
>
> rtl8365mb_pcs_config() already resets the SerDes data path right after
> taking the SerDes out of reset. Repeating that reset once the link
> partner actually transmits recovers the receiver, so factor it out and
> call it again from the .conduit_state_change() callback when the conduit
> becomes operational.
>
Hi Juraj,
Thanks for the patch.
Just wanted to give you a heads-up that there is an alternative approach to this exact issue currently being worked on from the SoC/UNIPHY side in OpenWrt (PR #26597: "qualcommax: ipq50xx: program the UNIPHY at gmac probe" by Johan Alvarado, who is already CC'd here): https://github.com/openwrt/openwrt/pull/26597
The root cause identified there is that phylink only programs the qca-uniphy PCS on the first ndo_open of the conduit, leaving it in the bootloader's SGMII (1.25G) mode while the RTL8367S brings up its SerDes at DSA setup and trains against the wrong line rate. Programming the UNIPHY sequence earlier during GMAC probe resolves the FCS errors and dead CPU port on boot (tested on Mercusys MR80X v2, TP-Link Archer AX55 v1, and H3C Magic RC3000 v3) without touching the switch driver.
For context, this follows up on the earlier netdev discussion here:
kernel.org
That said, resetting the SerDes data path on the switch side when the conduit becomes operational might still be a solid defensive measure or useful when the conduit side isn't preconfigured early.
Best regards,
Mieczyslaw Nalewaj
next prev parent reply other threads:[~2026-11-27 23:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 13:15 [PATCH net 0/2] net: dsa: realtek: rtl8365mb: fix CPU port on HSGMII after boot Juraj Sladek via B4 Relay
2026-11-27 13:15 ` [PATCH net 1/2] net: dsa: realtek: rtl8365mb: reset SerDes data path when conduit comes up Juraj Sladek via B4 Relay
2026-11-27 23:09 ` Mieczyslaw Nalewaj [this message]
2026-11-27 13:15 ` [PATCH net 2/2] net: dsa: realtek: rtl8365mb: soft reset switch core after " Juraj Sladek via B4 Relay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=447ca9fd-5f70-4e70-b080-d0d2b74478b9@yahoo.com \
--to=namiltd@yahoo.com \
--cc=alvin.sipraga@analog.com \
--cc=andrew@lunn.ch \
--cc=contact@c127.dev \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=juraj.sladek@littleit.sk \
--cc=kuba@kernel.org \
--cc=linusw@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=luizluca@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox