mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 07:13:34 +00:00
USB: cypress_m8: only wake up MSR queue on changes
Only wake up MSR wait queue on actual modem-status changes. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2534be34c9
commit
7603381e3e
2 changed files with 5 additions and 1 deletions
|
@ -1187,7 +1187,10 @@ static void cypress_read_int_callback(struct urb *urb)
|
||||||
if (priv->current_status != priv->prev_status) {
|
if (priv->current_status != priv->prev_status) {
|
||||||
priv->diff_status |= priv->current_status ^
|
priv->diff_status |= priv->current_status ^
|
||||||
priv->prev_status;
|
priv->prev_status;
|
||||||
wake_up_interruptible(&port->port.delta_msr_wait);
|
|
||||||
|
if (priv->diff_status & UART_MSR_MASK)
|
||||||
|
wake_up_interruptible(&port->port.delta_msr_wait);
|
||||||
|
|
||||||
priv->prev_status = priv->current_status;
|
priv->prev_status = priv->current_status;
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&priv->lock, flags);
|
spin_unlock_irqrestore(&priv->lock, flags);
|
||||||
|
|
|
@ -66,6 +66,7 @@
|
||||||
#define CONTROL_RTS 0x10 /* request to send */
|
#define CONTROL_RTS 0x10 /* request to send */
|
||||||
#define CONTROL_RESET 0x08 /* sent with output report */
|
#define CONTROL_RESET 0x08 /* sent with output report */
|
||||||
|
|
||||||
|
#define UART_MSR_MASK 0xf0
|
||||||
#define UART_RI 0x80 /* ring indicator */
|
#define UART_RI 0x80 /* ring indicator */
|
||||||
#define UART_CD 0x40 /* carrier detect */
|
#define UART_CD 0x40 /* carrier detect */
|
||||||
#define UART_DSR 0x20 /* data set ready */
|
#define UART_DSR 0x20 /* data set ready */
|
||||||
|
|
Loading…
Reference in a new issue