]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: fix SFP ports on RTL83xx 20374/head
authorLorenz Brun <lorenz@brun.one>
Fri, 10 Oct 2025 21:11:38 +0000 (23:11 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 12 Oct 2025 14:12:54 +0000 (16:12 +0200)
commit0e8231c8872bee643f94b862ab754dd254309c90
treec053e8b666109a899463094e1a009d2d02f79a97
parent3f7776a260a6c72832e3413eb3339f4c6f02b00b
realtek: fix SFP ports on RTL83xx

Right now the phylink capability function enables 2.5G and 10G modes on
Maple and Cypress, which they mostly (other than two SERDES on Cypress)
don't support. This causes these modes to be selected and break the link
as they are not supported by hardware.

I looked into doing this properly, but it cannot just be done based on
SoC, but needs to take the whole topology into account as a given MAC
might have very different capabilities depending on what SERDES are
assigned to it. So for now just use 1G and QSGMII for RTL83xx and 10G
for RTL93xx. This mostly works, except it will downgrade some 10G links
on RTL839x, but since there are also 1G SFPs on these this cannot be
solved without fully accounting for the global MAC and SERDES
configuration.

So this makes all of the 1G SFP slots work again, while keeping most of
the 10G SFP+ slots working at 10G with minimal changes.

Signed-off-by: Lorenz Brun <lorenz@brun.one>
Link: https://github.com/openwrt/openwrt/pull/20374
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c