Commit d74e8286 authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman
Browse files

tty: tty_port: Add IO_ERROR bit handling

To propogate tty_port_open/close to a few other devices we need to start
handling the IO_ERROR flag on the tty. We can do this pretty trivially.

Signed-off-by: default avatarAlan Cox <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 8f1e6723
......@@ -122,8 +122,10 @@ void tty_port_hangup(struct tty_port *port)
spin_lock_irqsave(&port->lock, flags);
port->count = 0;
port->flags &= ~ASYNC_NORMAL_ACTIVE;
if (port->tty)
if (port->tty) {
set_bit(TTY_IO_ERROR, &port->tty->flags);
port->tty = NULL;
spin_unlock_irqrestore(&port->lock, flags);
......@@ -383,6 +385,7 @@ void tty_port_close(struct tty_port *port, struct tty_struct *tty,
if (tty_port_close_start(port, tty, filp) == 0)
set_bit(TTY_IO_ERROR, &tty->flags);
tty_port_close_end(port, tty);
tty_port_tty_set(port, NULL);
......@@ -414,6 +417,7 @@ int tty_port_open(struct tty_port *port, struct tty_struct *tty,
set_bit(ASYNCB_INITIALIZED, &port->flags);
clear_bit(TTY_IO_ERROR, &tty->flags);
return tty_port_block_til_ready(port, tty, filp);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment