Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364244
b: refs/heads/master
c: 0b2588c
h: refs/heads/master
v: v3
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Mar 18, 2013
1 parent acf0cc2 commit 75f3406
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 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: b74414f5f3227d9db309bfaaea3ae889af01430a
refs/heads/master: 0b2588cadf9f131614cb251e34f7be1f4e1a2e08
18 changes: 10 additions & 8 deletions trunk/drivers/tty/tty_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,14 +487,16 @@ int tty_port_close_start(struct tty_port *port,
set_bit(ASYNCB_CLOSING, &port->flags);
tty->closing = 1;
spin_unlock_irqrestore(&port->lock, flags);
/* Don't block on a stalled port, just pull the chain */
if (tty->flow_stopped)
tty_driver_flush_buffer(tty);
if (test_bit(ASYNCB_INITIALIZED, &port->flags) &&
port->closing_wait != ASYNC_CLOSING_WAIT_NONE)
tty_wait_until_sent_from_close(tty, port->closing_wait);
if (port->drain_delay)
tty_port_drain_delay(port, tty);

if (test_bit(ASYNCB_INITIALIZED, &port->flags)) {
/* Don't block on a stalled port, just pull the chain */
if (tty->flow_stopped)
tty_driver_flush_buffer(tty);
if (port->closing_wait != ASYNC_CLOSING_WAIT_NONE)
tty_wait_until_sent_from_close(tty, port->closing_wait);
if (port->drain_delay)
tty_port_drain_delay(port, tty);
}
/* Flush the ldisc buffering */
tty_ldisc_flush(tty);

Expand Down

0 comments on commit 75f3406

Please sign in to comment.