]> git.kernelconcepts.de Git - karo-tx-linux.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)
commitfd74b0b144d3e392b5269207ae4abba03f0adf59
treedace08b0d5e8f0d59e5524db0452c94880f31f36
parentb770081f88b75212d61a63a84274e491eb54b25a
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