Skip to content

Commit

Permalink
tty: tty port zero baud open
Browse files Browse the repository at this point in the history
If we have no speed set at some point then we should not raise DTR/RTS at
that point when opening as the tty is not ready

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jan 2, 2009
1 parent 0fdeceb commit 7834909
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/char/tty_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ int tty_port_block_til_ready(struct tty_port *port,

while (1) {
/* Indicate we are open */
tty_port_raise_dtr_rts(port);
if (tty->termios->c_cflag & CBAUD)
tty_port_raise_dtr_rts(port);

set_current_state(TASK_INTERRUPTIBLE);
/* Check for a hangup or uninitialised port. Return accordingly */
Expand Down

0 comments on commit 7834909

Please sign in to comment.