Lines Matching refs:flags
172 unsigned long flags; in tty_port_tty_get() local
175 spin_lock_irqsave(&port->lock, flags); in tty_port_tty_get()
177 spin_unlock_irqrestore(&port->lock, flags); in tty_port_tty_get()
193 unsigned long flags; in tty_port_tty_set() local
195 spin_lock_irqsave(&port->lock, flags); in tty_port_tty_set()
198 spin_unlock_irqrestore(&port->lock, flags); in tty_port_tty_set()
208 if (test_and_clear_bit(ASYNCB_INITIALIZED, &port->flags)) { in tty_port_shutdown()
236 unsigned long flags; in tty_port_hangup() local
238 spin_lock_irqsave(&port->lock, flags); in tty_port_hangup()
240 port->flags &= ~ASYNC_NORMAL_ACTIVE; in tty_port_hangup()
243 set_bit(TTY_IO_ERROR, &tty->flags); in tty_port_hangup()
245 spin_unlock_irqrestore(&port->lock, flags); in tty_port_hangup()
363 unsigned long flags; in tty_port_block_til_ready() local
367 if (port->flags & ASYNC_CLOSING) { in tty_port_block_til_ready()
369 !(port->flags & ASYNC_CLOSING)); in tty_port_block_til_ready()
370 if (port->flags & ASYNC_HUP_NOTIFY) in tty_port_block_til_ready()
378 if (tty->flags & (1 << TTY_IO_ERROR)) { in tty_port_block_til_ready()
379 port->flags |= ASYNC_NORMAL_ACTIVE; in tty_port_block_til_ready()
386 port->flags |= ASYNC_NORMAL_ACTIVE; in tty_port_block_til_ready()
400 spin_lock_irqsave(&port->lock, flags); in tty_port_block_til_ready()
403 spin_unlock_irqrestore(&port->lock, flags); in tty_port_block_til_ready()
407 if (C_BAUD(tty) && test_bit(ASYNCB_INITIALIZED, &port->flags)) in tty_port_block_til_ready()
413 if (tty_hung_up_p(filp) || !(port->flags & ASYNC_INITIALIZED)) { in tty_port_block_til_ready()
414 if (port->flags & ASYNC_HUP_NOTIFY) in tty_port_block_til_ready()
426 if (!(port->flags & ASYNC_CLOSING) && in tty_port_block_til_ready()
441 spin_lock_irqsave(&port->lock, flags); in tty_port_block_til_ready()
446 port->flags |= ASYNC_NORMAL_ACTIVE; in tty_port_block_til_ready()
447 spin_unlock_irqrestore(&port->lock, flags); in tty_port_block_til_ready()
473 unsigned long flags; in tty_port_close_start() local
478 spin_lock_irqsave(&port->lock, flags); in tty_port_close_start()
492 spin_unlock_irqrestore(&port->lock, flags); in tty_port_close_start()
495 set_bit(ASYNCB_CLOSING, &port->flags); in tty_port_close_start()
496 spin_unlock_irqrestore(&port->lock, flags); in tty_port_close_start()
500 if (test_bit(ASYNCB_INITIALIZED, &port->flags)) { in tty_port_close_start()
520 unsigned long flags; in tty_port_close_end() local
525 spin_lock_irqsave(&port->lock, flags); in tty_port_close_end()
528 spin_unlock_irqrestore(&port->lock, flags); in tty_port_close_end()
533 spin_lock_irqsave(&port->lock, flags); in tty_port_close_end()
536 port->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING); in tty_port_close_end()
538 spin_unlock_irqrestore(&port->lock, flags); in tty_port_close_end()
557 set_bit(TTY_IO_ERROR, &tty->flags); in tty_port_close()
605 if (!test_bit(ASYNCB_INITIALIZED, &port->flags)) { in tty_port_open()
606 clear_bit(TTY_IO_ERROR, &tty->flags); in tty_port_open()
614 set_bit(ASYNCB_INITIALIZED, &port->flags); in tty_port_open()