I have a ZyXEL XGS1250-12 v2, which runs pretty smoothly with OpenWRT, except that the three 2.5/5/10 GbE ports are not working. The chips providing those ports are rtl8261be. I succeeded in building an image that includes the rtl8261n driver, which seemed to be the best choice to achieve anything.
During boot, the rtl8261n driver automatically initializes the interfaces, the port indicator LED shows the right color depending on the link speed, and it starts blinking together with the other ports.
However, even though there is some traffic reported in the GUI, the connection doesn't work (DHCP or static).
ethtool shows very similar information compared to the working interfaces and dmesg shows some failures that I think are not related to this problem.
The output of ethtool:
root@SW1:~# ethtool lan9
Settings for lan9:
Supported ports: [ TP MII ]
Supported link modes: 100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 100baseT/Half 100baseT/Full
1000baseT/Full
10000baseT/Full
2500baseT/Full
5000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 24
Transceiver: external
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: d
Wake-on: d
Link detected: yes
There are multiple of those FIB related lines. However, I'm now wondering what choices I have to debug the interfaces. Can someone with some experience give me a hint where to start or tell me if this is a dead end? I really would like to get this device to work and also contribute something to OpenWRT.
Yes, I managed to get the 10GbE ports up and running with the help of BrainSlayer. The RTL8261N driver can also be used for the RTL8261BE chipset, some changes are necessary. The smi addresses in the device tree file have to be adjusted, the driver has to be compiled statically (I was not able to compile it as a kernel module) and finally I had to use the modified driver from BrainSlayer. He works on the dd-wrt project and has modified it so that the chipset is initialized correctly.
Here are the individual steps with which I had success. (It's not a clean solution, you would have to create a new target for version 2. Also, the inclusion of the driver is probably not in the right file):
git status
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: target/linux/generic/files/drivers/net/phy/rtl8261n/phy_patch.c
modified: target/linux/generic/files/drivers/net/phy/rtl8261n/phy_rtl826xb_patch.c
modified: target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_osal.c
modified: target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_phy.c
modified: target/linux/realtek/dts/rtl9302_zyxel_xgs1250-12.dts
modified: target/linux/realtek/rtl930x/config-6.6
Thank you for the information. Did you also build by merging the pull request in the link you provided (PR for kernel 6.12)? Or did you just use the main OpenWrt branch and inserted BrainSlayer's modified drivers along with the modified devide tree file?
I got it running, finally. Thanks! How do you manage your switch, through the /etc/config/network file or through luci? I tried installing the luci package but no switch menu appeared.
No, I have compiled the main branch with kernel version 6.6 together with the drivers. I think now it would also be possible to compile it with kernel 6.12, because the pull request was merged into the main branch and brainslayer also made a customization for 6.12.
I have made the configuration in luci. I have only used OpenWRT on routers, so I don't know the switch menu, but as far as I can see, basically everything can be configured via network > interfaces. Perhaps this menu only appears if there is a configuration for it or it is specified via menuconfig.
To add to this, the menu is named "Bridge VLAN filtering" and is located in the Interfaces section and under the switch0 bridge. I got it working without any issues, thanks.