inindev / nanopi-r5

stock debian arm64 linux for the nanopi r5c & r5s
GNU General Public License v3.0
100 stars 17 forks source link

Ethernet ports do not work correctly on 2.5GB switch #24

Closed twinclouds closed 10 months ago

twinclouds commented 10 months ago

This implementation of Debian for NanoPi R5C is much better than the stock images. However, when I test the ethernet behavior, I found it works well on Gigabit ethernet switches but not on 2.5G switches. On 2.5G switched network, it always negotiate to 100MB date rate, even though on 1GB switches it achieves 1Gb throughput. From lshw, it appears the NIC installed in the R5C are RTL8125, but the driver used is r8169. I don't know if this is the problem or not, though. Below is the lshw output:

NanoPi-R5C:~$ sudo lshw -C network *-network description: Ethernet interface product: RTL8125 2.5GbE Controller vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0001:01:00.0 logical name: lan0 version: 05 serial: a8:be:fc:be:a0:e8 capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=6.1.0-10-arm64 firmware=rtl8125b-2_0.0.2 07/13/20 ip=192.168.2.110 latency=0 link=no multicast=yes port=twisted pair resources: irq:41 ioport:100000(size=256) memory:f2200000-f220ffff memory:f2210000-f2213fff

inindev commented 10 months ago

great detective work, thank you

can you try installing the realtek firmare to see if the correct driver gets loaded?

apt install firmware-realtek

inindev commented 10 months ago

[ 15.146796] r8169 0000:01:00.0: firmware: direct-loading firmware rtl_nic/rtl8125b-2.fw

twinclouds commented 10 months ago

I tried "apt install firmware-realtek" that John suggested and it works. I think my issue can be closed.