Lines Matching refs:tty
51 int gs_put_char(struct tty_struct * tty, unsigned char ch) in gs_put_char() argument
57 port = tty->driver_data; in gs_put_char()
89 int gs_write(struct tty_struct * tty, in gs_write() argument
98 port = tty->driver_data; in gs_write()
143 !tty->stopped && in gs_write()
144 !tty->hw_stopped && in gs_write()
155 int gs_write_room(struct tty_struct * tty) in gs_write_room() argument
157 struct gs_port *port = tty->driver_data; in gs_write_room()
169 int gs_chars_in_buffer(struct tty_struct *tty) in gs_chars_in_buffer() argument
171 struct gs_port *port = tty->driver_data; in gs_chars_in_buffer()
179 static int gs_real_chars_in_buffer(struct tty_struct *tty) in gs_real_chars_in_buffer() argument
184 port = tty->driver_data; in gs_real_chars_in_buffer()
206 port->xmit_cnt, port->xmit_buf, port->port.tty); in gs_wait_tx_flushed()
215 rcib = gs_real_chars_in_buffer(port->port.tty); in gs_wait_tx_flushed()
234 while ((charsleft = gs_real_chars_in_buffer (port->port.tty)) && in gs_wait_tx_flushed()
265 void gs_flush_buffer(struct tty_struct *tty) in gs_flush_buffer() argument
272 port = tty->driver_data; in gs_flush_buffer()
281 tty_wakeup(tty); in gs_flush_buffer()
286 void gs_flush_chars(struct tty_struct * tty) in gs_flush_chars() argument
292 port = tty->driver_data; in gs_flush_chars()
296 if (port->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped || in gs_flush_chars()
309 void gs_stop(struct tty_struct * tty) in gs_stop() argument
315 port = tty->driver_data; in gs_stop()
329 void gs_start(struct tty_struct * tty) in gs_start() argument
333 port = tty->driver_data; in gs_start()
365 if (port->port.tty) in gs_shutdown_port()
366 set_bit(TTY_IO_ERROR, &port->port.tty->flags); in gs_shutdown_port()
377 void gs_hangup(struct tty_struct *tty) in gs_hangup() argument
384 port = tty->driver_data; in gs_hangup()
385 tty = port->port.tty; in gs_hangup()
386 if (!tty) in gs_hangup()
392 port->port.tty = NULL; in gs_hangup()
409 struct tty_struct *tty; in gs_block_til_ready() local
416 tty = port->tty; in gs_block_til_ready()
438 (tty->flags & (1 << TTY_IO_ERROR))) { in gs_block_til_ready()
445 if (C_CLOCAL(tty)) in gs_block_til_ready()
507 void gs_close(struct tty_struct * tty, struct file * filp) in gs_close() argument
514 port = tty->driver_data; in gs_close()
518 if (!port->port.tty) { in gs_close()
521 port->port.tty = tty; in gs_close()
534 if ((tty->count == 1) && (port->port.count != 1)) { in gs_close()
556 tty->closing = 1; in gs_close()
578 gs_flush_buffer(tty); in gs_close()
580 tty_ldisc_flush(tty); in gs_close()
581 tty->closing = 0; in gs_close()
590 port->port.tty = NULL; in gs_close()
608 void gs_set_termios (struct tty_struct * tty, in gs_set_termios() argument
617 port = tty->driver_data; in gs_set_termios()
620 if (!port->port.tty) { in gs_set_termios()
623 port->port.tty = tty; in gs_set_termios()
627 tiosp = tty->termios; in gs_set_termios()
642 baudrate = tty_get_baud_rate(tty); in gs_set_termios()
684 tty->stopped = 0; in gs_set_termios()
685 gs_start(tty); in gs_set_termios()
692 (tty->termios->c_cflag & CLOCAL)) in gs_set_termios()
731 if (port->port.tty) in gs_init_port()
732 clear_bit(TTY_IO_ERROR, &port->port.tty->flags); in gs_init_port()
736 gs_set_termios(port->port.tty, NULL); in gs_init_port()
770 gs_set_termios (port->port.tty, NULL); in gs_setserial()
815 tty_insert_flip_char(port->port.tty, 0, TTY_BREAK); in gs_got_break()
816 tty_schedule_flip(port->port.tty); in gs_got_break()
818 do_SAK (port->port.tty); in gs_got_break()