aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/serial/pl2303.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 61c9f9d28ee9..693ed7e4871a 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -324,20 +324,12 @@ static int pl2303_baudrate_encode_divisor(int baud, enum pl2303_type type,
324 */ 324 */
325 unsigned int A, B; 325 unsigned int A, B;
326 326
327 /* 327 /* Respect the specified baud rate limits */
328 * NOTE: The Windows driver allows maximum baud rates of 110% of the 328 baud = max_t(int, baud, 75);
329 * specified maximium value.
330 * Quick tests with early (2004) HX (rev. A) chips suggest, that even
331 * higher baud rates (up to the maximum of 24M baud !) are working fine,
332 * but that should really be tested carefully in "real life" scenarios
333 * before removing the upper limit completely.
334 * Baud rates smaller than the specified 75 baud are definitely working
335 * fine.
336 */
337 if (type == HX) 329 if (type == HX)
338 baud = min_t(int, baud, 6000000 * 1.1); 330 baud = min_t(int, baud, 6000000);
339 else 331 else
340 baud = min_t(int, baud, 1228800 * 1.1); 332 baud = min_t(int, baud, 1228800);
341 /* Determine factors A and B */ 333 /* Determine factors A and B */
342 A = 0; 334 A = 0;
343 B = 12000000 * 32 / baud; /* 12MHz */ 335 B = 12000000 * 32 / baud; /* 12MHz */