realtek: support configuring SerDes auto-negotiation on RTL93xx
authorJan Hoffmann <[email protected]>
Thu, 24 Jul 2025 17:39:28 +0000 (19:39 +0200)
committerRobert Marko <[email protected]>
Thu, 25 Sep 2025 09:27:45 +0000 (11:27 +0200)
commit6790e1a564699557a54e2bbf43d42a49ff7437a2
tree37de19ab2d2c614d62894590ae7cdc99277b036a
parentc332aed2aae7028275788f1a58872f755ec73651
realtek: support configuring SerDes auto-negotiation on RTL93xx

There are SFP modules which only work if auto-negotiation is disabled,
like some "OEM SFP-2.5G-T" modules. This also seems to be necessary for
RTL8226/RTL8221B PHYs when using 2500Base-X.

However, currently, it is always enabled, so add support for configuring
it to make these SFP modules and PHYs work.

This also adds locking which should be useful for future extension of
the PCS driver.

Signed-off-by: Jan Hoffmann <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/19518
Signed-off-by: Robert Marko <[email protected]>
target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c