]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: simplify RTL8214FC patches for ethtool copper/fiber switching 18816/head
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Fri, 16 May 2025 07:31:07 +0000 (03:31 -0400)
committerRobert Marko <robimarko@gmail.com>
Mon, 26 May 2025 08:37:54 +0000 (10:37 +0200)
commit1bef83bb230fe1695050746b56175d35b50da6b1
tree5307e4d849a36b7495ede3f2831e45d2a557e11a
parentbff179de73e36b0c27b5eefa1a967e956bb620cd
realtek: simplify RTL8214FC patches for ethtool copper/fiber switching

There is a patch/bug cascade in the realtek target phy code that must be resolved.

1. The phy_driver structure is patched to add features ONLY needed for RTL8214FC

2. The kernel is patched to allow switching fiber/copper port of phys through ethtool
   by calling these new features.

3. With those patches applied the bootup always switches RTL8214FC ports to copper.
   Even if a SFP module was found before and the phy driver switched to fibre before.

3. So another patch is needed that reprobes the SFP module to activate fiber again.

4. Because of the reprobing we need a fourth patch that avoid duplicate devices.

Simplify this by removing all patches and reusing the existing ethtool phy tunable
interface. The command line usage might be counterintuitive but it avoids tons of
problems in the code. In addition, this scenario is not used frequently.

Before:ethtool -s lan25 port fibre/tp
After: ethtool --set-phy-tunable lan25 downshift on/off

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18816
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.6/drivers/net/phy/rtl83xx-phy.c
target/linux/realtek/patches-6.6/706-include-linux-add-phy-ops-for-rtl838x.patch
target/linux/realtek/patches-6.6/708-drivers-net-phy-eee-support-for-rtl838x.patch
target/linux/realtek/patches-6.6/710-net-phy-sfp-re-probe-modules-on-DEV_UP-event.patch [deleted file]
target/linux/realtek/patches-6.6/714-net-phy-sfp-add-support-for-SMBus.patch