Skip to content

Commit

Permalink
serial: fsl_lpuart: update RX timer on successful DMA transfer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Agner authored and Greg Kroah-Hartman committed Feb 2, 2015
1 parent 4a818c4 commit 011f5bd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/tty/serial/fsl_lpuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 011f5bd

Please sign in to comment.