]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/usb/serial/pl2303.c
usb: pl2303: increase the allowed baud rate range for the divisor based encoding...
[linux-beck.git] / drivers / usb / serial / pl2303.c
index 693ed7e4871a705daefa743fba51e2241dafc538..61c9f9d28ee9e77d67340736f51acde28302fe07 100644 (file)
@@ -324,12 +324,20 @@ static int pl2303_baudrate_encode_divisor(int baud, enum pl2303_type type,
         */
        unsigned int A, B;
 
-       /* Respect the specified baud rate limits */
-       baud = max_t(int, baud, 75);
+       /*
+        * NOTE: The Windows driver allows maximum baud rates of 110% of the
+        * specified maximium value.
+        * Quick tests with early (2004) HX (rev. A) chips suggest, that even
+        * higher baud rates (up to the maximum of 24M baud !) are working fine,
+        * but that should really be tested carefully in "real life" scenarios
+        * before removing the upper limit completely.
+        * Baud rates smaller than the specified 75 baud are definitely working
+        * fine.
+        */
        if (type == HX)
-               baud = min_t(int, baud, 6000000);
+               baud = min_t(int, baud, 6000000 * 1.1);
        else
-               baud = min_t(int, baud, 1228800);
+               baud = min_t(int, baud, 1228800 * 1.1);
        /* Determine factors A and B */
        A = 0;
        B = 12000000 * 32 / baud;  /* 12MHz */