Skip to content

Commit 61fa8d6

Browse files
Frank Schäfergregkh
authored andcommitted
usb: pl2303: also use the divisor based baud rate encoding method for baud rates < 115200 with HX chips
Now that the divisor based baud rate encoding method has been fixed and extended, it can also be used for baud rates < 115200 baud with HX chips. This makes it possible to adjust the baud rate almost continuously instead of just beeing able to select between 16 fixed standard values. Tested with a PL2303HX 04463A (week 46, 2004, rev 3A). Signed-off-by: Frank Schäfer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b5c16c6 commit 61fa8d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/serial/pl2303.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ static void pl2303_encode_baudrate(struct tty_struct *tty,
395395
* 2) Divisor based method: encodes a divisor to a base value (12MHz*32)
396396
* => supported by HX chips (and likely not by type_0/1 chips)
397397
*/
398-
if (type != HX || baud <= 115200)
398+
if (type != HX)
399399
baud = pl2303_baudrate_encode_direct(baud, type, buf);
400400
else
401401
baud = pl2303_baudrate_encode_divisor(baud, type, buf);

0 commit comments

Comments
 (0)