Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265126
b: refs/heads/master
c: 46e172d
h: refs/heads/master
v: v3
  • Loading branch information
Neil Zhang authored and Felipe Balbi committed Oct 13, 2011
1 parent 459a099 commit 44b336d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: daec765da767e4a6a30e1298862b28f2cae9a73f
refs/heads/master: 46e172dfb38c9dad2ea52d8c161834c1f0bd2473
9 changes: 8 additions & 1 deletion trunk/drivers/usb/gadget/mv_udc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,13 @@ udc_prime_status(struct mv_udc *udc, u8 direction, u16 status, bool empty)
req->req.complete = NULL;
req->dtd_count = 0;

if (req->req.dma == DMA_ADDR_INVALID) {
req->req.dma = dma_map_single(ep->udc->gadget.dev.parent,
req->req.buf, req->req.length,
ep_dir(ep) ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
req->mapped = 1;
}

/* prime the data phase */
if (!req_to_dtd(req))
retval = queue_dtd(ep, req);
Expand Down Expand Up @@ -2115,7 +2122,7 @@ static int __devinit mv_udc_probe(struct platform_device *dev)

/* allocate a small amount of memory to get valid address */
udc->status_req->req.buf = kzalloc(8, GFP_KERNEL);
udc->status_req->req.dma = virt_to_phys(udc->status_req->req.buf);
udc->status_req->req.dma = DMA_ADDR_INVALID;

udc->resume_state = USB_STATE_NOTATTACHED;
udc->usb_state = USB_STATE_POWERED;
Expand Down

0 comments on commit 44b336d

Please sign in to comment.