[PATCH 2/2] dma: calculate the data tranferred by 8250

From: Youquan Song
Date: Fri Oct 11 2013 - 06:02:31 EST


When using UART transfers data by DMA mode, but it always shows 0 at
/sys/class/dma/dma0chan*/bytes_transferred.

Call the new function to calculate how many the data has been transferred
after doing it by DMA mode.

Signed-off-by: Youquan Song <youquan.song@xxxxxxxxx>
---
drivers/tty/serial/8250/8250_dma.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
index 7046769..b22ef80 100644
--- a/drivers/tty/serial/8250/8250_dma.c
+++ b/drivers/tty/serial/8250/8250_dma.c
@@ -83,7 +83,7 @@ int serial8250_tx_dma(struct uart_8250_port *p)
desc->callback = __dma_tx_complete;
desc->callback_param = p;

- dma->tx_cookie = dmaengine_submit(desc);
+ dma->tx_cookie = dma_tx_submit_cal(desc, dma->txchan, dma->tx_size);

dma_sync_single_for_device(dma->txchan->device->dev, dma->tx_addr,
UART_XMIT_SIZE, DMA_TO_DEVICE);
--
1.7.7.4

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