All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Razvan Stefanescu <razvan.stefanescu@microchip.com>
Cc: stable@vger.kernel.org, Nicolas Ferre <Nicolas.Ferre@microchip.com>
Subject: Re: [PATCH for-4.19 2/2] tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped
Date: Wed, 3 Apr 2019 16:02:39 +0200	[thread overview]
Message-ID: <20190403140239.GC8633@kroah.com> (raw)
In-Reply-To: <20190402095250.11334-2-razvan.stefanescu@microchip.com>

On Tue, Apr 02, 2019 at 12:52:50PM +0300, Razvan Stefanescu wrote:
> commit 69646d7a3689 ("tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped") upstream.
> 
> In half-duplex operation, RX should be started after TX completes.
> 
> If DMA is used, there is a case when the DMA transfer completes but the
> TX FIFO is not emptied, so the RX cannot be restarted just yet.
> 
> Use a boolean variable to store this state and rearm TX interrupt mask
> to be signaled again that the transfer finished. In interrupt transmit
> handler this variable is used to start RX. A warning message is generated
> if RX is activated before TX fifo is cleared.
> 
> Fixes: b389f173aaa1 ("tty/serial: atmel: RS485 half duplex w/DMA: enable
> RX after TX is done")
> Signed-off-by: Razvan Stefanescu <razvan.stefanescu@microchip.com>
> Acked-by: Richard Genoud <richard.genoud@gmail.com>
> Cc: stable <stable@vger.kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/tty/serial/atmel_serial.c | 24 +++++++++++++++++++++---
>  1 file changed, 21 insertions(+), 3 deletions(-)
> 

Happen to have a version of this for 4.4.y and 4.9.y?

I've queued both of these patches up now, thanks.

greg k-h

  reply	other threads:[~2019-04-03 14:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02  9:52 [PATCH for-4.19 1/2] tty/serial: atmel: Add is_half_duplex helper Razvan Stefanescu
2019-04-02  9:52 ` [PATCH for-4.19 2/2] tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped Razvan Stefanescu
2019-04-03 14:02   ` Greg Kroah-Hartman [this message]
2019-04-03 15:07     ` Razvan.Stefanescu
2019-04-03 15:25       ` 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=20190403140239.GC8633@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Nicolas.Ferre@microchip.com \
    --cc=razvan.stefanescu@microchip.com \
    --cc=stable@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.