public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Schrempf Frieder <frieder.schrempf@kontron.de>
Cc: "Fabio Estevam" <festevam@gmail.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Subject: Re: [PATCH v2] serial: imx: Fix handling of TC irq in combination with DMA
Date: Thu, 11 Jun 2020 13:18:20 +0200	[thread overview]
Message-ID: <20200611111820.GI3802953@kroah.com> (raw)
In-Reply-To: <20200609072259.8259-1-frieder.schrempf@kontron.de>

On Tue, Jun 09, 2020 at 07:23:40AM +0000, Schrempf Frieder wrote:
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> commit 1866541492641c02874bf51f9d8712b5510f2c64 upstream
> 
> When using RS485 half duplex the Transmitter Complete irq is needed to
> determine the moment when the transmitter can be disabled. When using
> DMA this irq must only be enabled when DMA has completed to transfer all
> data. Otherwise the CPU might busily trigger this irq which is not
> properly handled and so the also pending irq for the DMA transfer cannot
> trigger.
> 
> Cc: <stable@vger.kernel.org> # v4.14.x
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> [Backport to v4.14]
> Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
> ---
> When using RS485 with DMA enabled simply transmitting some data on our
> i.MX6ULL based boards often freezes the system completely. The higher
> the baudrate, the easier it is to reproduce the issue. To test this I
> simply used:
> 
> stty -F /dev/ttymxc1 speed 115200
> while true; do echo TEST > /dev/ttymxc1; done
> 
> Without the patch this leads to an almost immediate system freeze,
> with the patch applied, everything keeps working as expected. 
> ---
>  drivers/tty/serial/imx.c | 22 ++++++++++++++++++----
>  1 file changed, 18 insertions(+), 4 deletions(-)

Now queued up, thanks.

greg k-h

      parent reply	other threads:[~2020-06-11 11:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09  7:23 [PATCH v2] serial: imx: Fix handling of TC irq in combination with DMA Schrempf Frieder
2020-06-09  8:23 ` Schrempf Frieder
2020-06-11 11:18 ` Greg Kroah-Hartman [this message]

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=20200611111820.GI3802953@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=festevam@gmail.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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