aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb-serial.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-03-21 07:36:53 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-25 16:50:51 -0400
commitc371de14b9a23aadb57accab0ca2e5dd28de7f16 (patch)
treeaec827c692f6574509ca8eb7a00278e4926d7cc4 /drivers/usb/serial/usb-serial.c
parent980373b7918b8023be6b7df03857f494ae124d0b (diff)
USB: serial: wake up MSR-wait queue on disconnect
Make sure processes waiting for modem-status changes are woken up at disconnect. This is needed for custom subdriver TIOCMIWAIT-implementations which do not yet handle hangup. Even though processes on the tty-port wait queue are woken up at hangup the wake-up call in usb-serial disconnect is still needed if a woken-up process may go back to sleep (e.g. due to an incomplete TIOCMIWAIT-implementation). If a disconnect occurs after a hangup, any process waiting for changes will not be woken up a second time by the tty-layer as the port will then have been disassociated from the tty. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r--drivers/usb/serial/usb-serial.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index ada400d6594b..456881620727 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -1093,6 +1093,7 @@ static void usb_serial_disconnect(struct usb_interface *interface)
1093 tty_kref_put(tty); 1093 tty_kref_put(tty);
1094 } 1094 }
1095 usb_serial_port_poison_urbs(port); 1095 usb_serial_port_poison_urbs(port);
1096 wake_up_interruptible(&port->port.delta_msr_wait);
1096 cancel_work_sync(&port->work); 1097 cancel_work_sync(&port->work);
1097 if (device_is_registered(&port->dev)) 1098 if (device_is_registered(&port->dev))
1098 device_del(&port->dev); 1099 device_del(&port->dev);