]> git.baikalelectronics.ru Git - kernel.git/commit
USB: pl2303: use direct baud-rate encoding when possible
authorJohan Hovold <jhovold@gmail.com>
Sun, 29 Dec 2013 18:23:15 +0000 (19:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Jan 2014 20:31:48 +0000 (12:31 -0800)
commit20544999d2343f032d2b9e42789d69ff32b9558a
treebe5bc0158329ff7035506a1c4c2c3d1a4b1457e3
parentfcd95ae403d8f8434d54ccbdfd87bdb643a00260
USB: pl2303: use direct baud-rate encoding when possible

Use direct baud-rate encoding rather than divisors for supported baud
rates.

This restores the way baud rates were set prior to commit ae1a6df0e9ca
("USB: PL2303: correctly handle baudrates above 115200") which added
divisor encoding, but also switched to the new encoding method for all
baudrates above 115200.

As noted by Frank Schäfer <fschaefer.oss@googlemail.com>, baud rate 500k
was later errounously added to the supported baud-rate table although
it can only be set using divisors.

Note that the current implementation could easily be extended to support
arbitrary non-standard baud rates using divisors (e.g. by falling back
to divisors when the table lookup fails).

Cc: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/pl2303.c