Skip to content

Commit 817349b

Browse files
Prashanth Kgregkh
Prashanth K
authored andcommitted
usb: dwc3: host: Set XHCI_SG_TRB_CACHE_SIZE_QUIRK
Upstream commit bac1ec5 ("usb: xhci: Set quirk for XHCI_SG_TRB_CACHE_SIZE_QUIRK") introduced a new quirk in XHCI which fixes XHC timeout, which was seen on synopsys XHCs while using SG buffers. But the support for this quirk isn't present in the DWC3 layer. We will encounter this XHCI timeout/hung issue if we run iperf loopback tests using RTL8156 ethernet adaptor on DWC3 targets with scatter-gather enabled. This gets resolved after enabling the XHCI_SG_TRB_CACHE_SIZE_QUIRK. This patch enables it using the xhci device property since its needed for DWC3 controller. In Synopsys DWC3 databook, Table 9-3: xHCI Debug Capability Limitations Chained TRBs greater than TRB cache size: The debug capability driver must not create a multi-TRB TD that describes smaller than a 1K packet that spreads across 8 or more TRBs on either the IN TR or the OUT TR. Cc: [email protected] #5.11 Signed-off-by: Prashanth K <[email protected]> Acked-by: Thinh Nguyen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 20d03ae commit 817349b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/usb/dwc3/host.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static int dwc3_host_get_irq(struct dwc3 *dwc)
6161

6262
int dwc3_host_init(struct dwc3 *dwc)
6363
{
64-
struct property_entry props[4];
64+
struct property_entry props[5];
6565
struct platform_device *xhci;
6666
int ret, irq;
6767
int prop_idx = 0;
@@ -89,6 +89,8 @@ int dwc3_host_init(struct dwc3 *dwc)
8989

9090
memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props));
9191

92+
props[prop_idx++] = PROPERTY_ENTRY_BOOL("xhci-sg-trb-cache-size-quirk");
93+
9294
if (dwc->usb3_lpm_capable)
9395
props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb3-lpm-capable");
9496

0 commit comments

Comments
 (0)