diff options
Diffstat (limited to 'drivers/char/tty_port.c')
| -rw-r--r-- | drivers/char/tty_port.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c index a4bbb28f10be..c63f3d33914a 100644 --- a/drivers/char/tty_port.c +++ b/drivers/char/tty_port.c | |||
| @@ -219,8 +219,14 @@ int tty_port_block_til_ready(struct tty_port *port, | |||
| 219 | 219 | ||
| 220 | /* if non-blocking mode is set we can pass directly to open unless | 220 | /* if non-blocking mode is set we can pass directly to open unless |
| 221 | the port has just hung up or is in another error state */ | 221 | the port has just hung up or is in another error state */ |
| 222 | if ((filp->f_flags & O_NONBLOCK) || | 222 | if (tty->flags & (1 << TTY_IO_ERROR)) { |
| 223 | (tty->flags & (1 << TTY_IO_ERROR))) { | 223 | port->flags |= ASYNC_NORMAL_ACTIVE; |
| 224 | return 0; | ||
| 225 | } | ||
| 226 | if (filp->f_flags & O_NONBLOCK) { | ||
| 227 | /* Indicate we are open */ | ||
| 228 | if (tty->termios->c_cflag & CBAUD) | ||
| 229 | tty_port_raise_dtr_rts(port); | ||
| 224 | port->flags |= ASYNC_NORMAL_ACTIVE; | 230 | port->flags |= ASYNC_NORMAL_ACTIVE; |
| 225 | return 0; | 231 | return 0; |
| 226 | } | 232 | } |
