mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
r8152: limit the RX buffer size of RTL8153A for USB 2.0
[ Upstream commitf91a50d8b5] 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:ec5791c202("r8152: separate the rx buffer size") Reported-by: Robert Davies <robdavies1977@gmail.com> Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
048d0bf8ad
commit
1f103ca31c
@@ -5529,7 +5529,10 @@ static int rtl_ops_init(struct r8152 *tp)
|
||||
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;
|
||||
if (tp->udev->speed < USB_SPEED_SUPER)
|
||||
tp->rx_buf_sz = 16 * 1024;
|
||||
else
|
||||
tp->rx_buf_sz = 32 * 1024;
|
||||
tp->eee_en = true;
|
||||
tp->eee_adv = MDIO_EEE_1000T | MDIO_EEE_100TX;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user