ソースを参照

tty: tty port zero baud open

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>
Alan Cox 16 年 前
コミット
7834909f1e
1 ファイル変更2 行追加1 行削除
  1. 2 1
      drivers/char/tty_port.c

+ 2 - 1
drivers/char/tty_port.c

@@ -216,7 +216,8 @@ int tty_port_block_til_ready(struct tty_port *port,
 
 
 	while (1) {
 	while (1) {
 		/* Indicate we are open */
 		/* 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);
 		set_current_state(TASK_INTERRUPTIBLE);
 		/* Check for a hangup or uninitialised port. Return accordingly */
 		/* Check for a hangup or uninitialised port. Return accordingly */