Skip to content

Commit

Permalink
Revert "USB: pl2303: restrict the divisor based baud rate encoding me…
Browse files Browse the repository at this point in the history
…thod to the "HX" chip type"

This reverts commit b8bdad6.

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 <[email protected]>
Cc: Frank Schäfer <[email protected]>
Acked-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Nov 1, 2013
1 parent 1796a22 commit 54dc579
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/usb/serial/pl2303.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,10 @@ static void pl2303_encode_baudrate(struct tty_struct *tty,
if (spriv->type != HX)
baud = min_t(int, baud, 1228800);

if (spriv->type != HX || baud <= 115200) {
/* Direct (standard) baud rate encoding method */
if (baud <= 115200) {
put_unaligned_le32(baud, buf);
} else {
/*
* NOTE: it's not clear if the type_0/1 chips
* support this method
*
* Apparently the formula for higher speeds is:
* baudrate = 12M * 32 / (2^buf[1]) / buf[0]
*/
Expand Down

0 comments on commit 54dc579

Please sign in to comment.