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
67 #include <linux/tty.h>
95 * align with how the tty layer always assigns the lowest index available. This
124 * hypervisor before allowing the tty to complete a close operation.
130 * addition of tty derived devices and we shouldn't allocate thousands of
207 * index element with the numerically equal tty->index. This means that a
254 * specific tty index.
276 * Any variable below is valid before a tty is connected and
277 * stays valid after the tty is disconnected. These shouldn't be
293 static void hvcs_unthrottle(struct tty_struct *tty);
294 static void hvcs_throttle(struct tty_struct *tty);
297 static int hvcs_write(struct tty_struct *tty,
299 static int hvcs_write_room(struct tty_struct *tty);
300 static int hvcs_chars_in_buffer(struct tty_struct *tty);
314 static int hvcs_open(struct tty_struct *tty, struct file *filp);
315 static void hvcs_close(struct tty_struct *tty, struct file *filp);
316 static void hvcs_hangup(struct tty_struct * tty);
502 static void hvcs_unthrottle(struct tty_struct *tty)
504 struct hvcs_struct *hvcsd = tty->driver_data;
513 static void hvcs_throttle(struct tty_struct *tty)
515 struct hvcs_struct *hvcsd = tty->driver_data;
545 struct tty_struct *tty = hvcsd->port.tty;
561 * hypervisor even if the tty has been closed because
563 * a non-existent tty.
565 if (tty) {
566 tty_wakeup(tty);
575 struct tty_struct *tty;
583 tty = hvcsd->port.tty;
587 if (!tty || tty_throttled(tty)) {
608 /* This is synch because tty->low_latency == 1 */
798 * If a user app opens a tty that corresponds to this vty-server before
826 struct tty_struct *tty;
835 tty = hvcsd->port.tty;
847 * hvcs_hangup. The tty should always be valid at this time unless a
848 * simultaneous tty close already cleaned up the hvcs_struct.
850 if (tty)
851 tty_hangup(tty);
1084 static int hvcs_install(struct tty_driver *driver, struct tty_struct *tty)
1096 hvcsd = hvcs_get_by_index(tty->index);
1099 " with tty->index %d.\n", tty->index);
1115 hvcsd->port.tty = tty;
1116 tty->driver_data = hvcsd;
1141 retval = tty_port_install(&hvcsd->port, driver, tty);
1161 static int hvcs_open(struct tty_struct *tty, struct file *filp)
1163 struct hvcs_struct *hvcsd = tty->driver_data;
1179 static void hvcs_close(struct tty_struct *tty, struct file *filp)
1187 * we have hung up? If so tty->driver_data wouldn't be valid.
1194 * failed hvcs_open by the tty layer's release_dev() api and we can just
1197 if (!tty->driver_data)
1200 hvcsd = tty->driver_data;
1212 hvcsd->port.tty = NULL;
1217 tty_wait_until_sent(tty, HVCS_CLOSE_WAIT);
1229 static void hvcs_cleanup(struct tty_struct * tty)
1231 struct hvcs_struct *hvcsd = tty->driver_data;
1238 tty->driver_data = NULL;
1243 static void hvcs_hangup(struct tty_struct * tty)
1245 struct hvcs_struct *hvcsd = tty->driver_data;
1263 /* I don't think the tty needs the hvcs_struct pointer after a hangup */
1264 tty->driver_data = NULL;
1265 hvcsd->port.tty = NULL;
1303 static int hvcs_write(struct tty_struct *tty,
1306 struct hvcs_struct *hvcsd = tty->driver_data;
1408 static int hvcs_write_room(struct tty_struct *tty)
1410 struct hvcs_struct *hvcsd = tty->driver_data;
1418 static int hvcs_chars_in_buffer(struct tty_struct *tty)
1420 struct hvcs_struct *hvcsd = tty->driver_data;
1514 printk(KERN_ERR "HVCS: registration as a tty driver failed.\n");