diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-01 12:18:47 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-01 12:18:47 -0400 |
commit | 92dfe410880b8bde731ca1a6e7da2dd3b13404e6 (patch) | |
tree | 898b579d15acca3bba5b7ecb091a3531c277bbfc | |
parent | e2afb1d66644a3c55e3a46ba312e302a065ecac5 (diff) |
Revert "usb: pl2303: increase the allowed baud rate range for the divisor based encoding method"
This reverts commit b5c16c6a031c52cc4b7dda6c3de46462fbc92eab.
Revert all of the pl2303 changes that went into 3.12-rc1 and -rc2 as
they cause regressions on some versions of the chip. This will all be
revisited for later kernel versions when we can figure out how to handle
this in a way that does not break working devices.
Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/serial/pl2303.c | 16 |
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 */ |