]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
dmaengine: at_hdmac: flags located in first descriptor
authorNicolas Ferre <nicolas.ferre@atmel.com>
Wed, 12 Jan 2011 14:39:09 +0000 (15:39 +0100)
committerDan Williams <dan.j.williams@intel.com>
Sat, 15 Jan 2011 00:54:44 +0000 (16:54 -0800)
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>
drivers/dma/at_hdmac.c

index e25c4ad01062cdf3eb8d26fc6ccda4374d1be0da..3938db210834d11302894a4cd9b28614ef029676 100644 (file)
@@ -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;
 
@@ -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;