Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10797
b: refs/heads/master
c: cb97c5c
h: refs/heads/master
i:
  10795: f2b0aef
v: v3
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Oct 28, 2005
1 parent 2cd7f5e commit f32a2a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: 1fcb4454cbada6dc495302172ac0412aa7d35fd4
refs/heads/master: cb97c5c9d0789d65d7ec42a80946fa9eb2ec5182
8 changes: 5 additions & 3 deletions trunk/drivers/usb/gadget/omap_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,14 +691,16 @@ static void next_out_dma(struct omap_ep *ep, struct omap_req *req)
}

static void
finish_out_dma(struct omap_ep *ep, struct omap_req *req, int status)
finish_out_dma(struct omap_ep *ep, struct omap_req *req, int status, int one)
{
u16 count;

if (status == 0)
ep->dma_counter = (u16) (req->req.dma + req->req.actual);
count = dma_dest_len(ep, req->req.dma + req->req.actual);
count += req->req.actual;
if (one)
count--;
if (count <= req->req.length)
req->req.actual = count;

Expand Down Expand Up @@ -747,7 +749,7 @@ static void dma_irq(struct omap_udc *udc, u16 irq_src)
if (!list_empty(&ep->queue)) {
req = container_of(ep->queue.next,
struct omap_req, queue);
finish_out_dma(ep, req, 0);
finish_out_dma(ep, req, 0, dman_stat & UDC_DMA_RX_SB);
}
UDC_IRQ_SRC_REG = UDC_RXN_EOT;

Expand Down Expand Up @@ -925,7 +927,7 @@ static void dma_channel_release(struct omap_ep *ep)
while (UDC_RXDMA_CFG_REG & mask)
udelay(10);
if (req)
finish_out_dma(ep, req, -ECONNRESET);
finish_out_dma(ep, req, -ECONNRESET, 0);
}
omap_free_dma(ep->lch);
ep->dma_channel = 0;
Expand Down

0 comments on commit f32a2a8

Please sign in to comment.