From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-serial <linux-serial@vger.kernel.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Matwey V. Kornilov" <matwey@sai.msu.ru>,
LKML <linux-kernel@vger.kernel.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH v2 1/6] serial: 8250: Store to lsr_save_flags after lsr read
Date: Mon, 6 Jun 2022 16:41:58 +0300 (EEST) [thread overview]
Message-ID: <fb32bda5-ea44-da8d-493a-a043b8619022@linux.intel.com> (raw)
In-Reply-To: <20220606131124.53394-2-ilpo.jarvinen@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1777 bytes --]
On Mon, 6 Jun 2022, Ilpo Järvinen wrote:
> Not all LSR register flags are preserved across reads. Therefore, LSR
> readers must store the non-preserved bits into lsr_save_flags.
>
> This fix was initially mixed into feature commit f6f586102add ("serial:
> 8250: Handle UART without interrupt on TEMT using em485"). However,
> that feature change had a flaw and it was reverted to make room for
> simpler approach providing the same feature. The embedded fix got
> reverted with the feature change.
>
> Re-add the lsr_save_flags fix and properly mark it's a fix.
>
> Fixes: e490c9144cfa ("tty: Add software emulated RS485 support for 8250")
> Link: https://lore.kernel.org/all/1d6c31d-d194-9e6a-ddf9-5f29af829f3@linux.intel.com/T/#m1737eef986bd20cf19593e344cebd7b0244945fc
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Acked-by: Uwe Kleine-König <u.kleine-koenig@penugtronix.de>
It seems that Uwe managed to mistype his email for the A-by which I just
happily copy-pasted.
Greg, please let me know if you want me to resend the series (or if you
will just change it on the fly while applying).
--
i.
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
> drivers/tty/serial/8250/8250_port.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
> index 4998799abae2..c5e0f925f4b6 100644
> --- a/drivers/tty/serial/8250/8250_port.c
> +++ b/drivers/tty/serial/8250/8250_port.c
> @@ -1511,6 +1511,8 @@ static inline void __stop_tx(struct uart_8250_port *p)
> unsigned char lsr = serial_in(p, UART_LSR);
> u64 stop_delay = 0;
>
> + p->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS;
> +
> if (!(lsr & UART_LSR_THRE))
> return;
> /*
>
next prev parent reply other threads:[~2022-06-06 13:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220606131124.53394-1-ilpo.jarvinen@linux.intel.com>
2022-06-06 13:11 ` Ilpo Järvinen
2022-06-06 13:41 ` Ilpo Järvinen [this message]
2022-06-06 14:09 ` Andy Shevchenko
2022-06-06 16:52 ` Ilpo Järvinen
2022-06-06 17:01 ` Andy Shevchenko
2022-06-06 19:40 ` Uwe Kleine-König
2022-06-06 20:38 ` Andy Shevchenko
2022-06-07 5:58 ` Uwe Kleine-König
2022-06-07 10:09 ` Andy Shevchenko
2022-06-07 10:32 ` Uwe Kleine-König
2022-06-07 10:54 ` Andy Shevchenko
2022-06-06 13:11 ` [PATCH v2 2/6] serial: 8250: Create serial_lsr_in() Ilpo Järvinen
2022-06-06 13:11 ` [PATCH v2 3/6] serial: 8250: Get preserved flags using serial_lsr_in() Ilpo Järvinen
2022-06-06 13:11 ` [PATCH v2 4/6] serial: 8250: Adjust misleading LSR related comment Ilpo Järvinen
2022-06-06 13:11 ` [PATCH v2 5/6] serial: 8250_dw: Use serial_lsr_in() in dw8250_handle_irq() Ilpo Järvinen
2022-06-06 13:11 ` [PATCH v2 6/6] serial: 8250_dw: Store LSR into lsr_saved_flags in dw8250_tx_wait_empty() Ilpo Järvinen
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=fb32bda5-ea44-da8d-493a-a043b8619022@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=matwey@sai.msu.ru \
--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
all inboxes | Powered by JetHome®