summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-03-19 09:21:19 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-21 15:59:04 -0700
commite670c6af12517d08a403487b1122eecf506021cf (patch)
tree497e4b411ad355e59d9922ba4c1955c6bfdc9c14 /drivers/usb
parentcf1d24443677a0758cfa88ca40f24858b89261c0 (diff)
downloadop-kernel-dev-e670c6af12517d08a403487b1122eecf506021cf.zip
op-kernel-dev-e670c6af12517d08a403487b1122eecf506021cf.tar.gz
USB: mos7840: fix broken TIOCMIWAIT
Make sure waiting processes are woken on modem-status changes. Currently processes are only woken on termios changes regardless of whether the modem status has changed. Cc: stable <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/mos7840.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 809fb32..1b83b01 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -423,6 +423,9 @@ static void mos7840_handle_new_msr(struct moschip_port *port, __u8 new_msr)
icount->rng++;
smp_wmb();
}
+
+ mos7840_port->delta_msr_cond = 1;
+ wake_up_interruptible(&mos7840_port->delta_msr_wait);
}
}
@@ -2017,8 +2020,6 @@ static void mos7840_change_port_settings(struct tty_struct *tty,
mos7840_port->read_urb_busy = false;
}
}
- wake_up(&mos7840_port->delta_msr_wait);
- mos7840_port->delta_msr_cond = 1;
dev_dbg(&port->dev, "%s - mos7840_port->shadowLCR is End %x\n", __func__,
mos7840_port->shadowLCR);
}
OpenPOWER on IntegriCloud