From 71af7c25d48493ec4a8f3906dd2402cb333d224c Mon Sep 17 00:00:00 2001 From: Andiry Xu Date: Thu, 22 Jul 2010 15:23:47 -0700 Subject: [PATCH] --- yaml --- r: 208044 b: refs/heads/master c: a061a5a0b816de3b4711a2e96764bb3cd8df861e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/usb/host/xhci-mem.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 931954a2a341..654be7c44a6b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 04e51901dd44f40a5a385ced897f6bca87d5f40a +refs/heads/master: a061a5a0b816de3b4711a2e96764bb3cd8df861e diff --git a/trunk/drivers/usb/host/xhci-mem.c b/trunk/drivers/usb/host/xhci-mem.c index 44eeaa016f1b..7d60d1f4debb 100644 --- a/trunk/drivers/usb/host/xhci-mem.c +++ b/trunk/drivers/usb/host/xhci-mem.c @@ -1112,8 +1112,18 @@ int xhci_endpoint_init(struct xhci_hcd *xhci, ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); /* Set up the endpoint ring */ - virt_dev->eps[ep_index].new_ring = - xhci_ring_alloc(xhci, 1, true, mem_flags); + /* + * Isochronous endpoint ring needs bigger size because one isoc URB + * carries multiple packets and it will insert multiple tds to the + * ring. + * This should be replaced with dynamic ring resizing in the future. + */ + if (usb_endpoint_xfer_isoc(&ep->desc)) + virt_dev->eps[ep_index].new_ring = + xhci_ring_alloc(xhci, 8, true, mem_flags); + else + virt_dev->eps[ep_index].new_ring = + xhci_ring_alloc(xhci, 1, true, mem_flags); if (!virt_dev->eps[ep_index].new_ring) { /* Attempt to use the ring cache */ if (virt_dev->num_rings_cached == 0)