aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/oti6858.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2014-01-02 16:49:34 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-03 15:42:24 -0500
commit1acc36e9c8dcd44f0978c9270e24daa83f343f85 (patch)
tree833e2d0186062db120b878f902cbb13f6821e730 /drivers/usb/serial/oti6858.c
parent271ec2d2d7bd4ab528a7a94701503df06ca8fd52 (diff)
USB: oti6858: 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>
Diffstat (limited to 'drivers/usb/serial/oti6858.c')
-rw-r--r--drivers/usb/serial/oti6858.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index 1dea599bb71b..9ea15e0a22d8 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -103,6 +103,7 @@ struct oti6858_control_pkt {
103#define TX_BUFFER_EMPTIED 0x09 103#define TX_BUFFER_EMPTIED 0x09
104 u8 pin_state; 104 u8 pin_state;
105#define PIN_MASK 0x3f 105#define PIN_MASK 0x3f
106#define PIN_MSR_MASK 0x1b
106#define PIN_RTS 0x20 /* output pin */ 107#define PIN_RTS 0x20 /* output pin */
107#define PIN_CTS 0x10 /* input pin, active low */ 108#define PIN_CTS 0x10 /* input pin, active low */
108#define PIN_DSR 0x08 /* input pin, active low */ 109#define PIN_DSR 0x08 /* input pin, active low */
@@ -739,8 +740,11 @@ static void oti6858_read_int_callback(struct urb *urb)
739 } 740 }
740 741
741 if (!priv->transient) { 742 if (!priv->transient) {
742 if (xs->pin_state != priv->status.pin_state) 743 u8 delta = xs->pin_state ^ priv->status.pin_state;
744
745 if (delta & PIN_MSR_MASK)
743 wake_up_interruptible(&port->port.delta_msr_wait); 746 wake_up_interruptible(&port->port.delta_msr_wait);
747
744 memcpy(&priv->status, xs, OTI6858_CTRL_PKT_SIZE); 748 memcpy(&priv->status, xs, OTI6858_CTRL_PKT_SIZE);
745 } 749 }
746 750