Closed rtadams89 closed 1 year ago
Can you try a direct connection to another switch or PC?
I have attempted connecting it to another device with a 2.5G port. The connection still only establishes at 1000Mb/s. ethtool output shows the Synology is only advertising up to 1000Mb/s link modes, so it makes sense that the connection would auto negotiate to that. I also just noticed the device is recognized as supporting "2500baseX/Full" which is odd as "basex" would imply the use of fiberoptic for the physical layer, which is not present here. Is this perhaps the issue; the driver doesn't know 2500baseT/full is supported, and therefore doesn't advertise it on a twisted pair port?
Taking a shot in the dark here, but... Line 79 of https://github.com/bb-qq/r8152/blob/master/compatibility.h
#define ETHTOOL_LINK_MODE_2500baseT_Full_BIT ETHTOOL_LINK_MODE_2500baseX_Full_BIT
Is that right?
Yes, old kernels do not support 2500baseT, so the link mode is disguised as 2500baseX for ethtool in Realtek drivers.
The actual negotiation is completed in hardware, and the chip only has an interface that specifies a link rate such as 2500. So 2500baseT is used actually.
I can manually set the speed to 2500 via ethtool -s eth2 speed 2500 duplex full autoneg on but after a reboot the adapter defaults to 1000 again.
Also, this command does not work. That is the reason why a slightly special parameter must be specified to ethtool in order to fix the link speed at 2500Mbps. https://github.com/bb-qq/r8152/wiki/Troubleshooting#disable-auto-negotiation https://github.com/bb-qq/r8152/blob/master/ReadMe.txt#L19
Also, the device may not have enough power. You might try disconnecting all other USB devices as a test.
Yes, old kernels do not support 2500baseT, so the link mode is disguised as 2500baseX for ethtool in Realtek drivers
Ahh, that makes sense.
Also, this command does not work.
Interesting, as that command does work for me. Once run, the link renegotiates to 2500 and even if I disconnect and reconnect the Ethernet cable, it again connects at 2500. It's only after a reboot that the link returns to 1000, which is expected.
I've tried running ethtool -s eth2 autoneg on advertise 0x802f
and that produces the same effect.
Also, the device may not have enough power. You might try disconnecting all other USB devices as a test.
I just tried with my external usb drive removed and still get the same behavior. Maybe it's just the particular adapter I am using, though it all seems odd that it can be "fixed" by telling it to advertise 2500 from software.
There does not seem to be anything more I can do about this issue. Can we close this issue?
The fact that I can make this work just by forcing the advertised speed to 2500 from software makes me think there is something in software that is wrong to start with. If there is any additional data points I can provide to help figure out what that is, let me know. If you disagree and think this is a hardware issue or otherwise not fixable in the software, feel free to close out.
As for auto-negotiation, it is done at the hardware level between the Ethernet adapter and the switch. The driver just specifies whether auto-negotiation is performed or not, and which link speeds it advertises as supported. https://github.com/bb-qq/r8152/blob/master/r8152.c#L9168
There is a non-zero possibility that some kind of timing is affecting this, but it isn't easy to corroborate. So please let me close this issue.
Description of the problem
The network interface falls back to 1000Mbit speed. I can manually set the speed to 2500 via
ethtool -s eth2 speed 2500 duplex full autoneg on
but after a reboot the adapter defaults to 1000 again.Description of your products
DS918+ running DSM 7.1.1 rtl8156b based USB adapter Tested with r8152-apollolake-2.16.3-4test and r8152-apollolake-2.16.3-3 QNAP QSW-1105-5T 5-Port Unmanaged 2.5GbE Switch
Description of your environment
rtl8156b based USB adapter connected to DS918+. CAT 6 cable connecting adapter to network switch.
Output of lsusb command
Output of ifconfig -a command
Output of ethtool command (after reboot)
Output of ethtool command (after manually setting speed to 2500)