serial: pl011: Set length of DMA transfer
authorAndrew Jackson <Andrew.Jackson@arm.com>
Fri, 31 Oct 2014 06:55:10 +0000 (06:55 +0000)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Fri, 31 Oct 2014 12:22:16 +0000 (12:22 +0000)
The DMA engines on some systems require that the dma_length is set
when using scatter gather lists.

Signed-off-by: Andrew Jackson <Andrew.Jackson@arm.com>
drivers/tty/serial/amba-pl011.c

index c533bb334355838761e4519bc1b1ac8b5b6f6a8d..9c738c83fb8a6b767bf6cc5e7daa691c4ce8e6fd 100644 (file)
@@ -246,6 +246,7 @@ static int pl011_sgbuf_init(struct dma_chan *chan, struct pl011_sgbuf *sg,
        sg_set_page(&sg->sg, phys_to_page(dma_addr),
                PL011_DMA_BUFFER_SIZE, offset_in_page(dma_addr));
        sg_dma_address(&sg->sg) = dma_addr;
+       sg_dma_len(&sg->sg) = PL011_DMA_BUFFER_SIZE;
 
        return 0;
 }