Commit f5c03006dd1794362a2be7136fed9e664bc1775b
Committed by
Marek Vasut
1 parent
672ad18c27
Exists in
v2017.01-smarct4x
and in
40 other branches
usb: ci_udc: Support larger packets
ci_ep_queue() currently only fills in the page0/page1 fields in the queue item. If the buffer is larger than 4KiB (unaligned) or 8KiB (page-aligned), then this prevents the HW from knowing where to write the balance of the data. Fix this by initializing all 5 pageN pointers, which allows up to 16KiB (potentially non-page-aligned) buffers. Signed-off-by: Stephen Warren <swarren@nvidia.com>
Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff
drivers/usb/gadget/ci_udc.c
... | ... | @@ -350,6 +350,9 @@ |
350 | 350 | item->info = INFO_BYTES(len) | INFO_IOC | INFO_ACTIVE; |
351 | 351 | item->page0 = (uint32_t)ci_ep->b_buf; |
352 | 352 | item->page1 = ((uint32_t)ci_ep->b_buf & 0xfffff000) + 0x1000; |
353 | + item->page2 = ((uint32_t)ci_ep->b_buf & 0xfffff000) + 0x2000; | |
354 | + item->page3 = ((uint32_t)ci_ep->b_buf & 0xfffff000) + 0x3000; | |
355 | + item->page4 = ((uint32_t)ci_ep->b_buf & 0xfffff000) + 0x4000; | |
353 | 356 | ci_flush_qtd(num); |
354 | 357 | |
355 | 358 | head->next = (unsigned) item; |