]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: cp210x: do not map baud rates to B0
authorJohan Hovold <jhovold@gmail.com>
Sun, 15 Jan 2012 23:36:50 +0000 (00:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Feb 2012 17:19:05 +0000 (09:19 -0800)
commit be125d9c8d59560e7cc2d6e2b65c8fd233498ab7 upstream.

We do not implement B0 hangup yet so map low baudrates to 300bps.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/cp210x.c

index 60993dc7eb8d9e71ad943c1ce5b8d4e14049ac06..1bac7b9223f22dea187ff0a06ec5d6d104d200f8 100644 (file)
@@ -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
  */
 static unsigned int cp210x_quantise_baudrate(unsigned int baud) {
-       if      (baud <= 56)       baud = 0;
-       else if (baud <= 300)      baud = 300;
+       if (baud <= 300)
+               baud = 300;
        else if (baud <= 600)      baud = 600;
        else if (baud <= 1200)     baud = 1200;
        else if (baud <= 1800)     baud = 1800;