Bug 205923
Summary: | TP-Link UE300 USB 3.0 to GigaBit ethernet adpater using r8152 module very slow after kernel 5.4 upgrade | ||
---|---|---|---|
Product: | Drivers | Reporter: | Louis Erasmus (ras.elect) |
Component: | Network | Assignee: | drivers_network (drivers_network) |
Status: | NEW --- | ||
Severity: | normal | CC: | billk, nevermind1025, oymul-palapan, rob, yu |
Priority: | P1 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | 5.4.1 - 5.10.8 | Subsystem: | |
Regression: | Yes | Bisected commit-id: |
Description
Louis Erasmus
2019-12-20 06:29:05 UTC
Same problem with kernel 5.4.6 Same problem with kernel 5.4.7 Same problem with kernel 5.4.8 Same problem with kernel 5.4.10 Same problem with kernel 5.4.11 Same problem with kernel 5.4.12 Same problem with kernel 5.4.13 Same problem with kernel 5.4.14 Same problem with kernel 5.4.15 Same here on Arch and Debian Testing When TP-LINK UE330 is connected to the USB 3.0 port, the network speed is about 1Gbps, however when the USB 2.0 is used, the download speed is limited to 60 Mbps, the upload speed is about 200 Mbps Same problem with kernel 5.5.1 Problem still unresolved kernel 5.5.3 Problem still unresolved kernel 5.5.5 Problem still unresolved kernel 5.5.7 I have exactly the same problem on the Lenovo ThinkPad USB 3.0 Ethernet Adapter: Arch Linux kernel 5.5.8 driver: r8152 version: v1.11.11 firmware-version: rtl8153a-2 v1 10/23/19: when connected to the USB 2.0 port, the download speed is limited to 60 Mbps, the upload speed is about 200 Mbps. On Debian Stable on the same USB 2.0 port, the speed and downloads and uploads are 300 Mbps. Problem still unresolved kernel 5.5.10 I too have this problem with TP-Link UE300 when used on USB 2.0 port using Arch Linux (Kernel 5.6.3). Bisect points me to ec5791c202aca90c1b3b99dff268a995cf2d6aa1 (included since 5.4) as the commit which causes this issue; it increased the rx buffer size for r8153 from 16 KB to 32 KB. Before this commit I get about 3xx Mbits/sec for receive. After the commit I can only go up to 5x Mbits/sec for receive. Transmission speed seems unaffected by this commit, which makes sense since this commit does not touch anything that is transmission related. Changing the rx buffer size back to 16 KB (through modifying the source code, as the driver does not allow changing buffer size through ethtool) make this issue go away, further confirming commit ec5791c202aca90c1b3b99dff268a995cf2d6aa1 is to blame. However I have no idea why increased rx buffer size affects performance nor if this issue is device specific. Thanks Shung-Hsi Yu. Hope it gets patched soon. I can confirm this on 5.4.38 (gentoo-sources) - USB2, RTL8153 chipset using the r8152 driver. I suspect the bug only occurs with the above configuration and its actually a USB2 problem. I have two of these adaptors, two different manufacturers using the same RTL8153 chipset. Using the following nullifies the commit above (resets the buffer to 16Kb for the r8153 chipset.) --- /root/tmp/r8152.c 2020-05-07 20:25:31.635253447 +0800 +++ drivers/net/usb/r8152.c 2020-05-07 20:42:32.853603314 +0800 @@ -789,7 +789,7 @@ u32 tx_qlen; u32 coalesce; u32 advertising; - u32 rx_buf_sz; + u16 rx_buf_sz; u32 rx_copybreak; u32 rx_pending; @@ -5552,7 +5552,7 @@ ops->in_nway = rtl8153_in_nway; ops->hw_phy_cfg = r8153_hw_phy_cfg; ops->autosuspend_en = rtl8153_runtime_enable; - tp->rx_buf_sz = 32 * 1024; + tp->rx_buf_sz = 16 * 1024; tp->eee_en = true; tp->eee_adv = MDIO_EEE_1000T | MDIO_EEE_100TX; break; @@ -5570,7 +5570,7 @@ ops->in_nway = rtl8153_in_nway; ops->hw_phy_cfg = r8153b_hw_phy_cfg; ops->autosuspend_en = rtl8153b_runtime_enable; - tp->rx_buf_sz = 32 * 1024; + tp->rx_buf_sz = 16 * 1024; tp->eee_en = true; tp->eee_adv = MDIO_EEE_1000T | MDIO_EEE_100TX; break; Problem still unresolved kernel 5.7.2 Problem still unresolved kernel 5.7.12 Problem still unresolved kernel 5.8.1 Problem still unresolved kernel 5.10.3 Problem still unresolved kernel 5.10.8 I get this in kernel 5.10.8 I'm using Xubuntu 20.04 and my UE300 adapter is connected via USB2 on a Dell D830 laptop. I get 60Mb/s download on a 200Mb/s connection. I get this using the default kernel (5.4.0-62-generic) or mainline. If I use kernel 4.19.168 I get 220Mb/s download. A family member has an Acer laptop (E5-571) using Xubuntu 20.04 with default kernel (5.4.0-62-generic), it has USB2 and USB3. On this laptop though, I get 220Mb/s download when the above UE300 adapter is connected via USB3, I also get 200Mb/s download when its connected via USB2. This seems inconsistent. Could it be more than just this driver? Yes Robert, if you scroll back and look at Bill K's comment; it appears to be a USB2 problem. Thanks Louis, thanks for clarifying that. I must have miss understood what Bill K meant. You're welcome Robert. Disappointing that I can't use the UE300 at full speed since Kernel 5.4. I mean it would be easy just to get another adapter with the ASIX AX88179 chipset that I know would work fine; but still hoping for a fix. It is specific to the chipset and usb2 - if you cant move it to usb3 you could patch and rebuild the kernel. Not a big task. It might also help if you raise a bug with your distro kernel ... the kernel devs seem to be very slow on doing what seems a simple rollback of a change that causes a serious problem - the distro might be more responsive. BillK On 21/1/21 3:13 am, bugzilla-daemon@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=205923 > > --- Comment #28 from Louis Erasmus (ras.elect@gmail.com) --- > You're welcome Robert. Disappointing that I can't use the UE300 at full speed > since Kernel 5.4. I mean it would be easy just to get another adapter with > the > ASIX AX88179 chipset that I know would work fine; but still hoping for a fix. > Thanks Bill. I initially in 12/2019 reported the bug to Archlinux. It was closed in 02/2020 : https://bugs.archlinux.org/task/64869 Hi I brought it up with Ubuntu, seems like I will have to wait until upstream fixes it. So I have emailed realtek to see if they can/will help Rob Thanks Rob! |