From: Richard Genoud <richard.genoud@gmail.com>
To: Nicolas Ferre <nicolas.ferre@microchip.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-serial@vger.kernel.org
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Ludovic Desroches <ludovic.desroches@microchip.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Subject: Re: [PATCH] tty/serial: atmel: manage shutdown in case of RS485 or ISO7816 mode
Date: Wed, 12 Feb 2020 12:19:18 +0100 [thread overview]
Message-ID: <f40181d1-3781-2cd9-11b3-420ef0d29ce7@gmail.com> (raw)
In-Reply-To: <20200210152053.8289-1-nicolas.ferre@microchip.com>
Le 10/02/2020 à 16:20, Nicolas Ferre a écrit :
> In atmel_shutdown() we call atmel_stop_rx() and atmel_stop_tx() functions.
> Prevent the rx restart that is implemented in RS485 or ISO7816 modes when
> calling atmel_stop_tx() by using the atomic information tasklet_shutdown
> that is already in place for this purpose.
>
> Fixes: 98f2082c3ac4 ("tty/serial: atmel: enforce tasklet init and termination sequences")
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Acked-by: Richard Genoud <richard.genoud@gmail.com>
> ---
> drivers/tty/serial/atmel_serial.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index c15c398c88a9..a39c87a7c2e1 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -570,7 +570,8 @@ static void atmel_stop_tx(struct uart_port *port)
> atmel_uart_writel(port, ATMEL_US_IDR, atmel_port->tx_done_mask);
>
> if (atmel_uart_is_half_duplex(port))
> - atmel_start_rx(port);
> + if (!atomic_read(&atmel_port->tasklet_shutdown))
> + atmel_start_rx(port);
>
> }
>
>
prev parent reply other threads:[~2020-02-12 11:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-10 15:20 [PATCH] tty/serial: atmel: manage shutdown in case of RS485 or ISO7816 mode Nicolas Ferre
2020-02-12 11:19 ` Richard Genoud [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=f40181d1-3781-2cd9-11b3-420ef0d29ce7@gmail.com \
--to=richard.genoud@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=codrin.ciubotariu@microchip.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=ludovic.desroches@microchip.com \
--cc=nicolas.ferre@microchip.com \
/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).