From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Tobias Schramm <t.schramm@manjaro.org>
Cc: Richard Genoud <richard.genoud@gmail.com>,
Jiri Slaby <jirislaby@kernel.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@microchip.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] serial: atmel: fix incorrect baudrate setup
Date: Mon, 9 Jan 2023 08:07:52 +0100 [thread overview]
Message-ID: <Y7u9SAX++YsXvnVC@kroah.com> (raw)
In-Reply-To: <20230109070200.200181-1-t.schramm@manjaro.org>
On Mon, Jan 09, 2023 at 08:02:00AM +0100, Tobias Schramm wrote:
> Commit ba47f97a18f2 ("serial: core: remove baud_rates when serial console
> setup") changed uart_set_options to select the correct baudrate
> configuration based on the absolute error between requested baudrate and
> available standard baudrate settings.
> Prior to that commit the baudrate was selected based on which predefined
> standard baudrate did not exceed the requested baudrate.
> This change of selection logic was never reflected in the atmel serial
> driver. Thus the comment left in the atmel serial driver is no longer
> accurate.
> Additionally the manual rounding up described in that comment and applied
> via (quot - 1) requests an incorrect baudrate. Since uart_set_options uses
> tty_termios_encode_baud_rate to determine the appropriate baudrate flags
> this can cause baudrate selection to fail entirely because
> tty_termios_encode_baud_rate will only select a baudrate if relative error
> between requested and selected baudrate does not exceed +/-2%.
> Fix that by requesting actual, exact baudrate used by the serial.
>
> Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
> ---
What commit id does this fix? Please list that as a the "Fixes:" tag.
Also, does this need to go to older/stable kernels?
thanks,
greg k-h
next prev parent reply other threads:[~2023-01-09 7:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 7:02 [PATCH] serial: atmel: fix incorrect baudrate setup Tobias Schramm
2023-01-09 7:07 ` Greg Kroah-Hartman [this message]
2023-01-09 7:22 ` Tobias Schramm
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=Y7u9SAX++YsXvnVC@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@microchip.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=richard.genoud@gmail.com \
--cc=t.schramm@manjaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox