diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 44eeaa016f1..7d60d1f4deb 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -1112,8 +1112,18 @@ int xhci_endpoint_init(struct xhci_hcd *xhci, | |||
1112 | ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); | 1112 | ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); |
1113 | 1113 | ||
1114 | /* Set up the endpoint ring */ | 1114 | /* Set up the endpoint ring */ |
1115 | virt_dev->eps[ep_index].new_ring = | 1115 | /* |
1116 | xhci_ring_alloc(xhci, 1, true, mem_flags); | 1116 | * Isochronous endpoint ring needs bigger size because one isoc URB |
1117 | * carries multiple packets and it will insert multiple tds to the | ||
1118 | * ring. | ||
1119 | * This should be replaced with dynamic ring resizing in the future. | ||
1120 | */ | ||
1121 | if (usb_endpoint_xfer_isoc(&ep->desc)) | ||
1122 | virt_dev->eps[ep_index].new_ring = | ||
1123 | xhci_ring_alloc(xhci, 8, true, mem_flags); | ||
1124 | else | ||
1125 | virt_dev->eps[ep_index].new_ring = | ||
1126 | xhci_ring_alloc(xhci, 1, true, mem_flags); | ||
1117 | if (!virt_dev->eps[ep_index].new_ring) { | 1127 | if (!virt_dev->eps[ep_index].new_ring) { |
1118 | /* Attempt to use the ring cache */ | 1128 | /* Attempt to use the ring cache */ |
1119 | if (virt_dev->num_rings_cached == 0) | 1129 | if (virt_dev->num_rings_cached == 0) |