From c3883b5fe94cefa2585c9b484707e7d2415f5f7e Mon Sep 17 00:00:00 2001 From: Aidan Thornton Date: Sat, 22 Oct 2016 22:02:24 +0100 Subject: [PATCH] USB: serial: ch341: reinitialize chip on reconfiguration commit 4e46c410e050bcac36deadbd8e20449d078204e8 upstream. Changing the LCR register after initialization does not seem to be reliable on all chips (particularly not on CH341A). Restructure initialization and configuration to always reinit the chip on configuration changes instead and pass the LCR register value directly to the initialization command. (Note that baud rates above 500kbaud are incorrect, but they're incorrect in the same way both before and after this patch at least on the CH340G. Fixing this isn't a priority as higher baud rates don't seem that reliable anyway.) Cleaned-up version of a patch by Grigori Goronzy Signed-off-by: Aidan Thornton Reviewed-by: Grigori Goronzy Signed-off-by: Johan Hovold [bwh: Backported to 3.2: tty_struct::termios is a pointer, not a struct] Signed-off-by: Ben Hutchings --- Reading git-format-patch failed