summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorFugang Duan <fugang.duan@nxp.com>2017-06-06 18:44:16 +0800
committerFugang Duan <fugang.duan@nxp.com>2017-07-25 19:43:35 +0800
commit4334e587722ac8a6c9c49f72d307f514db5e2f81 (patch)
tree1dc3d2b7ba810699f9e430e43535a9c8e9c4e725 /drivers
parentb30a009e7e5f3d192a6986296740be5da249f78d (diff)
MLK-15031-07 tty: serial: fsl_lpuart: add port.icount for DMA rx path
Add port.icount to stat. the DMA RX received count. Signed-off-by: Fugang Duan <fugang.duan@nxp.com> Reviewed-by: Robin Gong <yibin.gong@nxp.com> (cherry picked from commit: 9580def59011d50312cd722eddaf681388064230)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/fsl_lpuart.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 0099b728e4de..b1357ac800a8 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -804,10 +804,9 @@ static void lpuart_copy_rx_to_tty(struct lpuart_port *sport,
copied = tty_insert_flip_string(tty,
((unsigned char *)(sport->dma_rx_buf_virt)), count);
- if (copied != count) {
- WARN_ON(1);
- dev_err(sport->port.dev, "RxData copy to tty layer failed\n");
- }
+ if (copied != count)
+ sport->port.icount.buf_overrun += count - copied;
+ sport->port.icount.rx += copied;
}
static void lpuart_dma_stop(struct lpuart_port *sport)