Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289602
b: refs/heads/master
c: af93f2c
h: refs/heads/master
v: v3
  • Loading branch information
Felipe Balbi committed Feb 28, 2012
1 parent a9d248b commit 5d70971
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 05d00fbe87f185d55edf7461d4f714a3909bc908
refs/heads/master: af93f2c77ac79e2f0bed542b5890f618d9d0cdb3
18 changes: 8 additions & 10 deletions trunk/drivers/usb/gadget/net2272.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,9 @@ net2272_done(struct net2272_ep *ep, struct net2272_request *req, int status)
status = req->req.status;

dev = ep->dev;
if (use_dma && req->mapped) {
dma_unmap_single(dev->dev, req->req.dma, req->req.length,
ep->is_in ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
req->req.dma = DMA_ADDR_INVALID;
req->mapped = 0;
}
if (use_dma && ep->dma)
usb_gadget_unmap_request(&dev->gadget, &req->req,
ep->is_in);

if (status && status != -ESHUTDOWN)
dev_vdbg(dev->dev, "complete %s req %p stat %d len %u/%u buf %p\n",
Expand Down Expand Up @@ -850,10 +847,11 @@ net2272_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
return -ESHUTDOWN;

/* set up dma mapping in case the caller didn't */
if (use_dma && ep->dma && _req->dma == DMA_ADDR_INVALID) {
_req->dma = dma_map_single(dev->dev, _req->buf, _req->length,
ep->is_in ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
req->mapped = 1;
if (use_dma && ep->dma) {
status = usb_gadget_map_request(&dev->gadget, _req,
ep->is_in);
if (status)
return status;
}

dev_vdbg(dev->dev, "%s queue req %p, len %d buf %p dma %08llx %s\n",
Expand Down

0 comments on commit 5d70971

Please sign in to comment.