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

Youquan Song
2013-10-11T10:02:16Z

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@intel.com>
---
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