From: Alex Henrie <alexh@vpitech.com>
To: Johan Hovold <johan@kernel.org>, Russell King <linux@armlinux.org.uk>
Cc: linux-usb@vger.kernel.org, alexhenrie24@gmail.com,
Sergey Shtylyov <s.shtylyov@omp.ru>
Subject: Re: [PATCH] USB: serial: cp210x: map B0 to B9600
Date: Mon, 28 Nov 2022 11:08:25 -0700 [thread overview]
Message-ID: <3642317.iIbC2pHGDl@demeter> (raw)
In-Reply-To: <Y4TItxxwSNy7OnMA@hovoldconsulting.com>
On Monday, November 28, 2022 7:41:59 AM MST Johan Hovold wrote:
> On Fri, Nov 25, 2022 at 08:58:25PM -0700, Alex Henrie wrote:
> > When a baud rate of 0 is requested, both the 8250 driver and the FTDI
> > driver reset the baud rate to the default of 9600 (see the comment above
> > the uart_get_baud_rate function). Some old versions of the NXP blhost
> > utility depend on this behavior.
>
> What exactly do you mean by "depend on" here? Setting B0 is supposed to
> hang up a modem connection by deasserting the modem control lines, but
> there's nothing mandating any particular line speed to be set in
> hardware. Why would that even matter?
>
> If the user space tool is thrown off by the fact that B0 isn't
> implemented, perhaps that's what should be addressed.
Oh, it's definitely a bug in blhost. The program sets the baud rate to 0, then
tries to communicate over the UART assuming that the baud rate is 9600. It's
been fixed in the latest version of blhost, but I'm stuck on an old version and
there's nothing I can do about that.
I don't know why the 8250 and FTDI drivers map B0 to B9600, however it's very
old behavior that must have had a purpose. Maybe Russell knows? Alternatively,
leaving the baud rate unchanged seems like reasonable behavior and would also
work with the old blhost. But mapping B0 to B300 makes even less sense than
mapping it to B9600.
-Alex
next prev parent reply other threads:[~2022-11-28 18:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-26 3:58 [PATCH] USB: serial: cp210x: map B0 to B9600 Alex Henrie
2022-11-26 7:10 ` Greg KH
2022-11-28 18:06 ` Alex Henrie
2022-11-26 10:34 ` Sergey Shtylyov
2022-11-28 14:41 ` Johan Hovold
2022-11-28 18:08 ` Alex Henrie [this message]
2022-11-28 18:20 ` Russell King (Oracle)
2022-11-28 18:38 ` Alex Henrie
2022-11-29 14:15 ` Johan Hovold
2022-11-29 17:48 ` Alex Henrie
2022-11-28 18:12 ` [PATCH v2] " Alex Henrie
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=3642317.iIbC2pHGDl@demeter \
--to=alexh@vpitech.com \
--cc=alexhenrie24@gmail.com \
--cc=johan@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=s.shtylyov@omp.ru \
/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).