From: Wander Lairson Costa <wander@redhat.com>
To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Johan Hovold" <johan@kernel.org>,
"Maciej W. Rozycki" <macro@orcam.me.uk>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Lukas Wunner" <lukas@wunner.de>,
"Wander Lairson Costa" <wander@redhat.com>,
"Pali Rohár" <pali@kernel.org>,
linux-serial@vger.kernel.org (open list:SERIAL DRIVERS),
linux-kernel@vger.kernel.org (open list)
Cc: ilpo.jarvinen@linux.intel.com, rostedt@goodmis.org,
senozhatsky@chromium.org, andre.goddard@gmail.com,
sudipm.mukherjee@gmail.com, andy.shevchenko@gmail.com,
David.Laight@aculab.com, jonathanh@nvidia.com,
phil@raspberrypi.com
Subject: [PATCH v6 0/1] serial/8250: Use fifo in 8250 console driver
Date: Mon, 11 Apr 2022 14:48:38 -0300 [thread overview]
Message-ID: <20220411174841.34936-1-wander@redhat.com> (raw)
This is v7 of the serial fifo patch. In relation to the previous
reverted patch, I describe the main changes in the "What changed from
v3" section.
What changed from v6
--------------------
* Add a comment on why we are using tx_loadsz instead of fifosize.
What changed from v5
--------------------
* Fixed a typo in patch patch "port-state" becomes "port->state".
What changed from v4
--------------------
* It squashes all the patches in a single patch
* It adds `port-state &&` check in the `use_fifo` condition as a
* preventive measure.
What changed from v3
--------------------
* Reads the FCR value from the port struct. The earlier patch
erroneously read the value from the controller, but FCR is a write-only
register. Thanks to Jiri Slaby for point this out.
* Use tx_loadsz as the transmitter fifo size. We previously used the
port->fifosize field, which caused data loss in some controllers. Thanks
Jon Hunter for the bug report.
* Exclude the BCM283x from fifo write. This is based on Phil Elwell's
original patch [1].
* Check if the port is initialized before write through fifo.
The serial driver set the value of uart_8250_port.fcr in the function
serial8250_config_port, but only writes the value to the controller
register later in the initalization code. That opens a small window in
which is not safe to use the fifo for console write. Unfortunately, I
lost track of who originally reported the issue. If s/he is reading
this, please speak up so I can give you the due credit.
[1] https://lore.kernel.org/all/20220126141124.4086065-1-phil@raspberrypi.com/
Wander Lairson Costa (1):
serial/8250: Use fifo in 8250 console driver
drivers/tty/serial/8250/8250_port.c | 68 ++++++++++++++++++++++++++---
1 file changed, 62 insertions(+), 6 deletions(-)
--
2.35.1
next reply other threads:[~2022-04-11 17:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-11 17:48 Wander Lairson Costa [this message]
2022-04-11 17:48 ` [PATCH v7] serial/8250: Use fifo in 8250 console driver Wander Lairson Costa
-- strict thread matches above, loose matches on Subject: below --
2022-04-01 19:46 [PATCH v6 0/1] " Wander Lairson Costa
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=20220411174841.34936-1-wander@redhat.com \
--to=wander@redhat.com \
--cc=David.Laight@aculab.com \
--cc=andre.goddard@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=johan@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=macro@orcam.me.uk \
--cc=pali@kernel.org \
--cc=phil@raspberrypi.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=sudipm.mukherjee@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).