From 61fa8d694b8547894b57ea0d99d0120a58f6ebf8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Frank=20Sch=C3=A4fer?= Date: Tue, 6 Aug 2013 19:26:28 +0200 Subject: [PATCH] usb: pl2303: also use the divisor based baud rate encoding method for baud rates < 115200 with HX chips MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Now that the divisor based baud rate encoding method has been fixed and extended, it can also be used for baud rates < 115200 baud with HX chips. This makes it possible to adjust the baud rate almost continuously instead of just beeing able to select between 16 fixed standard values. Tested with a PL2303HX 04463A (week 46, 2004, rev 3A). Signed-off-by: Frank Schäfer Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/pl2303.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 61c9f9d..09fb55c 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -395,7 +395,7 @@ static void pl2303_encode_baudrate(struct tty_struct *tty, * 2) Divisor based method: encodes a divisor to a base value (12MHz*32) * => supported by HX chips (and likely not by type_0/1 chips) */ - if (type != HX || baud <= 115200) + if (type != HX) baud = pl2303_baudrate_encode_direct(baud, type, buf); else baud = pl2303_baudrate_encode_divisor(baud, type, buf); -- 2.7.4