• J
    USB: pl2303: fix data corruption on termios updates · 623c8263
    Johan Hovold 提交于
    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 bf5e5834 ("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 <fschaefer.oss@googlemail.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: NJohan Hovold <jhovold@gmail.com>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    623c8263
pl2303.c 23.7 KB