• Home
  • Raw
  • Download

Lines Matching refs:tty

556 	struct tty_struct *tty;  in sx_receive_exc()  local
568 tty = port->port.tty; in sx_receive_exc()
583 if (tty_buffer_request_room(tty, 1) == 0) { in sx_receive_exc()
608 do_SAK(tty); in sx_receive_exc()
622 if (tty_insert_flip_char(tty, ch, flag)) in sx_receive_exc()
623 tty_flip_buffer_push(tty); in sx_receive_exc()
631 struct tty_struct *tty; in sx_receive() local
642 tty = port->port.tty; in sx_receive()
648 tty_buffer_request_room(tty, count); in sx_receive()
651 tty_insert_flip_char(tty, sx_in(bp, CD186x_RDR), TTY_NORMAL); in sx_receive()
652 tty_flip_buffer_push(tty); in sx_receive()
660 struct tty_struct *tty; in sx_transmit() local
670 tty = port->port.tty; in sx_transmit()
682 || tty->stopped || tty->hw_stopped) { in sx_transmit()
731 tty_wakeup(tty); in sx_transmit()
740 struct tty_struct *tty; in sx_check_modem() local
749 tty = port->port.tty; in sx_check_modem()
761 tty_hangup(tty); in sx_check_modem()
768 tty->hw_stopped = 0; in sx_check_modem()
771 tty_wakeup(tty); in sx_check_modem()
773 tty->hw_stopped = 1; in sx_check_modem()
780 tty->hw_stopped = 0; in sx_check_modem()
783 tty_wakeup(tty); in sx_check_modem()
785 tty->hw_stopped = 1; in sx_check_modem()
946 static unsigned int sx_crtscts(struct tty_struct *tty) in sx_crtscts() argument
949 return C_CRTSCTS(tty); in sx_crtscts()
960 struct tty_struct *tty; in sx_change_speed() local
970 tty = port->port.tty; in sx_change_speed()
971 if (!tty || !tty->termios) { in sx_change_speed()
984 if (sx_crtscts(tty)) in sx_change_speed()
990 baud = tty_get_baud_rate(tty); in sx_change_speed()
1002 if (!sx_crtscts(tty)) { in sx_change_speed()
1012 if (!sx_crtscts(tty)) in sx_change_speed()
1067 switch (C_CSIZE(tty)) { in sx_change_speed()
1082 if (C_CSTOPB(tty)) in sx_change_speed()
1086 if (C_PARENB(tty)) { in sx_change_speed()
1088 if (C_PARODD(tty)) in sx_change_speed()
1090 if (I_INPCK(tty)) in sx_change_speed()
1095 if (I_INPCK(tty)) in sx_change_speed()
1097 if (I_BRKINT(tty) || I_PARMRK(tty)) in sx_change_speed()
1099 if (I_IGNPAR(tty)) in sx_change_speed()
1101 if (I_IGNBRK(tty)) { in sx_change_speed()
1103 if (I_IGNPAR(tty)) in sx_change_speed()
1108 if (C_CRTSCTS(tty)) { in sx_change_speed()
1114 tty->hw_stopped = !(sx_in(bp, CD186x_MSVR) & in sx_change_speed()
1123 if (I_IXON(tty)) { in sx_change_speed()
1126 if (I_IXANY(tty)) in sx_change_speed()
1129 sx_out(bp, CD186x_SCHR1, START_CHAR(tty)); in sx_change_speed()
1130 sx_out(bp, CD186x_SCHR2, STOP_CHAR(tty)); in sx_change_speed()
1131 sx_out(bp, CD186x_SCHR3, START_CHAR(tty)); in sx_change_speed()
1132 sx_out(bp, CD186x_SCHR4, STOP_CHAR(tty)); in sx_change_speed()
1135 if (!C_CLOCAL(tty)) { in sx_change_speed()
1142 if (C_CREAD(tty)) in sx_change_speed()
1211 if (port->port.tty) in sx_setup_port()
1212 clear_bit(TTY_IO_ERROR, &port->port.tty->flags); in sx_setup_port()
1230 struct tty_struct *tty; in sx_shutdown_port() local
1259 tty = port->port.tty; in sx_shutdown_port()
1260 if (tty == NULL || C_HUPCL(tty)) { in sx_shutdown_port()
1273 if (tty) in sx_shutdown_port()
1274 set_bit(TTY_IO_ERROR, &tty->flags); in sx_shutdown_port()
1283 static int block_til_ready(struct tty_struct *tty, struct file *filp, in block_til_ready() argument
1315 (tty->flags & (1 << TTY_IO_ERROR))) { in block_til_ready()
1321 if (C_CLOCAL(tty)) in block_til_ready()
1342 if (sx_crtscts(tty)) { in block_til_ready()
1389 static int sx_open(struct tty_struct *tty, struct file *filp) in sx_open() argument
1400 board = SX_BOARD(tty->index); in sx_open()
1408 port = sx_port + board * SX_NPORT + SX_PORT(tty->index); in sx_open()
1415 board, bp, port, SX_PORT(tty->index)); in sx_open()
1417 if (sx_paranoia_check(port, tty->name, "sx_open")) { in sx_open()
1431 tty->driver_data = port; in sx_open()
1432 port->port.tty = tty; in sx_open()
1441 error = block_til_ready(tty, filp, port); in sx_open()
1451 static void sx_flush_buffer(struct tty_struct *tty) in sx_flush_buffer() argument
1453 struct specialix_port *port = tty->driver_data; in sx_flush_buffer()
1459 if (sx_paranoia_check(port, tty->name, "sx_flush_buffer")) { in sx_flush_buffer()
1468 tty_wakeup(tty); in sx_flush_buffer()
1473 static void sx_close(struct tty_struct *tty, struct file *filp) in sx_close() argument
1475 struct specialix_port *port = tty->driver_data; in sx_close()
1481 if (!port || sx_paranoia_check(port, tty->name, "close")) { in sx_close()
1494 if (tty->count == 1 && port->port.count != 1) { in sx_close()
1515 tty->closing = 1; in sx_close()
1519 tty_wait_until_sent(tty, port->port.closing_wait); in sx_close()
1555 board_No(bp), bp->count, tty->index); in sx_close()
1566 sx_flush_buffer(tty); in sx_close()
1567 tty_ldisc_flush(tty); in sx_close()
1569 tty->closing = 0; in sx_close()
1570 port->port.tty = NULL; in sx_close()
1585 static int sx_write(struct tty_struct *tty, in sx_write() argument
1588 struct specialix_port *port = tty->driver_data; in sx_write()
1594 if (sx_paranoia_check(port, tty->name, "sx_write")) { in sx_write()
1625 if (port->xmit_cnt && !tty->stopped && !tty->hw_stopped && in sx_write()
1638 static int sx_put_char(struct tty_struct *tty, unsigned char ch) in sx_put_char() argument
1640 struct specialix_port *port = tty->driver_data; in sx_put_char()
1646 if (sx_paranoia_check(port, tty->name, "sx_put_char")) { in sx_put_char()
1650 dprintk(SX_DEBUG_TX, "check tty: %p %p\n", tty, port->xmit_buf); in sx_put_char()
1677 static void sx_flush_chars(struct tty_struct *tty) in sx_flush_chars() argument
1679 struct specialix_port *port = tty->driver_data; in sx_flush_chars()
1685 if (sx_paranoia_check(port, tty->name, "sx_flush_chars")) { in sx_flush_chars()
1689 if (port->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped || in sx_flush_chars()
1704 static int sx_write_room(struct tty_struct *tty) in sx_write_room() argument
1706 struct specialix_port *port = tty->driver_data; in sx_write_room()
1711 if (sx_paranoia_check(port, tty->name, "sx_write_room")) { in sx_write_room()
1725 static int sx_chars_in_buffer(struct tty_struct *tty) in sx_chars_in_buffer() argument
1727 struct specialix_port *port = tty->driver_data; in sx_chars_in_buffer()
1731 if (sx_paranoia_check(port, tty->name, "sx_chars_in_buffer")) { in sx_chars_in_buffer()
1739 static int sx_tiocmget(struct tty_struct *tty, struct file *file) in sx_tiocmget() argument
1741 struct specialix_port *port = tty->driver_data; in sx_tiocmget()
1749 if (sx_paranoia_check(port, tty->name, __func__)) { in sx_tiocmget()
1762 if (sx_crtscts(port->port.tty)) { in sx_tiocmget()
1780 static int sx_tiocmset(struct tty_struct *tty, struct file *file, in sx_tiocmset() argument
1783 struct specialix_port *port = tty->driver_data; in sx_tiocmset()
1789 if (sx_paranoia_check(port, tty->name, __func__)) { in sx_tiocmset()
1797 if (sx_crtscts(port->port.tty)) { in sx_tiocmset()
1804 if (sx_crtscts(port->port.tty)) { in sx_tiocmset()
1821 static int sx_send_break(struct tty_struct *tty, int length) in sx_send_break() argument
1823 struct specialix_port *port = tty->driver_data; in sx_send_break()
1931 static int sx_ioctl(struct tty_struct *tty, struct file *filp, in sx_ioctl() argument
1934 struct specialix_port *port = tty->driver_data; in sx_ioctl()
1939 if (sx_paranoia_check(port, tty->name, "sx_ioctl")) { in sx_ioctl()
1960 static void sx_throttle(struct tty_struct *tty) in sx_throttle() argument
1962 struct specialix_port *port = tty->driver_data; in sx_throttle()
1968 if (sx_paranoia_check(port, tty->name, "sx_throttle")) { in sx_throttle()
1976 if (sx_crtscts(tty)) in sx_throttle()
1990 if (I_IXOFF(tty)) { in sx_throttle()
2005 static void sx_unthrottle(struct tty_struct *tty) in sx_unthrottle() argument
2007 struct specialix_port *port = tty->driver_data; in sx_unthrottle()
2013 if (sx_paranoia_check(port, tty->name, "sx_unthrottle")) { in sx_unthrottle()
2022 if (sx_crtscts(tty)) in sx_unthrottle()
2028 if (I_IXOFF(tty)) { in sx_unthrottle()
2046 static void sx_stop(struct tty_struct *tty) in sx_stop() argument
2048 struct specialix_port *port = tty->driver_data; in sx_stop()
2054 if (sx_paranoia_check(port, tty->name, "sx_stop")) { in sx_stop()
2073 static void sx_start(struct tty_struct *tty) in sx_start() argument
2075 struct specialix_port *port = tty->driver_data; in sx_start()
2081 if (sx_paranoia_check(port, tty->name, "sx_start")) { in sx_start()
2101 static void sx_hangup(struct tty_struct *tty) in sx_hangup() argument
2103 struct specialix_port *port = tty->driver_data; in sx_hangup()
2109 if (sx_paranoia_check(port, tty->name, "sx_hangup")) { in sx_hangup()
2122 board_No(bp), bp->count, tty->index); in sx_hangup()
2127 port->port.tty = NULL; in sx_hangup()
2135 static void sx_set_termios(struct tty_struct *tty, in sx_set_termios() argument
2138 struct specialix_port *port = tty->driver_data; in sx_set_termios()
2142 if (sx_paranoia_check(port, tty->name, "sx_set_termios")) in sx_set_termios()
2151 !(tty->termios->c_cflag & CRTSCTS)) { in sx_set_termios()
2152 tty->hw_stopped = 0; in sx_set_termios()
2153 sx_start(tty); in sx_set_termios()