|
@@ -497,9 +497,10 @@ int tty_port_close_start(struct tty_port *port,
|
|
|
return 0;
|
|
|
}
|
|
|
set_bit(ASYNCB_CLOSING, &port->flags);
|
|
|
- tty->closing = 1;
|
|
|
spin_unlock_irqrestore(&port->lock, flags);
|
|
|
|
|
|
+ tty->closing = 1;
|
|
|
+
|
|
|
if (test_bit(ASYNCB_INITIALIZED, &port->flags)) {
|
|
|
/* Don't block on a stalled port, just pull the chain */
|
|
|
if (tty->flow_stopped)
|
|
@@ -522,9 +523,10 @@ void tty_port_close_end(struct tty_port *port, struct tty_struct *tty)
|
|
|
{
|
|
|
unsigned long flags;
|
|
|
|
|
|
- spin_lock_irqsave(&port->lock, flags);
|
|
|
tty->closing = 0;
|
|
|
|
|
|
+ spin_lock_irqsave(&port->lock, flags);
|
|
|
+
|
|
|
if (port->blocked_open) {
|
|
|
spin_unlock_irqrestore(&port->lock, flags);
|
|
|
if (port->close_delay) {
|