Lines Matching defs:tty

10  * "hvcs".  The IBM hvcs provides a tty driver interface to allow Linux
31 * partition; attempts to open the tty device to the partition's console using
68 #include <linux/tty.h>
97 * align with how the tty layer always assigns the lowest index available. This
126 * hypervisor before allowing the tty to complete a close operation.
132 * addition of tty derived devices and we shouldn't allocate thousands of
209 * index element with the numerically equal tty->index. This means that a
256 * specific tty index.
278 * Any variable below is valid before a tty is connected and
279 * stays valid after the tty is disconnected. These shouldn't be
485 static void hvcs_unthrottle(struct tty_struct *tty)
487 struct hvcs_struct *hvcsd = tty->driver_data;
496 static void hvcs_throttle(struct tty_struct *tty)
498 struct hvcs_struct *hvcsd = tty->driver_data;
528 struct tty_struct *tty = hvcsd->port.tty;
544 * hypervisor even if the tty has been closed because
546 * a non-existent tty.
548 if (tty) {
549 tty_wakeup(tty);
558 struct tty_struct *tty;
566 tty = hvcsd->port.tty;
570 if (!tty || tty_throttled(tty)) {
782 * If a user app opens a tty that corresponds to this vty-server before
804 struct tty_struct *tty;
811 tty = tty_port_tty_get(&hvcsd->port);
816 * The tty should always be valid at this time unless a
817 * simultaneous tty close already cleaned up the hvcs_struct.
819 if (tty) {
820 tty_vhangup(tty);
821 tty_kref_put(tty);
1060 static int hvcs_install(struct tty_driver *driver, struct tty_struct *tty)
1072 hvcsd = hvcs_get_by_index(tty->index);
1075 " with tty->index %d.\n", tty->index);
1091 hvcsd->port.tty = tty;
1092 tty->driver_data = hvcsd;
1117 retval = tty_port_install(&hvcsd->port, driver, tty);
1137 static int hvcs_open(struct tty_struct *tty, struct file *filp)
1139 struct hvcs_struct *hvcsd = tty->driver_data;
1155 static void hvcs_close(struct tty_struct *tty, struct file *filp)
1163 * we have hung up? If so tty->driver_data wouldn't be valid.
1170 * failed hvcs_open by the tty layer's release_dev() api and we can just
1173 if (!tty->driver_data)
1176 hvcsd = tty->driver_data;
1191 hvcsd->port.tty = NULL;
1196 tty_wait_until_sent(tty, HVCS_CLOSE_WAIT);
1208 static void hvcs_cleanup(struct tty_struct * tty)
1210 struct hvcs_struct *hvcsd = tty->driver_data;
1217 tty->driver_data = NULL;
1222 static void hvcs_hangup(struct tty_struct * tty)
1224 struct hvcs_struct *hvcsd = tty->driver_data;
1238 hvcsd->port.tty = NULL;
1260 static ssize_t hvcs_write(struct tty_struct *tty, const u8 *buf, size_t count)
1262 struct hvcs_struct *hvcsd = tty->driver_data;
1365 static unsigned int hvcs_write_room(struct tty_struct *tty)
1367 struct hvcs_struct *hvcsd = tty->driver_data;
1375 static unsigned int hvcs_chars_in_buffer(struct tty_struct *tty)
1377 struct hvcs_struct *hvcsd = tty->driver_data;
1471 printk(KERN_ERR "HVCS: registration as a tty driver failed.\n");