summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-mtk.c
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2017-03-09 14:39:34 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-09 18:00:39 +0100
commit94a631d91ad341b3b4bdac72d1104d9f090e0ca9 (patch)
tree2e7df18a34001344606589f6e1f463575418de30 /drivers/usb/host/xhci-mtk.c
parentMerge tag 'usb-serial-4.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
downloadlinux-94a631d91ad341b3b4bdac72d1104d9f090e0ca9.tar.xz
linux-94a631d91ad341b3b4bdac72d1104d9f090e0ca9.zip
usb: xhci-mtk: check hcc_params after adding primary hcd
hcc_params is set in xhci_gen_setup() called from usb_add_hcd(), so checks the Maximum Primary Stream Array Size in the hcc_params register after adding primary hcd. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-mtk.c')
-rw-r--r--drivers/usb/host/xhci-mtk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 9066ec9e0c2e..6ac73a6b4da6 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -678,13 +678,13 @@ static int xhci_mtk_probe(struct platform_device *pdev)
goto power_off_phys;
}
- if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
- xhci->shared_hcd->can_do_streams = 1;
-
ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
if (ret)
goto put_usb3_hcd;
+ if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
+ xhci->shared_hcd->can_do_streams = 1;
+
ret = usb_add_hcd(xhci->shared_hcd, irq, IRQF_SHARED);
if (ret)
goto dealloc_usb2_hcd;