Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364570
b: refs/heads/master
c: 0324f25
h: refs/heads/master
v: v3
  • Loading branch information
Felipe Balbi committed Mar 18, 2013
1 parent 2f6d030 commit 37280bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f6da778578de6b7c43b943cf9cfba12289e9ff3
refs/heads/master: 0324f25fc66cd94273d0aa67637ed260ff70f01e
17 changes: 7 additions & 10 deletions trunk/drivers/usb/gadget/fusb300_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -938,25 +938,22 @@ static void fusb300_wait_idma_finished(struct fusb300_ep *ep)
static void fusb300_set_idma(struct fusb300_ep *ep,
struct fusb300_request *req)
{
dma_addr_t d;
int ret;

d = dma_map_single(NULL, req->req.buf, req->req.length, DMA_TO_DEVICE);

if (dma_mapping_error(NULL, d)) {
printk(KERN_DEBUG "dma_mapping_error\n");
ret = usb_gadget_map_request(&ep->fusb300->gadget,
&req->req, DMA_TO_DEVICE);
if (ret)
return;
}

dma_sync_single_for_device(NULL, d, req->req.length, DMA_TO_DEVICE);

fusb300_enable_bit(ep->fusb300, FUSB300_OFFSET_IGER0,
FUSB300_IGER0_EEPn_PRD_INT(ep->epnum));

fusb300_fill_idma_prdtbl(ep, d, req->req.length);
fusb300_fill_idma_prdtbl(ep, req->req.dma, req->req.length);
/* check idma is done */
fusb300_wait_idma_finished(ep);

dma_unmap_single(NULL, d, req->req.length, DMA_TO_DEVICE);
usb_gadget_unmap_request(&ep->fusb300->gadget,
&req->req, DMA_TO_DEVICE);
}

static void in_ep_fifo_handler(struct fusb300_ep *ep)
Expand Down

0 comments on commit 37280bd

Please sign in to comment.