/drivers/char/ |
D | n_tty.c | 94 static inline int tty_put_user(struct tty_struct *tty, unsigned char x, in tty_put_user() argument 97 tty_audit_add_data(tty, &x, 1); in tty_put_user() 111 static void n_tty_set_room(struct tty_struct *tty) in n_tty_set_room() argument 114 int left = N_TTY_BUF_SIZE - tty->read_cnt - 1; in n_tty_set_room() 123 left = tty->icanon && !tty->canon_data; in n_tty_set_room() 124 tty->receive_room = left; in n_tty_set_room() 127 static void put_tty_queue_nolock(unsigned char c, struct tty_struct *tty) in put_tty_queue_nolock() argument 129 if (tty->read_cnt < N_TTY_BUF_SIZE) { in put_tty_queue_nolock() 130 tty->read_buf[tty->read_head] = c; in put_tty_queue_nolock() 131 tty->read_head = (tty->read_head + 1) & (N_TTY_BUF_SIZE-1); in put_tty_queue_nolock() [all …]
|
D | tty_io.c | 154 static void release_tty(struct tty_struct *tty, int idx); 155 static void __proc_set_tty(struct task_struct *tsk, struct tty_struct *tty); 156 static void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty); 181 void free_tty_struct(struct tty_struct *tty) in free_tty_struct() argument 183 kfree(tty->write_buf); in free_tty_struct() 184 tty_buffer_free_all(tty); in free_tty_struct() 185 kfree(tty); in free_tty_struct() 188 #define TTY_NUMBER(tty) ((tty)->index + (tty)->driver->name_base) argument 201 char *tty_name(struct tty_struct *tty, char *buf) in tty_name() argument 203 if (!tty) /* Hmm. NULL pointer. That's fun. */ in tty_name() [all …]
|
D | tty_ioctl.c | 52 int tty_chars_in_buffer(struct tty_struct *tty) in tty_chars_in_buffer() argument 54 if (tty->ops->chars_in_buffer) in tty_chars_in_buffer() 55 return tty->ops->chars_in_buffer(tty); in tty_chars_in_buffer() 72 int tty_write_room(struct tty_struct *tty) in tty_write_room() argument 74 if (tty->ops->write_room) in tty_write_room() 75 return tty->ops->write_room(tty); in tty_write_room() 88 void tty_driver_flush_buffer(struct tty_struct *tty) in tty_driver_flush_buffer() argument 90 if (tty->ops->flush_buffer) in tty_driver_flush_buffer() 91 tty->ops->flush_buffer(tty); in tty_driver_flush_buffer() 102 void tty_throttle(struct tty_struct *tty) in tty_throttle() argument [all …]
|
D | tty_buffer.c | 30 void tty_buffer_free_all(struct tty_struct *tty) in tty_buffer_free_all() argument 33 while ((thead = tty->buf.head) != NULL) { in tty_buffer_free_all() 34 tty->buf.head = thead->next; in tty_buffer_free_all() 37 while ((thead = tty->buf.free) != NULL) { in tty_buffer_free_all() 38 tty->buf.free = thead->next; in tty_buffer_free_all() 41 tty->buf.tail = NULL; in tty_buffer_free_all() 42 tty->buf.memory_used = 0; in tty_buffer_free_all() 57 static struct tty_buffer *tty_buffer_alloc(struct tty_struct *tty, size_t size) in tty_buffer_alloc() argument 61 if (tty->buf.memory_used + size > 65536) in tty_buffer_alloc() 73 tty->buf.memory_used += size; in tty_buffer_alloc() [all …]
|
D | pty.c | 39 static void pty_close(struct tty_struct *tty, struct file *filp) in pty_close() argument 41 BUG_ON(!tty); in pty_close() 42 if (tty->driver->subtype == PTY_TYPE_MASTER) in pty_close() 43 WARN_ON(tty->count > 1); in pty_close() 45 if (tty->count > 2) in pty_close() 48 wake_up_interruptible(&tty->read_wait); in pty_close() 49 wake_up_interruptible(&tty->write_wait); in pty_close() 50 tty->packet = 0; in pty_close() 51 if (!tty->link) in pty_close() 53 tty->link->packet = 0; in pty_close() [all …]
|
D | tty_ldisc.c | 265 static void tty_ldisc_assign(struct tty_struct *tty, struct tty_ldisc *ld) in tty_ldisc_assign() argument 268 tty->ldisc = *ld; in tty_ldisc_assign() 283 static int tty_ldisc_try(struct tty_struct *tty) in tty_ldisc_try() argument 290 ld = &tty->ldisc; in tty_ldisc_try() 291 if (test_bit(TTY_LDISC, &tty->flags)) { in tty_ldisc_try() 315 struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *tty) in tty_ldisc_ref_wait() argument 318 wait_event(tty_ldisc_wait, tty_ldisc_try(tty)); in tty_ldisc_ref_wait() 319 WARN_ON(tty->ldisc.refcount == 0); in tty_ldisc_ref_wait() 320 return &tty->ldisc; in tty_ldisc_ref_wait() 336 struct tty_ldisc *tty_ldisc_ref(struct tty_struct *tty) in tty_ldisc_ref() argument [all …]
|
D | n_hdlc.c | 151 struct tty_struct *tty; member 183 static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file, 185 static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file, 187 static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file, 189 static unsigned int n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp, 191 static int n_hdlc_tty_open(struct tty_struct *tty); 192 static void n_hdlc_tty_close(struct tty_struct *tty); 193 static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *cp, 195 static void n_hdlc_tty_wakeup(struct tty_struct *tty); 199 #define tty2n_hdlc(tty) ((struct n_hdlc *) ((tty)->disc_data)) argument [all …]
|
D | amiserial.c | 50 tty->name, (info->flags), serial_driver->refcount,info->count,tty->count,s) 108 static void rs_wait_until_sent(struct tty_struct *tty, int timeout); 171 static void rs_stop(struct tty_struct *tty) in rs_stop() argument 173 struct async_struct *info = tty->driver_data; in rs_stop() 176 if (serial_paranoia_check(info, tty->name, "rs_stop")) in rs_stop() 191 static void rs_start(struct tty_struct *tty) in rs_start() argument 193 struct async_struct *info = tty->driver_data; in rs_start() 196 if (serial_paranoia_check(info, tty->name, "rs_start")) in rs_start() 249 struct tty_struct *tty = info->tty; in receive_chars() local 312 do_SAK(tty); in receive_chars() [all …]
|
D | generic_serial.c | 51 int gs_put_char(struct tty_struct * tty, unsigned char ch) in gs_put_char() argument 57 port = tty->driver_data; in gs_put_char() 89 int gs_write(struct tty_struct * tty, in gs_write() argument 98 port = tty->driver_data; in gs_write() 143 !tty->stopped && in gs_write() 144 !tty->hw_stopped && in gs_write() 155 int gs_write_room(struct tty_struct * tty) in gs_write_room() argument 157 struct gs_port *port = tty->driver_data; in gs_write_room() 169 int gs_chars_in_buffer(struct tty_struct *tty) in gs_chars_in_buffer() argument 171 struct gs_port *port = tty->driver_data; in gs_chars_in_buffer() [all …]
|
D | riscom8.c | 336 struct tty_struct *tty; in rc_receive_exc() local 344 tty = port->port.tty; in rc_receive_exc() 368 do_SAK(tty); in rc_receive_exc() 381 tty_insert_flip_char(tty, ch, flag); in rc_receive_exc() 382 tty_flip_buffer_push(tty); in rc_receive_exc() 388 struct tty_struct *tty; in rc_receive() local 395 tty = port->port.tty; in rc_receive() 404 if (tty_buffer_request_room(tty, 1) == 0) { in rc_receive() 410 tty_insert_flip_char(tty, rc_in(bp, CD180_RDR), TTY_NORMAL); in rc_receive() 412 tty_flip_buffer_push(tty); in rc_receive() [all …]
|
D | serial167.c | 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() [all …]
|
D | isicom.c | 177 static void isicom_start(struct tty_struct *tty); 401 struct tty_struct *tty; in isicom_tx() local 428 tty = tty_port_tty_get(&port->port); in isicom_tx() 429 if (tty == NULL) in isicom_tx() 439 if (txcount <= 0 || tty->stopped || tty->hw_stopped) in isicom_tx() 492 tty_wakeup(tty); in isicom_tx() 496 tty_kref_put(tty); in isicom_tx() 512 struct tty_struct *tty; in isicom_interrupt() local 555 tty = tty_port_tty_get(&port->port); in isicom_interrupt() 556 if (tty == NULL) { in isicom_interrupt() [all …]
|
D | specialix.c | 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() [all …]
|
D | goldfish_tty.c | 48 struct tty_struct *tty; member 83 count = tty_prepare_flip_string(qtty->tty, &buf, count); in goldfish_tty_interrupt() 89 tty_schedule_flip(qtty->tty); in goldfish_tty_interrupt() 93 static int goldfish_tty_open(struct tty_struct * tty, struct file * filp) in goldfish_tty_open() argument 96 struct goldfish_tty *qtty = &goldfish_ttys[tty->index]; in goldfish_tty_open() 99 if(qtty->tty == NULL || qtty->tty == tty) { in goldfish_tty_open() 101 qtty->tty = tty; in goldfish_tty_open() 112 static void goldfish_tty_close(struct tty_struct * tty, struct file * filp) in goldfish_tty_close() argument 114 struct goldfish_tty *qtty = &goldfish_ttys[tty->index]; in goldfish_tty_close() 117 if(qtty->tty == tty) { in goldfish_tty_close() [all …]
|
D | sx.h | 127 #define O_OTHER(tty) \ argument 128 ((O_OLCUC(tty)) ||\ 129 (O_ONLCR(tty)) ||\ 130 (O_OCRNL(tty)) ||\ 131 (O_ONOCR(tty)) ||\ 132 (O_ONLRET(tty)) ||\ 133 (O_OFILL(tty)) ||\ 134 (O_OFDEL(tty)) ||\ 135 (O_NLDLY(tty)) ||\ 136 (O_CRDLY(tty)) ||\ [all …]
|
D | tty_port.c | 69 struct tty_struct *tty; in tty_port_tty_get() local 72 tty = tty_kref_get(port->tty); in tty_port_tty_get() 74 return tty; in tty_port_tty_get() 87 void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty) in tty_port_tty_set() argument 92 if (port->tty) in tty_port_tty_set() 93 tty_kref_put(port->tty); in tty_port_tty_set() 94 port->tty = tty_kref_get(tty); in tty_port_tty_set() 114 if (port->tty) in tty_port_hangup() 115 tty_kref_put(port->tty); in tty_port_hangup() 116 port->tty = NULL; in tty_port_hangup() [all …]
|
D | mxser.c | 561 static int mxser_set_baud(struct tty_struct *tty, long newspd) in mxser_set_baud() argument 563 struct mxser_port *info = tty->driver_data; in mxser_set_baud() 575 tty_encode_baud_rate(tty, 134, 134); in mxser_set_baud() 581 tty_encode_baud_rate(tty, baud, baud); in mxser_set_baud() 607 if (C_BAUD(tty) == BOTHER) { in mxser_set_baud() 628 static int mxser_change_speed(struct tty_struct *tty, in mxser_change_speed() argument 631 struct mxser_port *info = tty->driver_data; in mxser_change_speed() 636 cflag = tty->termios->c_cflag; in mxser_change_speed() 640 if (mxser_set_baud_method[tty->index] == 0) in mxser_change_speed() 641 mxser_set_baud(tty, tty_get_baud_rate(tty)); in mxser_change_speed() [all …]
|
D | hvc_console.c | 293 static void hvc_unthrottle(struct tty_struct *tty) in hvc_unthrottle() argument 302 static int hvc_open(struct tty_struct *tty, struct file * filp) in hvc_open() argument 309 if (!(hp = hvc_get_by_index(tty->index))) in hvc_open() 320 tty->driver_data = hp; in hvc_open() 322 hp->tty = tty; in hvc_open() 337 hp->tty = NULL; in hvc_open() 339 tty->driver_data = NULL; in hvc_open() 349 static void hvc_close(struct tty_struct *tty, struct file * filp) in hvc_close() argument 362 if (!tty->driver_data) in hvc_close() 365 hp = tty->driver_data; in hvc_close() [all …]
|
/drivers/char/pcmcia/ipwireless/ |
D | tty.c | 76 static void report_registering(struct ipw_tty *tty) in report_registering() argument 78 char *iftype = tty_type_name(tty->tty_type); in report_registering() 81 ": registering %s device ttyIPWp%d\n", iftype, tty->index); in report_registering() 84 static void report_deregistering(struct ipw_tty *tty) in report_deregistering() argument 86 char *iftype = tty_type_name(tty->tty_type); in report_deregistering() 90 tty->index); in report_deregistering() 119 struct ipw_tty *tty = get_tty(minor); in ipw_open() local 121 if (!tty) in ipw_open() 124 mutex_lock(&tty->ipw_tty_mutex); in ipw_open() 126 if (tty->closing) { in ipw_open() [all …]
|
/drivers/net/irda/ |
D | irtty-sir.c | 67 return tty_chars_in_buffer(priv->tty); in irtty_chars_in_buffer() 90 struct tty_struct *tty; in irtty_wait_until_sent() local 95 tty = priv->tty; in irtty_wait_until_sent() 96 if (tty->ops->wait_until_sent) { in irtty_wait_until_sent() 97 tty->ops->wait_until_sent(tty, msecs_to_jiffies(100)); in irtty_wait_until_sent() 117 struct tty_struct *tty; in irtty_change_speed() local 124 tty = priv->tty; in irtty_change_speed() 126 mutex_lock(&tty->termios_mutex); in irtty_change_speed() 127 old_termios = *(tty->termios); in irtty_change_speed() 128 cflag = tty->termios->c_cflag; in irtty_change_speed() [all …]
|
/drivers/isdn/gigaset/ |
D | interface.c | 121 static int if_open(struct tty_struct *tty, struct file *filp); 122 static void if_close(struct tty_struct *tty, struct file *filp); 123 static int if_ioctl(struct tty_struct *tty, struct file *file, 125 static int if_write_room(struct tty_struct *tty); 126 static int if_chars_in_buffer(struct tty_struct *tty); 127 static void if_throttle(struct tty_struct *tty); 128 static void if_unthrottle(struct tty_struct *tty); 129 static void if_set_termios(struct tty_struct *tty, struct ktermios *old); 130 static int if_tiocmget(struct tty_struct *tty, struct file *file); 131 static int if_tiocmset(struct tty_struct *tty, struct file *file, [all …]
|
/drivers/serial/ |
D | 68328serial.c | 188 static void rs_stop(struct tty_struct *tty) in rs_stop() argument 190 struct m68k_serial *info = (struct m68k_serial *)tty->driver_data; in rs_stop() 194 if (serial_paranoia_check(info, tty->name, "rs_stop")) in rs_stop() 219 static void rs_start(struct tty_struct *tty) in rs_start() argument 221 struct m68k_serial *info = (struct m68k_serial *)tty->driver_data; in rs_start() 225 if (serial_paranoia_check(info, tty->name, "rs_start")) in rs_start() 251 if((info->port.tty->termios->c_cflag & CRTSCTS) && in status_handle() 276 struct tty_struct *tty = info->port.tty; in receive_chars() local 310 if(!tty) in receive_chars() 325 tty_insert_flip_char(tty, ch, flag); in receive_chars() [all …]
|
D | 68360serial.c | 240 struct tty_struct *tty; member 273 static void rs_360_wait_until_sent(struct tty_struct *tty, int timeout); 325 static void rs_360_stop(struct tty_struct *tty) in rs_360_stop() argument 327 ser_info_t *info = (ser_info_t *)tty->driver_data; in rs_360_stop() 333 if (serial_paranoia_check(info, tty->name, "rs_stop")) in rs_360_stop() 350 static void rs_360_start(struct tty_struct *tty) in rs_360_start() argument 352 ser_info_t *info = (ser_info_t *)tty->driver_data; in rs_360_start() 358 if (serial_paranoia_check(info, tty->name, "rs_stop")) in rs_360_start() 396 struct tty_struct *tty = info->port.tty; in receive_chars() local 480 *tty->flip.flag_buf_ptr = TTY_BREAK; in receive_chars() [all …]
|
/drivers/bluetooth/ |
D | hci_ldisc.c | 123 struct tty_struct *tty = hu->tty; in hci_uart_tx_wakeup() local 140 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in hci_uart_tx_wakeup() 141 len = tty->ops->write(tty, skb->data, skb->len); in hci_uart_tx_wakeup() 178 struct tty_struct *tty = hu->tty; in hci_uart_flush() local 180 BT_DBG("hdev %p tty %p", hdev, tty); in hci_uart_flush() 187 tty_ldisc_flush(tty); in hci_uart_flush() 188 tty_driver_flush_buffer(tty); in hci_uart_flush() 213 struct tty_struct *tty; in hci_uart_send_frame() local 225 tty = hu->tty; in hci_uart_send_frame() 255 static int hci_uart_tty_open(struct tty_struct *tty) in hci_uart_tty_open() argument [all …]
|
/drivers/char/rio/ |
D | rio_linux.h | 53 #define O_OTHER(tty) \ argument 54 ((O_OLCUC(tty)) ||\ 55 (O_ONLCR(tty)) ||\ 56 (O_OCRNL(tty)) ||\ 57 (O_ONOCR(tty)) ||\ 58 (O_ONLRET(tty)) ||\ 59 (O_OFILL(tty)) ||\ 60 (O_OFDEL(tty)) ||\ 61 (O_NLDLY(tty)) ||\ 62 (O_CRDLY(tty)) ||\ [all …]
|