Skip to content

Commit

Permalink
usb: xhci: Set quirk for XHCI_SG_TRB_CACHE_SIZE_QUIRK
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Tejas Joglekar authored and gregkh committed Dec 9, 2020
1 parent b175d27 commit bac1ec5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/usb/host/xhci-plat.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
if (priv && (priv->quirks & XHCI_SKIP_PHY_INIT))
hcd->skip_phy_initialization = 1;

if (priv && (priv->quirks & XHCI_SG_TRB_CACHE_SIZE_QUIRK))
xhci->quirks |= XHCI_SG_TRB_CACHE_SIZE_QUIRK;

ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
if (ret)
goto disable_usb_phy;
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/host/xhci.h
Original file line number Diff line number Diff line change
Expand Up @@ -1878,6 +1878,7 @@ struct xhci_hcd {
#define XHCI_RENESAS_FW_QUIRK BIT_ULL(36)
#define XHCI_SKIP_PHY_INIT BIT_ULL(37)
#define XHCI_DISABLE_SPARSE BIT_ULL(38)
#define XHCI_SG_TRB_CACHE_SIZE_QUIRK BIT_ULL(39)

unsigned int num_active_eps;
unsigned int limit_active_eps;
Expand Down

0 comments on commit bac1ec5

Please sign in to comment.