linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: stefan@agner.ch (Stefan Agner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] serial: fsl_lpuart: update RX timer on successful DMA transfer
Date: Fri, 28 Nov 2014 01:23:25 +0100	[thread overview]
Message-ID: <1417134205-4400-5-git-send-email-stefan@agner.ch> (raw)
In-Reply-To: <1417134205-4400-1-git-send-email-stefan@agner.ch>

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>
---
 drivers/tty/serial/fsl_lpuart.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index be9ccdf..b1c1589 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);
 
-- 
2.1.3

  parent reply	other threads:[~2014-11-28  0:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-28  0:23 [PATCH 0/4] serial: fsl_lpuart: fix various DMA related issues Stefan Agner
2014-11-28  0:23 ` [PATCH 1/4] serial: fsl_lpuart: delete timer on shutdown Stefan Agner
2014-11-28  0:23 ` [PATCH 2/4] serial: fsl_lpuart: move DMA channel request to probe Stefan Agner
2014-11-28  0:23 ` [PATCH 3/4] serial: fsl_lpuart: avoid new transfer while DMA is running Stefan Agner
2014-11-28  0:23 ` Stefan Agner [this message]
2014-12-12 13:44 ` [PATCH 0/4] serial: fsl_lpuart: fix various DMA related issues Stefan Agner
2014-12-12 14:32   ` Greg KH
2014-12-12 16:19     ` Stefan Agner
2015-01-09 22:14       ` Greg KH
2015-01-09 22:19         ` Stefan Agner
2015-01-09 22:34           ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417134205-4400-5-git-send-email-stefan@agner.ch \
    --to=stefan@agner.ch \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).