]> git.baikalelectronics.ru Git - kernel.git/commit
USB: serial: ch341: fix lost character on LCR updates
authorJohan Hovold <johan@kernel.org>
Tue, 6 Sep 2022 13:34:34 +0000 (15:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 10:04:53 +0000 (12:04 +0200)
commit2dd4db4fc9834e4acf6e30f9ecfedc5a5c28dba8
tree8e63ce7512d67ab166a7f67f346b226afe585a72
parent40d299a8273b95a507eec3fe809d28fdb7374981
USB: serial: ch341: fix lost character on LCR updates

commit 62d1b60030ecef48209e7b7687641c04d7a40771 upstream.

Disable LCR updates for pre-0x30 devices which use a different (unknown)
protocol for line control and where the current register write causes
the next received character to be lost.

Note that updating LCR using the INIT command has no effect on these
devices either.

Reported-by: Jonathan Woithe <jwoithe@just42.net>
Tested-by: Jonathan Woithe <jwoithe@just42.net>
Link: https://lore.kernel.org/r/Ys1iPTfiZRWj2gXs@marvin.atrad.com.au
Fixes: ddd74a622bf0 ("USB: serial: ch341: reinitialize chip on reconfiguration")
Fixes: c73dfc7221e8 ("USB: serial: ch341: fix baud rate and line-control handling")
Cc: stable@vger.kernel.org # 4.10
Signed-off-by: Johan Hovold <johan@kernel.org>
[ johan: adjust context to 5.4 ]
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/ch341.c