aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/serial/pl2303.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 1e6de4cd079d..244820193e10 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -305,10 +305,14 @@ static void pl2303_encode_baudrate(struct tty_struct *tty,
305 if (spriv->type != HX) 305 if (spriv->type != HX)
306 baud = min_t(int, baud, 1228800); 306 baud = min_t(int, baud, 1228800);
307 307
308 if (baud <= 115200) { 308 if (spriv->type != HX || baud <= 115200) {
309 /* Direct (standard) baud rate encoding method */
309 put_unaligned_le32(baud, buf); 310 put_unaligned_le32(baud, buf);
310 } else { 311 } else {
311 /* 312 /*
313 * NOTE: it's not clear if the type_0/1 chips
314 * support this method
315 *
312 * Apparently the formula for higher speeds is: 316 * Apparently the formula for higher speeds is:
313 * baudrate = 12M * 32 / (2^buf[1]) / buf[0] 317 * baudrate = 12M * 32 / (2^buf[1]) / buf[0]
314 */ 318 */