generic: net: phy: realtek: work-around hang on SerDes setup
authorDaniel Golle <daniel@makrotopia.org>
Thu, 30 Jan 2025 05:49:43 +0000 (05:49 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Fri, 31 Jan 2025 20:38:34 +0000 (21:38 +0100)
commit81db3077483388ec8fa7be441e34756438678f78
treec54af8cc0275875276f6c73692b9ec302d190587
parent7a916c75e8f5625f76fd22d41622333b0524b4b8
generic: net: phy: realtek: work-around hang on SerDes setup

On some but not all devices using the RTL8221B 2.5GBit/s PHY the SerDes
setup sequence may hang under some circumstances (eg. <2500M link
partner present during boot).

RTL8221B-VB-CG 2.5Gbps PHY (C45) mdio-bus:01: rtl822xb_config_init failed: -110

Work-around the issue by performing a hardware reset and subsequent
retry of the SerDes setup, which seems to always succeed.

Doing this requires moving ALDPS setup to config_init (which is anyway
the better place for that) as it otherwise doesn't survive the reset.

Also disable listening on MDIO address 0 which may be used by other PHYs
despite being spec'ed as "broadcast address", as bus activity on address
0 may otherwise confuse the RealTek PHY for good reasons.

Tested-by: Luis Mita <luis@luismita.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit c87a767801ef375feadb0a5c41d5a674ad3a7d2c)
Link: https://github.com/openwrt/openwrt/pull/17790
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/generic/pending-6.6/720-04-net-phy-realtek-introduce-rtl822x_aldps_probe.patch [deleted file]
target/linux/generic/pending-6.6/720-04-net-phy-realtek-setup-aldps.patch [new file with mode: 0644]
target/linux/generic/pending-6.6/720-05-net-phy-realtek-detect-early-version-of-RTL8221B.patch
target/linux/generic/pending-6.6/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch
target/linux/generic/pending-6.6/720-07-net-phy-realtek-mark-existing-MMDs-as-present.patch
target/linux/generic/pending-6.6/720-08-net-phy-realtek-work-around-broken-serdes.patch [new file with mode: 0644]
target/linux/generic/pending-6.6/720-09-net-phy-realtek-disable-MDIO-broadcast.patch [new file with mode: 0644]