diff options
author | Fugang Duan <fugang.duan@nxp.com> | 2017-06-06 18:44:16 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | c507ce723cc013f2c10bd9c09dbdb2159360c843 (patch) | |
tree | e6033e42e278f1170c5b8d37593cc5193172e895 /drivers/tty/serial | |
parent | 4db72f9a06578a19e64b2737b1e9cf333858e226 (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>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/fsl_lpuart.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index aa4fdcfa6206..e20ae5276743 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -842,10 +842,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) |