It will be useful to have the length of the transfer in the descriptor. The
cyclic transfer functions remained untouched.

Signed-off-by: Andy Shevchenko <[email protected]>
---
 drivers/dma/dw_dmac.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 3ff9ef7..d1b9ba2 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -754,6 +754,7 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, 
dma_addr_t src,
                        first = desc;
                } else {
                        prev->lli.llp = desc->txd.phys;
+                       desc->len = xfer_count << src_width;
                        list_add_tail(&desc->desc_node,
                                        &first->tx_list);
                }
@@ -852,6 +853,7 @@ slave_sg_todev_fill_desc:
                                first = desc;
                        } else {
                                prev->lli.llp = desc->txd.phys;
+                               desc->len = dlen;
                                list_add_tail(&desc->desc_node,
                                                &first->tx_list);
                        }
@@ -910,6 +912,7 @@ slave_sg_fromdev_fill_desc:
                                first = desc;
                        } else {
                                prev->lli.llp = desc->txd.phys;
+                               desc->len = dlen;
                                list_add_tail(&desc->desc_node,
                                                &first->tx_list);
                        }
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to