提交 e5b33dc9 编写于 作者: J Johan Hovold 提交者: Greg Kroah-Hartman

USB: serial: add modem-status-change wait queue

Add modem-status-change wait queue to struct usb_serial_port that
subdrivers can use to implement TIOCMIWAIT.

Currently subdrivers use a private wait queue which may have been
released when waking up after device disconnected.

Note that we're adding a new wait queue rather than reusing the tty-port
one as we do not want to get woken up at hangup (yet).

Cc: stable <stable@vger.kernel.org>
Signed-off-by: NJohan Hovold <jhovold@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 d7971051
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
* port. * port.
* @flags: usb serial port flags * @flags: usb serial port flags
* @write_wait: a wait_queue_head_t used by the port. * @write_wait: a wait_queue_head_t used by the port.
* @delta_msr_wait: modem-status-change wait queue
* @work: work queue entry for the line discipline waking up. * @work: work queue entry for the line discipline waking up.
* @throttled: nonzero if the read urb is inactive to throttle the device * @throttled: nonzero if the read urb is inactive to throttle the device
* @throttle_req: nonzero if the tty wants to throttle us * @throttle_req: nonzero if the tty wants to throttle us
...@@ -112,6 +113,7 @@ struct usb_serial_port { ...@@ -112,6 +113,7 @@ struct usb_serial_port {
unsigned long flags; unsigned long flags;
wait_queue_head_t write_wait; wait_queue_head_t write_wait;
wait_queue_head_t delta_msr_wait;
struct work_struct work; struct work_struct work;
char throttled; char throttled;
char throttle_req; char throttle_req;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册