Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175332
b: refs/heads/master
c: e707c35
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent ad6d883 commit e325ace
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: edfacdd6f81119b9005615593f2cbd94b8c7e2d8
refs/heads/master: e707c35cbbe83a016cf0122a29e3a47b5a9e35c4
13 changes: 8 additions & 5 deletions trunk/drivers/char/tty_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,14 @@ int tty_port_close_start(struct tty_port *port,
timeout = 2 * HZ;
schedule_timeout_interruptible(timeout);
}
/* Flush the ldisc buffering */
tty_ldisc_flush(tty);

/* Drop DTR/RTS if HUPCL is set. This causes any attached modem to
hang up the line */
if (tty->termios->c_cflag & HUPCL)
tty_port_lower_dtr_rts(port);

/* Don't call port->drop for the last reference. Callers will want
to drop the last active reference in ->shutdown() or the tty
shutdown path */
Expand All @@ -350,11 +358,6 @@ void tty_port_close_end(struct tty_port *port, struct tty_struct *tty)
{
unsigned long flags;

tty_ldisc_flush(tty);

if (tty->termios->c_cflag & HUPCL)
tty_port_lower_dtr_rts(port);

spin_lock_irqsave(&port->lock, flags);
tty->closing = 0;

Expand Down

0 comments on commit e325ace

Please sign in to comment.