Commit 5fc2e997 authored by Troy Kisky's avatar Troy Kisky Committed by Marek Vasut
Browse files

usb: gadget: mv_udc: flush item before head



Make sure the transfer descriptor is flushed
before the queue is updated so that the controller
will not see old information.
Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
parent 5a904430
...@@ -335,21 +335,20 @@ static int mv_ep_queue(struct usb_ep *ep, ...@@ -335,21 +335,20 @@ static int mv_ep_queue(struct usb_ep *ep,
item->info = INFO_BYTES(len) | INFO_IOC | INFO_ACTIVE; item->info = INFO_BYTES(len) | INFO_IOC | INFO_ACTIVE;
item->page0 = (uint32_t)mv_ep->b_buf; item->page0 = (uint32_t)mv_ep->b_buf;
item->page1 = ((uint32_t)mv_ep->b_buf & 0xfffff000) + 0x1000; item->page1 = ((uint32_t)mv_ep->b_buf & 0xfffff000) + 0x1000;
mv_flush_qtd(num);
head->next = (unsigned) item; head->next = (unsigned) item;
head->info = 0; head->info = 0;
DBG("ept%d %s queue len %x, buffer %p\n", DBG("ept%d %s queue len %x, buffer %p\n",
num, in ? "in" : "out", len, mv_ep->b_buf); num, in ? "in" : "out", len, mv_ep->b_buf);
mv_flush_qh(num);
if (in) if (in)
bit = EPT_TX(num); bit = EPT_TX(num);
else else
bit = EPT_RX(num); bit = EPT_RX(num);
mv_flush_qh(num);
mv_flush_qtd(num);
writel(bit, &udc->epprime); writel(bit, &udc->epprime);
return 0; return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment