Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264985
b: refs/heads/master
c: 78c58a5
h: refs/heads/master
i:
  264983: e1f20cd
v: v3
  • Loading branch information
Sebastian Andrzej Siewior authored and Felipe Balbi committed Sep 9, 2011
1 parent 18c87f5 commit 06fa223
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 42077b0a3328792974b232691f5d0eb9dd644768
refs/heads/master: 78c58a53c9864447f2a46d4c06dd3c2616823ad2
10 changes: 10 additions & 0 deletions trunk/drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ void dwc3_map_buffer_to_dma(struct dwc3_request *req)
{
struct dwc3 *dwc = req->dep->dwc;

if (req->request.length == 0) {
/* req->request.dma = dwc->setup_buf_addr; */
return;
}

if (req->request.dma == DMA_ADDR_INVALID) {
req->request.dma = dma_map_single(dwc->dev, req->request.buf,
req->request.length, req->direction
Expand All @@ -78,6 +83,11 @@ void dwc3_unmap_buffer_from_dma(struct dwc3_request *req)
{
struct dwc3 *dwc = req->dep->dwc;

if (req->request.length == 0) {
req->request.dma = DMA_ADDR_INVALID;
return;
}

if (req->mapped) {
dma_unmap_single(dwc->dev, req->request.dma,
req->request.length, req->direction
Expand Down

0 comments on commit 06fa223

Please sign in to comment.