serial: pl011: Set length of DMA transfer
authorAndrew Jackson <Andrew.Jackson@arm.com>
Fri, 7 Nov 2014 14:14:43 +0000 (14:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Nov 2014 16:35:55 +0000 (08:35 -0800)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/amba-pl011.c

index 6153a42..55dc00d 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;
 }