From: Johan Hovold Date: Fri, 6 Jan 2017 18:15:16 +0000 (+0100) Subject: USB: serial: ch341: fix baud rate and line-control handling X-Git-Tag: v3.2.87~102 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16ce3fcc7754c6c3d38539c968ba00305c8bb805;p=pandora-kernel.git USB: serial: ch341: fix baud rate and line-control handling commit 55fa15b5987db22b4f35d3f0798928c126be5f1c upstream. Revert to using direct register writes to set the divisor and line-control registers. A recent change switched to using the init vendor command to update these registers, something which also enabled support for CH341A devices. It turns out that simply setting bit 7 in the divisor register is sufficient to support CH341A and specifically prevent data from being buffered until a full endpoint-size packet (32 bytes) has been received. Using the init command also had the side-effect of temporarily deasserting the DTR/RTS signals on every termios change (including initialisation on open) something which for example could cause problems in setups where DTR is used to trigger a reset. Fixes: 4e46c410e050 ("USB: serial: ch341: reinitialize chip on reconfiguration") Signed-off-by: Johan Hovold [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed