From 393d73e3209aceef3aef14d10a75f9ec21a108b7 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Mon, 16 Jan 2012 00:36:53 +0100 Subject: [PATCH] --- yaml --- r: 287007 b: refs/heads/master c: d1620ca9e7bb0030068c3b45b653defde8839dac h: refs/heads/master i: 287005: 6805467fb518c33e34f6372416e18d26aec79ba2 287003: 5271af4500e45619f22ba5c779110e4de0f44ea1 286999: c293acc2d103cea32fe6e5e71e139868601ff8cf 286991: df83a83d4d5676474ace32d50a69743d9c3c4c77 286975: 59fd3f21db6605c0f2079734ef520795f2da3a3b v: v3 --- [refs] | 2 +- trunk/drivers/usb/serial/cp210x.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 481e61f8bf8b..9d597fc89818 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cdc32fd6f7b2b2580d7f1b74563f888e4dd9eb8a +refs/heads/master: d1620ca9e7bb0030068c3b45b653defde8839dac diff --git a/trunk/drivers/usb/serial/cp210x.c b/trunk/drivers/usb/serial/cp210x.c index 5c3e8592fd22..8dbf51a43c45 100644 --- a/trunk/drivers/usb/serial/cp210x.c +++ b/trunk/drivers/usb/serial/cp210x.c @@ -394,10 +394,10 @@ static unsigned int cp210x_quantise_baudrate(unsigned int baud) { else if (baud <= 491520) baud = 460800; else if (baud <= 567138) baud = 500000; else if (baud <= 670254) baud = 576000; - else if (baud <= 1053257) baud = 921600; - else if (baud <= 1474560) baud = 1228800; - else if (baud <= 2457600) baud = 1843200; - else baud = 3686400; + else if (baud < 1000000) + baud = 921600; + else if (baud > 2000000) + baud = 2000000; return baud; } @@ -615,7 +615,8 @@ static void cp210x_change_speed(struct tty_struct *tty, baud = tty->termios->c_ospeed; - /* This maps the requested rate to a rate valid on cp2102 or cp2103. + /* This maps the requested rate to a rate valid on cp2102 or cp2103, + * or to an arbitrary rate in [1M,2M]. * * NOTE: B0 is not implemented. */