From: Greg KH <gregkh@linuxfoundation.org>
To: Ludovic Desroches <ludovic.desroches@microchip.com>
Cc: linux-serial@vger.kernel.org, linux-arch@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, jslaby@suse.com,
arnd@arndb.de, richard.genoud@gmail.com,
nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] tty/serial: atmel: manage shutdown in case of RS485 or ISO7816 mode
Date: Thu, 12 Jul 2018 16:59:18 +0200 [thread overview]
Message-ID: <20180712145918.GC22502@kroah.com> (raw)
In-Reply-To: <20180711131638.12622-4-ludovic.desroches@microchip.com>
On Wed, Jul 11, 2018 at 03:16:38PM +0200, Ludovic Desroches wrote:
> From: Nicolas Ferre <nicolas.ferre@microchip.com>
>
> 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.
>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
No signed-off-by from you?
> ---
> drivers/tty/serial/atmel_serial.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 0118b219f3a8..e4f877e1f3c6 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -617,7 +617,9 @@ static void atmel_stop_tx(struct uart_port *port)
> if (((port->rs485.flags & SER_RS485_ENABLED) &&
> !(port->rs485.flags & SER_RS485_RX_DURING_TX)) ||
> port->iso7816.flags & SER_ISO7816_ENABLED)
> - atmel_start_rx(port);
> + if (!atomic_read(&atmel_port->tasklet_shutdown))
> + atmel_start_rx(port);
Is this really ok? No locking needed? What happens if that value is
set right after this?
thanks,
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: gregkh@linuxfoundation.org (Greg KH)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] tty/serial: atmel: manage shutdown in case of RS485 or ISO7816 mode
Date: Thu, 12 Jul 2018 16:59:18 +0200 [thread overview]
Message-ID: <20180712145918.GC22502@kroah.com> (raw)
In-Reply-To: <20180711131638.12622-4-ludovic.desroches@microchip.com>
On Wed, Jul 11, 2018 at 03:16:38PM +0200, Ludovic Desroches wrote:
> From: Nicolas Ferre <nicolas.ferre@microchip.com>
>
> 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.
>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
No signed-off-by from you?
> ---
> drivers/tty/serial/atmel_serial.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 0118b219f3a8..e4f877e1f3c6 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -617,7 +617,9 @@ static void atmel_stop_tx(struct uart_port *port)
> if (((port->rs485.flags & SER_RS485_ENABLED) &&
> !(port->rs485.flags & SER_RS485_RX_DURING_TX)) ||
> port->iso7816.flags & SER_ISO7816_ENABLED)
> - atmel_start_rx(port);
> + if (!atomic_read(&atmel_port->tasklet_shutdown))
> + atmel_start_rx(port);
Is this really ok? No locking needed? What happens if that value is
set right after this?
thanks,
greg k-h
next prev parent reply other threads:[~2018-07-12 14:59 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-11 13:16 [PATCH 0/3] add ISO7816 support Ludovic Desroches
2018-07-11 13:16 ` Ludovic Desroches
2018-07-11 13:16 ` Ludovic Desroches
2018-07-11 13:16 ` [PATCH 1/3] tty/serial_core: add ISO7816 infrastructure Ludovic Desroches
2018-07-11 13:16 ` Ludovic Desroches
2018-07-11 13:16 ` Ludovic Desroches
2018-07-11 21:52 ` kbuild test robot
2018-07-11 21:52 ` kbuild test robot
2018-07-11 21:52 ` kbuild test robot
2018-07-11 21:52 ` kbuild test robot
2018-07-12 0:10 ` kbuild test robot
2018-07-12 0:10 ` kbuild test robot
2018-07-12 0:10 ` kbuild test robot
2018-07-12 0:10 ` kbuild test robot
2018-07-12 14:58 ` Greg KH
2018-07-12 14:58 ` Greg KH
2018-07-13 8:01 ` Ludovic Desroches
2018-07-13 8:01 ` Ludovic Desroches
2018-07-13 8:01 ` Ludovic Desroches
2018-07-19 11:07 ` Alan Cox
2018-07-19 11:07 ` Alan Cox
2018-07-19 11:07 ` Alan Cox
2018-07-19 11:07 ` Alan Cox
2018-07-12 15:02 ` Greg KH
2018-07-12 15:02 ` Greg KH
2018-07-13 7:56 ` Ludovic Desroches
2018-07-13 7:56 ` Ludovic Desroches
2018-07-13 7:56 ` Ludovic Desroches
2018-07-13 8:16 ` Greg KH
2018-07-13 8:16 ` Greg KH
2018-07-11 13:16 ` [PATCH 2/3] tty/serial: atmel: add ISO7816 support Ludovic Desroches
2018-07-11 13:16 ` Ludovic Desroches
2018-07-11 13:16 ` Ludovic Desroches
2018-07-12 15:01 ` Greg KH
2018-07-12 15:01 ` Greg KH
2018-07-11 13:16 ` [PATCH 3/3] tty/serial: atmel: manage shutdown in case of RS485 or ISO7816 mode Ludovic Desroches
2018-07-11 13:16 ` Ludovic Desroches
2018-07-11 13:16 ` Ludovic Desroches
2018-07-12 14:59 ` Greg KH [this message]
2018-07-12 14:59 ` Greg KH
2018-07-11 13:26 ` Ludovic Desroches
2018-07-11 13:26 ` Ludovic Desroches
2018-07-11 13:26 ` Ludovic Desroches
2018-07-12 14:58 ` Greg KH
2018-07-12 14:58 ` Greg KH
2018-07-12 15:23 ` Ludovic Desroches
2018-07-12 15:23 ` Ludovic Desroches
2018-07-12 15:23 ` Ludovic Desroches
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=20180712145918.GC22502@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alexandre.belloni@bootlin.com \
--cc=arnd@arndb.de \
--cc=jslaby@suse.com \
--cc=linux-arch@vger.kernel.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 \
--cc=richard.genoud@gmail.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 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.