Commit bc6ff4c7 authored by Hayes Wang's avatar Hayes Wang Committed by Zheng Zengkai
Browse files

r8152: limit the RX buffer size of RTL8153A for USB 2.0

stable inclusion
from stable-5.10.27
commit 961d9a6e47b9880068317638dbd413b3a5691a25
bugzilla: 51493

--------------------------------

[ Upstream commit f91a50d8 ]

If the USB host controller is EHCI, the throughput is reduced from
300Mb/s to 60Mb/s, when the rx buffer size is modified from 16K to
32K.

According to the EHCI spec, the maximum size of the qTD is 20K.
Therefore, when the driver uses more than 20K buffer, the latency
time of EHCI would be increased. And, it let the RTL8153A get worse
throughput.

However, the driver uses alloc_pages() for rx buffer, so I limit
the rx buffer to 16K rather than 20K.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205923


Fixes: ec5791c2 ("r8152: separate the rx buffer size")
Reported-by: default avatarRobert Davies <robdavies1977@gmail.com>
Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatar  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent e15d3f97
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment