]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/tty_port.c
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[linux-2.6-omap-h63xx.git] / drivers / char / tty_port.c
index b3175f54fe055f8011787d2907bee37c85acb888..9b8004c72686a45f6ea577f1cd342e001dbbfa49 100644 (file)
@@ -286,7 +286,11 @@ int tty_port_close_start(struct tty_port *port, struct tty_struct *tty, struct f
        port->flags |= ASYNC_CLOSING;
        tty->closing = 1;
        spin_unlock_irqrestore(&port->lock, flags);
-       if (port->closing_wait != ASYNC_CLOSING_WAIT_NONE)
+       /* Don't block on a stalled port, just pull the chain */
+       if (tty->flow_stopped)
+               tty_driver_flush_buffer(tty);
+       if (port->flags & ASYNC_INITIALIZED &&
+                       port->closing_wait != ASYNC_CLOSING_WAIT_NONE)
                tty_wait_until_sent(tty, port->closing_wait);
        return 1;
 }