diff options
author | Stefan Agner <stefan@agner.ch> | 2015-01-10 09:33:46 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-02 19:09:55 +0100 |
commit | 011f5bde62890c39440859c8077a0a5a6aca316d (patch) | |
tree | cd220f8bcb7a8354b2ddcbfe5419228dae8e2dfc /drivers/tty/serial/fsl_lpuart.c | |
parent | serial: fsl_lpuart: move DMA channel request to probe (diff) | |
download | linux-011f5bde62890c39440859c8077a0a5a6aca316d.tar.xz linux-011f5bde62890c39440859c8077a0a5a6aca316d.zip |
serial: fsl_lpuart: update RX timer on successful DMA transfer
To end a DMA transfer which did not consume a whole buffer (e.g. one
character only), a RX timer is used. When lots of data are received
the DMA transfer will complete and setup another DMA transfer, which
in turn might complete again. In this cases, it is not necessary to
abort the DMA transfers using the RX timer. This change pushes the
RX timer timeout into the future each time a DMA transfer completed.
Aborting the DMA was not very harmful, since the next received
character lead to setup of another RX DMA.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/fsl_lpuart.c')
-rw-r--r-- | drivers/tty/serial/fsl_lpuart.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 0ea0af76cb9a..914f9a2a0157 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -462,6 +462,7 @@ static void lpuart_dma_rx_complete(void *arg) unsigned long flags; async_tx_ack(sport->dma_rx_desc); + mod_timer(&sport->lpuart_timer, jiffies + sport->dma_rx_timeout); spin_lock_irqsave(&sport->port.lock, flags); |