From: Ed Blake <ed.blake@sondrel.com>
To: "Nuno Gonçalves" <nunojpg@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial: 8250_dw: Avoid overflow in dw8250_set_termios
Date: Mon, 15 Jan 2018 11:27:54 +0000 [thread overview]
Message-ID: <0433bf6f-e8e3-4050-fb54-20b6c764c5c1@sondrel.com> (raw)
In-Reply-To: <CAEXMXLR3HYcgm9iknfq3d31TN=Fx-bYy9dHOSouHR5Y9gsN__w@mail.gmail.com>
On 13/01/18 11:59, Nuno Gonçalves wrote:
> Dear Ed,
>
> Thanks.
>
> Tested-by: Nuno Goncalves <nunojpg@gmail.com>
>
> I just would like to report a aditional issue I find, which I am not
> sure if it is intend behaviour or not. If I set bauds 1152000,
> 1500000, 2000000, 2500000, 3000000, I always get a actually set baud
> of 1500000, because it appears to be the closest baud by my hardware,
> but if I set 3500000, then the port gets disabled.
>
> This is because up to 3000000 the closest integer divider is 1, but
> then it becomes 0, which is invalid.
>
> If we still should return the closest baud, then we must return a
> minimum of 1, and never 0, at uart_get_divisor, or
> serial8250_get_divisor.
>
> Thanks,
> Nuno
Yes, returning a divisor of zero doesn't sound very sensible. Care to
submit a patch?
--
Ed
next prev parent reply other threads:[~2018-01-15 11:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 13:45 Ed Blake
2018-01-13 11:59 ` Nuno Gonçalves
2018-01-15 11:27 ` Ed Blake [this message]
2018-01-15 20:30 ` Andy Shevchenko
2018-01-16 8:48 ` Nuno Gonçalves
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=0433bf6f-e8e3-4050-fb54-20b6c764c5c1@sondrel.com \
--to=ed.blake@sondrel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=nunojpg@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 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®