summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2018-09-07 15:29:12 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-26 08:39:31 +0200
commit3f081e53ccd09d0e60557dd20971df94d1375015 (patch)
treeb0902791351c200f744e8041f41610c1fbdf0d6f /drivers/usb
parent3d7a00c4f0aa4abd95c12d7d38652e6e2fc72dfa (diff)
downloadlinux-stable-3f081e53ccd09d0e60557dd20971df94d1375015.tar.gz
linux-stable-3f081e53ccd09d0e60557dd20971df94d1375015.tar.bz2
linux-stable-3f081e53ccd09d0e60557dd20971df94d1375015.zip
usb: xhci: fix interrupt transfer error happened on MTK platforms
commit 0a3b53305c8ff427bbc1d9d5bd78524007f19600 upstream. The MTK xHCI controller use some reserved bytes in endpoint context for bandwidth scheduling, so need keep them in xhci_endpoint_copy(); The issue is introduced by: commit f5249461b504 ("xhci: Clear the host side toggle manually when endpoint is soft reset") It resets endpoints and will drop bandwidth scheduling parameters used by interrupt or isochronous endpoints on MTK xHCI controller. Fixes: f5249461b504 ("xhci: Clear the host side toggle manually when endpoint is soft reset") Cc: stable@vger.kernel.org Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Tested-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/xhci-mem.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index ef350c33dc4a..b1f27aa38b10 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1613,6 +1613,10 @@ void xhci_endpoint_copy(struct xhci_hcd *xhci,
in_ep_ctx->ep_info2 = out_ep_ctx->ep_info2;
in_ep_ctx->deq = out_ep_ctx->deq;
in_ep_ctx->tx_info = out_ep_ctx->tx_info;
+ if (xhci->quirks & XHCI_MTK_HOST) {
+ in_ep_ctx->reserved[0] = out_ep_ctx->reserved[0];
+ in_ep_ctx->reserved[1] = out_ep_ctx->reserved[1];
+ }
}
/* Copy output xhci_slot_ctx to the input xhci_slot_ctx.