patch "usb: xhci-mtk: fix broken streams issue on 0.96 xHCI" added to usb-next
Subsystems (5)
This is a note to let you know that I've just added the patch titled
usb: xhci-mtk: fix broken streams issue on 0.96 xHCI
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release during the merge window.
If you have any questions about this process, please let me know.
From 1f743c8749eacd906dd3ce402b7cd540bb69ad3e Mon Sep 17 00:00:00 2001
From: Chunfeng Yun <[email protected]>
Date: Wed, 31 Mar 2021 17:05:52 +0800
Subject: usb: xhci-mtk: fix broken streams issue on 0.96 xHCI
The MediaTek 0.96 xHCI controller on some platforms does not support bulk stream even HCCPARAMS says supporting, due to MaxPSASize is set a default value 1 by mistake, here use XHCI_BROKEN_STREAMS quirk to fix it.
--- drivers/usb/host/xhci-mtk.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/usb/host/xhci-mtk.c +9 -1
@@ -411,6 +411,13 @@ static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci) xhci->quirks |=XHCI_SPURIOUS_SUCCESS ;if (mtk->lpm_support) xhci->quirks |=XHCI_LPM_SUPPORT ; + +/* +* MTK xHCI 0.96: PSA is 1 by default even if doesn't support stream, +* and it's 3 when support it. +*/ +if (xhci->hci_version <0x100 &&HCC_MAX_PSA (xhci->hcc_params) ==4 ) + xhci->quirks |=XHCI_BROKEN_STREAMS ; }/* called during probe() after chip reset completes */
@@ -572,7 +579,8 @@ static int xhci_mtk_probe(struct platform_device *pdev)if (ret) goto put_usb3_hcd; -if (HCC_MAX_PSA (xhci->hcc_params) >=4 ) +if (HCC_MAX_PSA (xhci->hcc_params) >=4 && + !(xhci->quirks &XHCI_BROKEN_STREAMS )) xhci->shared_hcd->can_do_streams =1 ; ret =usb_add_hcd (xhci->shared_hcd, irq,IRQF_SHARED );
Signature · 1 line
2.31.1