Skip to content

Commit

Permalink
dmaengine: at_hdmac: flags located in first descriptor
Browse files Browse the repository at this point in the history
Place flags on first descriptor of chain instead of last.
This is the one used by atc_chain_complete() function while unmapping.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Nicolas Ferre authored and Dan Williams committed Jan 15, 2011
1 parent 93d0bec commit 568f7f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/dma/at_hdmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ atc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
/* set end-of-link to the last link descriptor of list*/
set_desc_eol(desc);

desc->txd.flags = flags; /* client is in control of this ack */
first->txd.flags = flags; /* client is in control of this ack */

return &first->txd;

Expand Down Expand Up @@ -748,8 +748,8 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
first->txd.cookie = -EBUSY;
first->len = total_len;

/* last link descriptor of list is responsible of flags */
prev->txd.flags = flags; /* client is in control of this ack */
/* first link descriptor of list is responsible of flags */
first->txd.flags = flags; /* client is in control of this ack */

return &first->txd;

Expand Down

0 comments on commit 568f7f0

Please sign in to comment.