• Johan Hovold's avatar
    USB: ch341: fix ignored TIOCMIWAIT mask · fd74b0b1
    Johan Hovold authored
    Make sure the TIOCMIWAIT mask is always honoured.
    
    The CH341 interrupt status has a multiple-status changed flag which
    indicates that multiple status changes has occurred since last interrupt
    event. Unfortunately, if the final status is the same, there appears to
    be no way to determine which signal(s) has changed (an even number of
    times).
    
    This means that the multiple-status flag should not be used in
    TIOCMIWAIT as it leads to the signal mask argument being ignored (e.g.
    TIOCMIWAIT could return if DSR changes twice, even though the user only
    cares about carrier changes).
    Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    fd74b0b1
ch341.c 15.5 KB