]> git.baikalelectronics.ru Git - kernel.git/commit
USB: ch341: fix ignored TIOCMIWAIT mask
authorJohan Hovold <jhovold@gmail.com>
Thu, 2 Jan 2014 21:49:30 +0000 (22:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Jan 2014 20:42:24 +0000 (12:42 -0800)
commit6d0e1bc598c1f3f36e4148f52b89b464225c4348
treedace08b0d5e8f0d59e5524db0452c94880f31f36
parent08fae3e5c157d915f4c44da5def9755550defb8e
USB: ch341: fix ignored TIOCMIWAIT mask

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: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/ch341.c