Commit ba8c8553 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: cp210x: do not map baud rates to B0

commit be125d9c upstream.

We do not implement B0 hangup yet so map low baudrates to 300bps.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 98c7a0b0
...@@ -357,8 +357,8 @@ static inline int cp210x_set_config_single(struct usb_serial_port *port, ...@@ -357,8 +357,8 @@ static inline int cp210x_set_config_single(struct usb_serial_port *port,
* Quantises the baud rate as per AN205 Table 1 * Quantises the baud rate as per AN205 Table 1
*/ */
static unsigned int cp210x_quantise_baudrate(unsigned int baud) { static unsigned int cp210x_quantise_baudrate(unsigned int baud) {
if (baud <= 56) baud = 0; if (baud <= 300)
else if (baud <= 300) baud = 300; baud = 300;
else if (baud <= 600) baud = 600; else if (baud <= 600) baud = 600;
else if (baud <= 1200) baud = 1200; else if (baud <= 1200) baud = 1200;
else if (baud <= 1800) baud = 1800; else if (baud <= 1800) baud = 1800;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment