Lines Matching defs:tty
31 #include <linux/tty.h>
226 struct tty_struct *tty, struct hvsi_struct **to_handshake)
236 if (tty && !C_CLOCAL(tty))
237 tty_hangup(tty);
342 * We could get 252 bytes of data at once here. But the tty layer only
345 * buffer, which will give the tty buffer a chance to throttle us. Should the
384 * Used both to get packets for tty connections and to advance the state
385 * machine during console handshaking (in which case tty = NULL and we ignore
388 static int hvsi_load_chunk(struct hvsi_struct *hp, struct tty_struct *tty,
431 hvsi_recv_control(hp, packet, tty, handshake);
479 struct tty_struct *tty;
485 tty = tty_port_tty_get(&hp->port);
489 again = hvsi_load_chunk(hp, tty, &handshake);
499 if (tty && hp->n_throttle && !tty_throttled(tty)) {
507 tty_kref_put(tty);
699 static int hvsi_open(struct tty_struct *tty, struct file *filp)
707 hp = &hvsi_ports[tty->index];
709 tty->driver_data = hp;
715 tty_port_tty_set(&hp->port, tty);
727 printk(KERN_ERR "%s: HVSI handshaking failed\n", tty->name);
733 printk(KERN_ERR "%s: couldn't get initial modem flags\n", tty->name);
739 printk(KERN_ERR "%s: couldn't set DTR\n", tty->name);
762 static void hvsi_close(struct tty_struct *tty, struct file *filp)
764 struct hvsi_struct *hp = tty->driver_data;
783 * any data delivered to the tty layer after this will be
786 tty->closing = 1;
814 static void hvsi_hangup(struct tty_struct *tty)
816 struct hvsi_struct *hp = tty->driver_data;
893 static int hvsi_write_room(struct tty_struct *tty)
895 struct hvsi_struct *hp = tty->driver_data;
900 static int hvsi_chars_in_buffer(struct tty_struct *tty)
902 struct hvsi_struct *hp = tty->driver_data;
907 static int hvsi_write(struct tty_struct *tty,
910 struct hvsi_struct *hp = tty->driver_data;
931 while ((count > 0) && (hvsi_write_room(tty) > 0)) {
932 int chunksize = min(count, hvsi_write_room(tty));
966 static void hvsi_throttle(struct tty_struct *tty)
968 struct hvsi_struct *hp = tty->driver_data;
975 static void hvsi_unthrottle(struct tty_struct *tty)
977 struct hvsi_struct *hp = tty->driver_data;
993 static int hvsi_tiocmget(struct tty_struct *tty)
995 struct hvsi_struct *hp = tty->driver_data;
1001 static int hvsi_tiocmset(struct tty_struct *tty,
1004 struct hvsi_struct *hp = tty->driver_data;
1094 /***** console (not tty) code: *****/