usb: dwc3: core: configure TX/RX threshold for DWC3_IP
authorStanley Chang <stanley_chang@realtek.com>
Tue, 12 Sep 2023 04:19:02 +0000 (12:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Oct 2023 12:05:53 +0000 (14:05 +0200)
commite72fc8d6a12af7ae8dd1b52cf68ed68569d29f80
treebc5bf9aeb9d8c316af290d3aa045480d743bf7a7
parenta3d19c289bedc99f01010020074f00b60640ade8
usb: dwc3: core: configure TX/RX threshold for DWC3_IP

In Synopsys's dwc3 data book:
To avoid underrun and overrun during the burst, in a high-latency bus
system (like USB), threshold and burst size control is provided through
GTXTHRCFG and GRXTHRCFG registers.

In Realtek DHC SoC, DWC3 USB 3.0 uses AHB system bus. When dwc3 is
connected with USB 2.5G Ethernet, there will be overrun problem.
Therefore, setting TX/RX thresholds can avoid this issue.

Signed-off-by: Stanley Chang <stanley_chang@realtek.com>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20230912041904.30721-1-stanley_chang@realtek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h