summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2014-11-28 01:01:07 +0100
committerStefan Agner <stefan@agner.ch>2014-11-28 01:15:31 +0100
commitba147f8257a5f340f9d75ee1b0724848edb0f0be (patch)
treece13089989d5aedf201a447384f11ef6600a81c4
parent561d54d077c2b0493e3002cf6b1a7e6362957028 (diff)
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.
-rw-r--r--drivers/tty/serial/fsl_lpuart.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index be9ccdf44060..b1c1589c48be 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);