Lines Matching refs:tty
62 void gs_put_char(struct tty_struct * tty, unsigned char ch) in gs_put_char() argument
69 if (!tty) return; in gs_put_char()
71 port = tty->driver_data; in gs_put_char()
104 int gs_write(struct tty_struct * tty, int from_user, in gs_write() argument
113 if (!tty) return 0; in gs_write()
115 port = tty->driver; in gs_write()
167 !tty->stopped && in gs_write()
168 !tty->hw_stopped && in gs_write()
184 int gs_write(struct tty_struct * tty, int from_user, in gs_write() argument
210 if (!tty) return -EIO; in gs_write()
212 port = tty->driver_data; in gs_write()
298 !tty->stopped && in gs_write()
299 !tty->hw_stopped && in gs_write()
312 int gs_write_room(struct tty_struct * tty) in gs_write_room() argument
314 struct gs_port *port = tty->driver_data; in gs_write_room()
326 int gs_chars_in_buffer(struct tty_struct *tty) in gs_chars_in_buffer() argument
328 struct gs_port *port = tty->driver_data; in gs_chars_in_buffer()
336 int gs_real_chars_in_buffer(struct tty_struct *tty) in gs_real_chars_in_buffer() argument
341 if (!tty) return 0; in gs_real_chars_in_buffer()
342 port = tty->driver_data; in gs_real_chars_in_buffer()
364 port->xmit_cnt, port->xmit_buf, port->tty); in gs_wait_tx_flushed()
373 rcib = gs_real_chars_in_buffer(port->tty); in gs_wait_tx_flushed()
392 while ((charsleft = gs_real_chars_in_buffer (port->tty)) && in gs_wait_tx_flushed()
424 void gs_flush_buffer(struct tty_struct *tty) in gs_flush_buffer() argument
431 if (!tty) return; in gs_flush_buffer()
433 port = tty->driver_data; in gs_flush_buffer()
442 tty_wakeup(tty); in gs_flush_buffer()
447 void gs_flush_chars(struct tty_struct * tty) in gs_flush_chars() argument
453 if (!tty) return; in gs_flush_chars()
455 port = tty->driver_data; in gs_flush_chars()
459 if (port->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped || in gs_flush_chars()
472 void gs_stop(struct tty_struct * tty) in gs_stop() argument
478 if (!tty) return; in gs_stop()
480 port = tty->driver_data; in gs_stop()
494 void gs_start(struct tty_struct * tty) in gs_start() argument
498 if (!tty) return; in gs_start()
500 port = tty->driver_data; in gs_start()
533 if (port->tty) in gs_shutdown_port()
534 set_bit(TTY_IO_ERROR, &port->tty->flags); in gs_shutdown_port()
545 void gs_hangup(struct tty_struct *tty) in gs_hangup() argument
551 if (!tty) return; in gs_hangup()
553 port = tty->driver_data; in gs_hangup()
554 tty = port->tty; in gs_hangup()
555 if (!tty) in gs_hangup()
560 port->tty = NULL; in gs_hangup()
571 struct tty_struct *tty; in gs_do_softint() local
577 tty = port->tty; in gs_do_softint()
579 if (!tty) return; in gs_do_softint()
582 tty_wakeup(tty); in gs_do_softint()
595 struct tty_struct *tty; in gs_block_til_ready() local
602 tty = port->tty; in gs_block_til_ready()
604 if (!tty) return 0; in gs_block_til_ready()
625 if (tty->driver.subtype == GS_TYPE_CALLOUT) { in gs_block_til_ready()
647 (tty->flags & (1 << TTY_IO_ERROR))) { in gs_block_til_ready()
660 if (C_CLOCAL(tty)) in gs_block_til_ready()
722 void gs_close(struct tty_struct * tty, struct file * filp) in gs_close() argument
729 if (!tty) return; in gs_close()
731 port = (struct gs_port *) tty->driver_data; in gs_close()
735 if (!port->tty) { in gs_close()
738 port->tty = tty; in gs_close()
750 if ((tty->count == 1) && (port->count != 1)) { in gs_close()
772 port->normal_termios = *tty->termios; in gs_close()
774 port->callout_termios = *tty->termios; in gs_close()
779 tty->closing = 1; in gs_close()
798 if (tty->driver.flush_buffer) in gs_close()
799 tty->driver.flush_buffer(tty); in gs_close()
800 tty_ldisc_flush(tty); in gs_close()
801 tty->closing = 0; in gs_close()
806 port->tty = 0; in gs_close()
830 void gs_set_termios (struct tty_struct * tty, in gs_set_termios() argument
839 if (!tty) return; in gs_set_termios()
841 port = tty->driver_data; in gs_set_termios()
845 tiosp = tty->termios; in gs_set_termios()
929 tty->stopped = 0; in gs_set_termios()
930 gs_start(tty); in gs_set_termios()
937 (tty->termios->c_cflag & CLOCAL)) in gs_set_termios()
992 if (port->tty) in gs_init_port()
993 clear_bit(TTY_IO_ERROR, &port->tty->flags); in gs_init_port()
997 gs_set_termios(port->tty, NULL); in gs_init_port()
1030 gs_set_termios (port->tty, NULL); in gs_setserial()
1074 do_SAK (port->tty); in gs_got_break()
1076 *(port->tty->flip.flag_buf_ptr) = TTY_BREAK; in gs_got_break()
1077 port->tty->flip.flag_buf_ptr++; in gs_got_break()
1078 port->tty->flip.char_buf_ptr++; in gs_got_break()
1079 port->tty->flip.count++; in gs_got_break()