Bug 196747 - Realtek 8153 disconnects with EPROTO -71 when hub has traffic, resetting entire usb device tree
Summary: Realtek 8153 disconnects with EPROTO -71 when hub has traffic, resetting enti...
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_network@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-23 20:00 UTC by Harald Rudell
Modified: 2021-09-17 07:17 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.12.8-041208-generic
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Harald Rudell 2017-08-23 20:00:52 UTC
Driver: r8152

1. When this device is exposed to traffic to other usb devices connected to the same hub, it disconnects
2. On disconnect, the usb hub resets so that all sibling and child devices are disconnected, too

Log:
net_ratelimit: 2705 callbacks suppressed
r8152 1-1.3.1:1.0 enx0050b619...: Rx status -71
[ repeated 10 times ]
usb 1-1.3.1: USB disconnect, device number 34

This has been tested both with:
v1.08.9 the very old kernel-provided driver
v2.08.0 (2016/12/09) compiled from source https://github.com/rickhofstede/linksys_usb3gigv1_linux

Second problem:
This hardware supports 5 Gb/s usb3 but in Linux it only performs as 480 Mb/s usb2. This is a problem because Gigabit Ethernet is faster and being slowed-down to 480 Mb/s

lsusb
...
0bda:8153 Realtek Semiconductor Corp.
lsusb --tree
...
Port 2: Dev 38, If 0, Class=Vendor Specific Class, Driver=r8152, 480M
Comment 1 Harald Rudell 2017-08-23 20:07:34 UTC
Meanwhile, do not connect Realtek USB to a hub that has sibling ports being used

The device needs its own single-usb-port or a hub with no other devices connected

/sys/bus/usb/devices lists the device tree reliably
Comment 2 Harald Rudell 2017-08-23 20:15:04 UTC
This is the chip that is sold in the Apple store as Belkin USB-C LAN
if blessed by Apple it must work...

There is a macOS driver that appears to work well
However, it's 480 Mb/s under macOS, too
Comment 3 Harald Rudell 2017-08-23 20:19:59 UTC
Correction: macOS has it at 5 Gb/s, but only when connected directly to the computer. I have some adapters that Apple apparently do not like.
Comment 4 Harald Rudell 2017-08-23 20:28:57 UTC
Therefore, the speed issue under Linux could be an adapter problem, too
Comment 5 Harald Rudell 2017-08-24 02:31:45 UTC
I can confirm that Realtek 8153 does work at 5 Gb/s.
The non-standard passive male-usb-c to male-usb-a that people use gives 480 Mb/s one way, but 5 Gb/s when the usb-c connector is turned upside down

It also seems that the xhci_hcd built-in kernel driver resets the usb hubs that has no connected devices periodically every 3 minutes to 3 hours. More logging making paranoid people think something is broken.

Anyway, lots of traffic flowing through the hub where r8153 is connected causes the hub to be reset and of course whoever is receiving the usb traffic to fail. This includes resetting sensitive hardware like network interfaces and usb drives.
Comment 6 Harald Rudell 2017-08-24 02:32:22 UTC
(5 Gb/s obtained with driver version 2.08.0) unclear if 1.08.9 can do it
Comment 7 Harald Rudell 2017-08-24 03:00:26 UTC
The 1.08.9 r8152 driver can only provide 480 Mb/s and not the 5 Gb/s that the hardware is capable of
I think the github readme was explaining the problem as differing device ids for the same chip
Comment 8 Harald Rudell 2017-08-24 03:10:40 UTC
Jesus,

lsusb --tree
crashes Realtek, too. Just not the hub.

3 seconds before lsusb completes:

usb 2-2: new SuperSpeed USB device number 35 using xhci_hcd
usb 2-2: New USB device found, idVendor=0bda, idProduct=8153
usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=6
usb 2-2: Product: USB 10/100/1000 LAN
usb 2-2: Manufacturer: Realtek
usb 2-2: SerialNumber: 000001000000
usb 2-2: reset SuperSpeed USB device number 35 using xhci_hcd
Comment 9 Harald Rudell 2017-08-24 03:14:34 UTC
No scratch #8. I was playing with multiple Realtek.
Comment 10 Harald Rudell 2017-08-25 23:32:32 UTC
It's worse. If a Realtek USB device is plugged in anywhere on any port, that and the other device will reset. You can not avoid the crash through some clever hub arrangement, it will crash.
Comment 11 Harald Rudell 2017-09-06 17:02:15 UTC
r8152 2.08.0 with the same symptoms resets the entire usb bus with all connected usb devices and hubs periodically every two weeks or so without any provocation.

This is unacceptable if you have sensitive usb devices other than silly things like computer mice.
Comment 12 Harald Rudell 2017-09-06 17:09:54 UTC
The ax88179_178a driver has none of these problems, a driver for different hardware providing the same function on the same computer
Comment 13 Harald Rudell 2017-09-06 17:13:07 UTC
So, if you bot macOS, you must use the Realtek b/c that's the only hardware Apple truly writes drivers for
Boot into Linux Realtek has to be unplugged because of the poor driver software, and instead use the Asix that itself has a shitty driver for macOS.

Note You need to log in before you can comment on or make changes to this bug.