Skip to content

Commit bac1ec5

Browse files
Tejas Joglekargregkh
Tejas Joglekar
authored andcommitted
usb: xhci: Set quirk for XHCI_SG_TRB_CACHE_SIZE_QUIRK
This commit uses the private data passed by parent device to set the quirk for Synopsys xHC. This patch fixes the SNPS xHC hang issue when the data is scattered across small buffers which does not make atleast MPS size for given TRB cache size of SNPS xHC. Signed-off-by: Tejas Joglekar <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b175d27 commit bac1ec5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/usb/host/xhci-plat.c

+3
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
333333
if (priv && (priv->quirks & XHCI_SKIP_PHY_INIT))
334334
hcd->skip_phy_initialization = 1;
335335

336+
if (priv && (priv->quirks & XHCI_SG_TRB_CACHE_SIZE_QUIRK))
337+
xhci->quirks |= XHCI_SG_TRB_CACHE_SIZE_QUIRK;
338+
336339
ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
337340
if (ret)
338341
goto disable_usb_phy;

drivers/usb/host/xhci.h

+1
Original file line numberDiff line numberDiff line change
@@ -1878,6 +1878,7 @@ struct xhci_hcd {
18781878
#define XHCI_RENESAS_FW_QUIRK BIT_ULL(36)
18791879
#define XHCI_SKIP_PHY_INIT BIT_ULL(37)
18801880
#define XHCI_DISABLE_SPARSE BIT_ULL(38)
1881+
#define XHCI_SG_TRB_CACHE_SIZE_QUIRK BIT_ULL(39)
18811882

18821883
unsigned int num_active_eps;
18831884
unsigned int limit_active_eps;

0 commit comments

Comments
 (0)