mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-19 08:27:45 +07:00
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>
This commit is contained in:
parent
980373b791
commit
c371de14b9
@ -1093,6 +1093,7 @@ static void usb_serial_disconnect(struct usb_interface *interface)
|
|||||||
tty_kref_put(tty);
|
tty_kref_put(tty);
|
||||||
}
|
}
|
||||||
usb_serial_port_poison_urbs(port);
|
usb_serial_port_poison_urbs(port);
|
||||||
|
wake_up_interruptible(&port->port.delta_msr_wait);
|
||||||
cancel_work_sync(&port->work);
|
cancel_work_sync(&port->work);
|
||||||
if (device_is_registered(&port->dev))
|
if (device_is_registered(&port->dev))
|
||||||
device_del(&port->dev);
|
device_del(&port->dev);
|
||||||
|
Loading…
Reference in New Issue
Block a user