Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316999
b: refs/heads/master
c: 2f0de9d
h: refs/heads/master
i:
  316997: e26ab66
  316995: 3cd1de2
  316991: 1382f66
v: v3
  • Loading branch information
Kuninori Morimoto authored and Greg Kroah-Hartman committed Jul 9, 2012
1 parent d166bab commit 6f17f7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 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: 277bd8746bb8d23c00ff8343e58df783544e961e
refs/heads/master: 2f0de9d844d6c08a8e9059ed0b8d3d5ab6b7911b
14 changes: 3 additions & 11 deletions trunk/drivers/usb/renesas_usbhs/fifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,31 +771,23 @@ static void xfer_work(struct work_struct *work)
struct usbhs_pipe *pipe = pkt->pipe;
struct usbhs_fifo *fifo = usbhs_pipe_to_fifo(pipe);
struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe);
struct scatterlist sg;
struct dma_async_tx_descriptor *desc;
struct dma_chan *chan = usbhsf_dma_chan_get(fifo, pkt);
struct device *dev = usbhs_priv_to_dev(priv);
enum dma_transfer_direction dir;
dma_cookie_t cookie;

dir = usbhs_pipe_is_dir_in(pipe) ? DMA_DEV_TO_MEM : DMA_MEM_TO_DEV;

sg_init_table(&sg, 1);
sg_set_page(&sg, virt_to_page(pkt->dma),
pkt->length, offset_in_page(pkt->dma));
sg_dma_address(&sg) = pkt->dma + pkt->actual;
sg_dma_len(&sg) = pkt->trans;

desc = dmaengine_prep_slave_sg(chan, &sg, 1, dir,
desc = dmaengine_prep_slave_single(chan, pkt->dma + pkt->actual,
pkt->trans, dir,
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
if (!desc)
return;

desc->callback = usbhsf_dma_complete;
desc->callback_param = pipe;

cookie = desc->tx_submit(desc);
if (cookie < 0) {
if (dmaengine_submit(desc) < 0) {
dev_err(dev, "Failed to submit dma descriptor\n");
return;
}
Expand Down

0 comments on commit 6f17f7a

Please sign in to comment.