diff options
author | Chris Packham <chris.packham@alliedtelesis.co.nz> | 2020-09-14 00:59:26 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-14 17:45:28 +0300 |
commit | dfee57a8a6655f3b87fc34c3c07a8b05fd2aae29 (patch) | |
tree | 4ceac1d996d3ca122c1ef9d939f854bcec2bedf4 /drivers/usb/host | |
parent | fccee0baced04636952cd580ddee4bb8cbb9544c (diff) | |
download | linux-dfee57a8a6655f3b87fc34c3c07a8b05fd2aae29.tar.xz |
usb: host: ehci-platform: Add workaround for brcm, xgs-iproc-ehci
The ehci controller found in some Broadcom switches with integrated SoCs
has an issue which causes a soft lockup with large transfers like you
see when running ext4 on USB3 flash drive.
Port the fix from the Broadcom XLDK to increase the OUT_THRESHOLD to
avoid the problem.
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20200913215926.29880-1-chris.packham@alliedtelesis.co.nz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-platform.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index 4585a3a24678..a48dd3fac153 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c @@ -42,6 +42,9 @@ #define EHCI_MAX_CLKS 4 #define hcd_to_ehci_priv(h) ((struct ehci_platform_priv *)hcd_to_ehci(h)->priv) +#define BCM_USB_FIFO_THRESHOLD 0x00800040 +#define bcm_iproc_insnreg01 hostpc[0] + struct ehci_platform_priv { struct clk *clks[EHCI_MAX_CLKS]; struct reset_control *rsts; @@ -75,6 +78,11 @@ static int ehci_platform_reset(struct usb_hcd *hcd) if (pdata->no_io_watchdog) ehci->need_io_watchdog = 0; + + if (of_device_is_compatible(pdev->dev.of_node, "brcm,xgs-iproc-ehci")) + ehci_writel(ehci, BCM_USB_FIFO_THRESHOLD, + &ehci->regs->bcm_iproc_insnreg01); + return 0; } |