From: Johan Hovold Date: Sun, 29 Dec 2013 18:22:53 +0000 (+0100) Subject: USB: pl2303: fix data corruption on termios updates X-Git-Tag: v3.2.56~184 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0c906da142a5bd2ed8e67230466c8483dd18dab;p=pandora-kernel.git USB: pl2303: fix data corruption on termios updates commit 623c8263376c0b8a4b0c220232e7313d762cd0cc upstream. Some PL2303 devices are known to lose bytes if you change serial settings even to the same values as before. Avoid this by comparing the encoded settings with the previsouly used ones before configuring the device. The common case was fixed by commit bf5e5834bffc6 ("pl2303: Fix mode switching regression"), but this problem was still possible to trigger, for instance, by using the TCSETS2-interface to repeatedly request 115201 baud, which gets mapped to 115200 and thus always triggers a settings update. Cc: Frank Schäfer Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman [bwh: Backported to 3.2: adjust context; use dbg() instead of dev_dbg()] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed