• Home
  • Raw
  • Download

Lines Matching refs:tty

316 static void cy_stop(struct tty_struct *tty)  in cy_stop()  argument
318 struct cyclades_port *info = tty->driver_data; in cy_stop()
324 printk("cy_stop %s\n", tty->name); /* */ in cy_stop()
327 if (serial_paranoia_check(info, tty->name, "cy_stop")) in cy_stop()
338 static void cy_start(struct tty_struct *tty) in cy_start() argument
340 struct cyclades_port *info = tty->driver_data; in cy_start()
346 printk("cy_start %s\n", tty->name); /* */ in cy_start()
349 if (serial_paranoia_check(info, tty->name, "cy_start")) in cy_start()
366 struct tty_struct *tty; in cd2401_rxerr_interrupt() local
393 if (info->tty == 0) { in cd2401_rxerr_interrupt()
397 tty = info->tty; in cd2401_rxerr_interrupt()
402 if (tty_buffer_request_room(tty, 1) != 0) { in cd2401_rxerr_interrupt()
405 tty_insert_flip_char(tty, data, in cd2401_rxerr_interrupt()
408 do_SAK(tty); in cd2401_rxerr_interrupt()
411 tty_insert_flip_char(tty, data, in cd2401_rxerr_interrupt()
414 tty_insert_flip_char(tty, data, in cd2401_rxerr_interrupt()
417 tty_insert_flip_char(tty, 0, in cd2401_rxerr_interrupt()
424 if (tty_buffer_request_room(tty, 1) != in cd2401_rxerr_interrupt()
426 tty_insert_flip_char(tty, data, in cd2401_rxerr_interrupt()
434 tty_insert_flip_char(tty, 0, in cd2401_rxerr_interrupt()
438 tty_insert_flip_char(tty, data, TTY_NORMAL); in cd2401_rxerr_interrupt()
445 tty_schedule_flip(tty); in cd2401_rxerr_interrupt()
467 if (info->tty == 0) { /* nowhere to put the data, ignore it */ in cd2401_modem_interrupt()
477 tty_hangup(info->tty); in cd2401_modem_interrupt()
484 if (info->tty->stopped) { in cd2401_modem_interrupt()
487 info->tty->stopped = 0; in cd2401_modem_interrupt()
489 tty_wakeup(info->tty); in cd2401_modem_interrupt()
494 info->tty->stopped = 1; in cd2401_modem_interrupt()
533 if (info->tty == 0) { in cd2401_tx_interrupt()
579 if (info->tty->stopped || info->tty->hw_stopped) { in cd2401_tx_interrupt()
617 tty_wakeup(info->tty); in cd2401_tx_interrupt()
625 struct tty_struct *tty; in cd2401_rx_interrupt() local
649 if (info->tty == 0) { in cd2401_rx_interrupt()
654 tty = info->tty; in cd2401_rx_interrupt()
664 len = tty_buffer_request_room(tty, char_count); in cd2401_rx_interrupt()
667 tty_insert_flip_char(tty, data, TTY_NORMAL); in cd2401_rx_interrupt()
672 tty_schedule_flip(tty); in cd2401_rx_interrupt()
693 if (info->tty) { in startup()
694 set_bit(TTY_IO_ERROR, &info->tty->flags); in startup()
731 if (info->tty) { in startup()
732 clear_bit(TTY_IO_ERROR, &info->tty->flags); in startup()
791 if (!info->tty || (info->tty->termios->c_cflag & HUPCL)) { in shutdown()
805 if (info->tty) { in shutdown()
806 set_bit(TTY_IO_ERROR, &info->tty->flags); in shutdown()
828 if (!info->tty || !info->tty->termios) { in config_setup()
834 cflag = info->tty->termios->c_cflag; in config_setup()
857 info->tty->termios->c_cflag &= ~CBAUDEX; in config_setup()
902 if (C_CLOCAL(info->tty)) { in config_setup()
1001 if (base_addr[CySCHR1] != START_CHAR(info->tty)) in config_setup()
1002 base_addr[CySCHR1] = START_CHAR(info->tty); in config_setup()
1003 if (base_addr[CySCHR2] != STOP_CHAR(info->tty)) in config_setup()
1004 base_addr[CySCHR2] = STOP_CHAR(info->tty); in config_setup()
1005 if (base_addr[CySCRL] != START_CHAR(info->tty)) in config_setup()
1006 base_addr[CySCRL] = START_CHAR(info->tty); in config_setup()
1007 if (base_addr[CySCRH] != START_CHAR(info->tty)) in config_setup()
1008 base_addr[CySCRH] = START_CHAR(info->tty); in config_setup()
1055 if (info->tty) { in config_setup()
1056 clear_bit(TTY_IO_ERROR, &info->tty->flags); in config_setup()
1063 static int cy_put_char(struct tty_struct *tty, unsigned char ch) in cy_put_char() argument
1065 struct cyclades_port *info = tty->driver_data; in cy_put_char()
1069 printk("cy_put_char %s(0x%02x)\n", tty->name, ch); in cy_put_char()
1072 if (serial_paranoia_check(info, tty->name, "cy_put_char")) in cy_put_char()
1091 static void cy_flush_chars(struct tty_struct *tty) in cy_flush_chars() argument
1093 struct cyclades_port *info = tty->driver_data; in cy_flush_chars()
1099 printk("cy_flush_chars %s\n", tty->name); /* */ in cy_flush_chars()
1102 if (serial_paranoia_check(info, tty->name, "cy_flush_chars")) in cy_flush_chars()
1105 if (info->xmit_cnt <= 0 || tty->stopped in cy_flush_chars()
1106 || tty->hw_stopped || !info->xmit_buf) in cy_flush_chars()
1123 static int cy_write(struct tty_struct *tty, const unsigned char *buf, int count) in cy_write() argument
1125 struct cyclades_port *info = tty->driver_data; in cy_write()
1130 printk("cy_write %s\n", tty->name); /* */ in cy_write()
1133 if (serial_paranoia_check(info, tty->name, "cy_write")) { in cy_write()
1161 if (info->xmit_cnt && !tty->stopped && !tty->hw_stopped) { in cy_write()
1167 static int cy_write_room(struct tty_struct *tty) in cy_write_room() argument
1169 struct cyclades_port *info = tty->driver_data; in cy_write_room()
1173 printk("cy_write_room %s\n", tty->name); /* */ in cy_write_room()
1176 if (serial_paranoia_check(info, tty->name, "cy_write_room")) in cy_write_room()
1184 static int cy_chars_in_buffer(struct tty_struct *tty) in cy_chars_in_buffer() argument
1186 struct cyclades_port *info = tty->driver_data; in cy_chars_in_buffer()
1189 printk("cy_chars_in_buffer %s %d\n", tty->name, info->xmit_cnt); /* */ in cy_chars_in_buffer()
1192 if (serial_paranoia_check(info, tty->name, "cy_chars_in_buffer")) in cy_chars_in_buffer()
1198 static void cy_flush_buffer(struct tty_struct *tty) in cy_flush_buffer() argument
1200 struct cyclades_port *info = tty->driver_data; in cy_flush_buffer()
1204 printk("cy_flush_buffer %s\n", tty->name); /* */ in cy_flush_buffer()
1207 if (serial_paranoia_check(info, tty->name, "cy_flush_buffer")) in cy_flush_buffer()
1212 tty_wakeup(tty); in cy_flush_buffer()
1219 static void cy_throttle(struct tty_struct *tty) in cy_throttle() argument
1221 struct cyclades_port *info = tty->driver_data; in cy_throttle()
1229 printk("throttle %s: %d....\n", tty_name(tty, buf), in cy_throttle()
1230 tty->ldisc.chars_in_buffer(tty)); in cy_throttle()
1231 printk("cy_throttle %s\n", tty->name); in cy_throttle()
1234 if (serial_paranoia_check(info, tty->name, "cy_nthrottle")) { in cy_throttle()
1238 if (I_IXOFF(tty)) { in cy_throttle()
1239 info->x_char = STOP_CHAR(tty); in cy_throttle()
1251 static void cy_unthrottle(struct tty_struct *tty) in cy_unthrottle() argument
1253 struct cyclades_port *info = tty->driver_data; in cy_unthrottle()
1261 printk("throttle %s: %d....\n", tty_name(tty, buf), in cy_unthrottle()
1262 tty->ldisc.chars_in_buffer(tty)); in cy_unthrottle()
1263 printk("cy_unthrottle %s\n", tty->name); in cy_unthrottle()
1266 if (serial_paranoia_check(info, tty->name, "cy_nthrottle")) { in cy_unthrottle()
1270 if (I_IXOFF(tty)) { in cy_unthrottle()
1271 info->x_char = START_CHAR(tty); in cy_unthrottle()
1346 static int cy_tiocmget(struct tty_struct *tty, struct file *file) in cy_tiocmget() argument
1348 struct cyclades_port *info = tty->driver_data; in cy_tiocmget()
1369 cy_tiocmset(struct tty_struct *tty, struct file *file, in cy_tiocmset() argument
1372 struct cyclades_port *info = tty->driver_data; in cy_tiocmset()
1531 cy_ioctl(struct tty_struct *tty, struct file *file, in cy_ioctl() argument
1535 struct cyclades_port *info = tty->driver_data; in cy_ioctl()
1540 printk("cy_ioctl %s, cmd = %x arg = %lx\n", tty->name, cmd, arg); /* */ in cy_ioctl()
1574 ret_val = tty_check_change(tty); in cy_ioctl()
1577 tty_wait_until_sent(tty, 0); in cy_ioctl()
1582 ret_val = tty_check_change(tty); in cy_ioctl()
1585 tty_wait_until_sent(tty, 0); in cy_ioctl()
1608 static void cy_set_termios(struct tty_struct *tty, struct ktermios *old_termios) in cy_set_termios() argument
1610 struct cyclades_port *info = tty->driver_data; in cy_set_termios()
1613 printk("cy_set_termios %s\n", tty->name); in cy_set_termios()
1616 if (tty->termios->c_cflag == old_termios->c_cflag) in cy_set_termios()
1621 !(tty->termios->c_cflag & CRTSCTS)) { in cy_set_termios()
1622 tty->stopped = 0; in cy_set_termios()
1623 cy_start(tty); in cy_set_termios()
1627 (tty->termios->c_cflag & CLOCAL)) in cy_set_termios()
1632 static void cy_close(struct tty_struct *tty, struct file *filp) in cy_close() argument
1634 struct cyclades_port *info = tty->driver_data; in cy_close()
1638 printk("cy_close %s\n", tty->name); in cy_close()
1641 if (!info || serial_paranoia_check(info, tty->name, "cy_close")) { in cy_close()
1645 printk("cy_close %s, count = %d\n", tty->name, info->count); in cy_close()
1648 if ((tty->count == 1) && (info->count != 1)) { in cy_close()
1676 tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */ in cy_close()
1678 cy_flush_buffer(tty); in cy_close()
1679 tty_ldisc_flush(tty); in cy_close()
1680 info->tty = NULL; in cy_close()
1699 void cy_hangup(struct tty_struct *tty) in cy_hangup() argument
1701 struct cyclades_port *info = tty->driver_data; in cy_hangup()
1704 printk("cy_hangup %s\n", tty->name); /* */ in cy_hangup()
1707 if (serial_paranoia_check(info, tty->name, "cy_hangup")) in cy_hangup()
1717 info->tty = 0; in cy_hangup()
1730 block_til_ready(struct tty_struct *tty, struct file *filp, in block_til_ready() argument
1772 tty->name, info->count); in block_til_ready()
1809 && (C_CLOCAL(tty) in block_til_ready()
1821 tty->name, info->count); in block_til_ready()
1838 tty->name, info->count); in block_til_ready()
1851 int cy_open(struct tty_struct *tty, struct file *filp) in cy_open() argument
1857 line = tty->index; in cy_open()
1866 printk("cy_open %s\n", tty->name); /* */ in cy_open()
1868 if (serial_paranoia_check(info, tty->name, "cy_open")) { in cy_open()
1872 printk("cy_open %s, count = %d\n", tty->name, info->count); in cy_open()
1879 tty->driver_data = info; in cy_open()
1880 info->tty = tty; in cy_open()
1890 retval = block_til_ready(tty, filp, info); in cy_open()
2155 info->tty = NULL; in serial167_init()
2275 (long)info->tty, info->read_status_mask, info->timeout, in show_status()