Home
last modified time | relevance | path

Searched refs:tty (Results 1 – 25 of 188) sorted by relevance

12345678

/drivers/tty/
Dn_tty.c154 static int tty_copy_to_user(struct tty_struct *tty, void __user *to, in tty_copy_to_user() argument
157 struct n_tty_data *ldata = tty->disc_data; in tty_copy_to_user()
163 tty_audit_add_data(tty, from, size); in tty_copy_to_user()
172 tty_audit_add_data(tty, from, n); in tty_copy_to_user()
188 static void n_tty_kick_worker(struct tty_struct *tty) in n_tty_kick_worker() argument
190 struct n_tty_data *ldata = tty->disc_data; in n_tty_kick_worker()
196 WARN_RATELIMIT(tty->port->itty == NULL, in n_tty_kick_worker()
202 WARN_RATELIMIT(test_bit(TTY_LDISC_HALTED, &tty->flags), in n_tty_kick_worker()
204 tty_buffer_restart_work(tty->port); in n_tty_kick_worker()
208 static ssize_t chars_in_buffer(struct tty_struct *tty) in chars_in_buffer() argument
[all …]
Dtty_io.c110 # define tty_debug_hangup(tty, f, args...) tty_debug(tty, f, ##args) argument
112 # define tty_debug_hangup(tty, f, args...) do { } while (0) argument
156 static void release_tty(struct tty_struct *tty, int idx);
167 static void free_tty_struct(struct tty_struct *tty) in free_tty_struct() argument
169 tty_ldisc_deinit(tty); in free_tty_struct()
170 put_device(tty->dev); in free_tty_struct()
171 kfree(tty->write_buf); in free_tty_struct()
172 tty->magic = 0xDEADDEAD; in free_tty_struct()
173 kfree(tty); in free_tty_struct()
178 return ((struct tty_file_private *)file->private_data)->tty; in file_tty()
[all …]
Dtty_ldisc.c25 #define tty_ldisc_debug(tty, f, args...) tty_debug(tty, f, ##args) argument
27 #define tty_ldisc_debug(tty, f, args...) argument
158 static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc) in tty_ldisc_get() argument
185 ld->tty = tty; in tty_ldisc_get()
272 struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *tty) in tty_ldisc_ref_wait() argument
276 ldsem_down_read(&tty->ldisc_sem, MAX_SCHEDULE_TIMEOUT); in tty_ldisc_ref_wait()
277 ld = tty->ldisc; in tty_ldisc_ref_wait()
279 ldsem_up_read(&tty->ldisc_sem); in tty_ldisc_ref_wait()
293 struct tty_ldisc *tty_ldisc_ref(struct tty_struct *tty) in tty_ldisc_ref() argument
297 if (ldsem_down_read_trylock(&tty->ldisc_sem)) { in tty_ldisc_ref()
[all …]
Dpty.c30 # define tty_debug_hangup(tty, f, args...) tty_debug(tty, f, ##args) argument
32 # define tty_debug_hangup(tty, f, args...) do {} while (0) argument
41 static void pty_close(struct tty_struct *tty, struct file *filp) in pty_close() argument
43 BUG_ON(!tty); in pty_close()
44 if (tty->driver->subtype == PTY_TYPE_MASTER) in pty_close()
45 WARN_ON(tty->count > 1); in pty_close()
47 if (tty_io_error(tty)) in pty_close()
49 if (tty->count > 2) in pty_close()
52 set_bit(TTY_IO_ERROR, &tty->flags); in pty_close()
53 wake_up_interruptible(&tty->read_wait); in pty_close()
[all …]
Dtty_ioctl.c30 # define tty_debug_wait_until_sent(tty, f, args...) tty_debug(tty, f, ##args) argument
32 # define tty_debug_wait_until_sent(tty, f, args...) do {} while (0) argument
55 int tty_chars_in_buffer(struct tty_struct *tty) in tty_chars_in_buffer() argument
57 if (tty->ops->chars_in_buffer) in tty_chars_in_buffer()
58 return tty->ops->chars_in_buffer(tty); in tty_chars_in_buffer()
75 int tty_write_room(struct tty_struct *tty) in tty_write_room() argument
77 if (tty->ops->write_room) in tty_write_room()
78 return tty->ops->write_room(tty); in tty_write_room()
91 void tty_driver_flush_buffer(struct tty_struct *tty) in tty_driver_flush_buffer() argument
93 if (tty->ops->flush_buffer) in tty_driver_flush_buffer()
[all …]
Dtty_mutex.c13 void tty_lock(struct tty_struct *tty) in tty_lock() argument
15 if (WARN(tty->magic != TTY_MAGIC, "L Bad %p\n", tty)) in tty_lock()
17 tty_kref_get(tty); in tty_lock()
18 mutex_lock(&tty->legacy_mutex); in tty_lock()
22 int tty_lock_interruptible(struct tty_struct *tty) in tty_lock_interruptible() argument
26 if (WARN(tty->magic != TTY_MAGIC, "L Bad %p\n", tty)) in tty_lock_interruptible()
28 tty_kref_get(tty); in tty_lock_interruptible()
29 ret = mutex_lock_interruptible(&tty->legacy_mutex); in tty_lock_interruptible()
31 tty_kref_put(tty); in tty_lock_interruptible()
35 void tty_unlock(struct tty_struct *tty) in tty_unlock() argument
[all …]
Dtty_port.c172 struct tty_struct *tty; in tty_port_tty_get() local
175 tty = tty_kref_get(port->tty); in tty_port_tty_get()
177 return tty; in tty_port_tty_get()
190 void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty) in tty_port_tty_set() argument
195 tty_kref_put(port->tty); in tty_port_tty_set()
196 port->tty = tty_kref_get(tty); in tty_port_tty_set()
201 static void tty_port_shutdown(struct tty_port *port, struct tty_struct *tty) in tty_port_shutdown() argument
213 if (tty && C_HUPCL(tty)) in tty_port_shutdown()
235 struct tty_struct *tty; in tty_port_hangup() local
240 tty = port->tty; in tty_port_hangup()
[all …]
Dn_hdlc.c146 struct tty_struct *tty; member
178 static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
180 static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
182 static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
184 static unsigned int n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp,
186 static int n_hdlc_tty_open(struct tty_struct *tty);
187 static void n_hdlc_tty_close(struct tty_struct *tty);
188 static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *cp,
190 static void n_hdlc_tty_wakeup(struct tty_struct *tty);
194 #define tty2n_hdlc(tty) ((struct n_hdlc *) ((tty)->disc_data)) argument
[all …]
Damiserial.c47 tty->name, (info->tport.flags), serial_driver->refcount,info->count,tty->count,s)
121 static void change_speed(struct tty_struct *tty, struct serial_state *info,
123 static void rs_wait_until_sent(struct tty_struct *tty, int timeout);
186 static void rs_stop(struct tty_struct *tty) in rs_stop() argument
188 struct serial_state *info = tty->driver_data; in rs_stop()
191 if (serial_paranoia_check(info, tty->name, "rs_stop")) in rs_stop()
206 static void rs_start(struct tty_struct *tty) in rs_start() argument
208 struct serial_state *info = tty->driver_data; in rs_start()
211 if (serial_paranoia_check(info, tty->name, "rs_start")) in rs_start()
315 do_SAK(info->tport.tty); in receive_chars()
[all …]
Disicom.c178 static void isicom_start(struct tty_struct *tty);
408 struct tty_struct *tty; in isicom_tx() local
435 tty = tty_port_tty_get(&port->port); in isicom_tx()
436 if (tty == NULL) in isicom_tx()
446 if (txcount <= 0 || tty->stopped || tty->hw_stopped) in isicom_tx()
499 tty_wakeup(tty); in isicom_tx()
503 tty_kref_put(tty); in isicom_tx()
519 struct tty_struct *tty; in isicom_interrupt() local
562 tty = tty_port_tty_get(&port->port); in isicom_interrupt()
563 if (tty == NULL) { in isicom_interrupt()
[all …]
Dgoldfish.c92 static int goldfish_tty_activate(struct tty_port *port, struct tty_struct *tty) in goldfish_tty_activate() argument
107 static int goldfish_tty_open(struct tty_struct *tty, struct file *filp) in goldfish_tty_open() argument
109 struct goldfish_tty *qtty = &goldfish_ttys[tty->index]; in goldfish_tty_open()
110 return tty_port_open(&qtty->port, tty, filp); in goldfish_tty_open()
113 static void goldfish_tty_close(struct tty_struct *tty, struct file *filp) in goldfish_tty_close() argument
115 tty_port_close(tty->port, tty, filp); in goldfish_tty_close()
118 static void goldfish_tty_hangup(struct tty_struct *tty) in goldfish_tty_hangup() argument
120 tty_port_hangup(tty->port); in goldfish_tty_hangup()
123 static int goldfish_tty_write(struct tty_struct *tty, const unsigned char *buf, in goldfish_tty_write() argument
126 goldfish_tty_do_write(tty->index, buf, count); in goldfish_tty_write()
[all …]
Dmxser.c572 static int mxser_set_baud(struct tty_struct *tty, long newspd) in mxser_set_baud() argument
574 struct mxser_port *info = tty->driver_data; in mxser_set_baud()
586 tty_encode_baud_rate(tty, 134, 134); in mxser_set_baud()
592 tty_encode_baud_rate(tty, baud, baud); in mxser_set_baud()
618 if (C_BAUD(tty) == BOTHER) { in mxser_set_baud()
639 static int mxser_change_speed(struct tty_struct *tty, in mxser_change_speed() argument
642 struct mxser_port *info = tty->driver_data; in mxser_change_speed()
647 cflag = tty->termios.c_cflag; in mxser_change_speed()
651 if (mxser_set_baud_method[tty->index] == 0) in mxser_change_speed()
652 mxser_set_baud(tty, tty_get_baud_rate(tty)); in mxser_change_speed()
[all …]
/drivers/tty/ipwireless/
Dtty.c90 struct ipw_tty *tty = get_tty(linux_tty->index); in ipw_open() local
92 if (!tty) in ipw_open()
95 mutex_lock(&tty->ipw_tty_mutex); in ipw_open()
96 if (tty->port.count == 0) in ipw_open()
97 tty->tx_bytes_queued = 0; in ipw_open()
99 tty->port.count++; in ipw_open()
101 tty->port.tty = linux_tty; in ipw_open()
102 linux_tty->driver_data = tty; in ipw_open()
103 tty->port.low_latency = 1; in ipw_open()
105 if (tty->tty_type == TTYTYPE_MODEM) in ipw_open()
[all …]
/drivers/net/irda/
Dirtty-sir.c67 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 down_write(&tty->termios_rwsem); 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/bluetooth/
Dhci_ldisc.c146 struct tty_struct *tty = hu->tty; in hci_uart_write_work() local
160 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in hci_uart_write_work()
161 len = tty->ops->write(tty, skb->data, skb->len); in hci_uart_write_work()
223 struct tty_struct *tty = hu->tty; in hci_uart_flush() local
225 BT_DBG("hdev %p tty %p", hdev, tty); in hci_uart_flush()
232 tty_ldisc_flush(tty); in hci_uart_flush()
233 tty_driver_flush_buffer(tty); in hci_uart_flush()
269 struct tty_struct *tty = hu->tty; in hci_uart_set_flow_control() local
277 ktermios = tty->termios; in hci_uart_set_flow_control()
279 status = tty_set_termios(tty, &ktermios); in hci_uart_set_flow_control()
[all …]
/drivers/staging/dgnc/
Ddgnc_tty.c82 static int dgnc_tty_open(struct tty_struct *tty, struct file *file);
83 static void dgnc_tty_close(struct tty_struct *tty, struct file *file);
84 static int dgnc_block_til_ready(struct tty_struct *tty, struct file *file,
86 static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
88 static int dgnc_tty_digigeta(struct tty_struct *tty,
90 static int dgnc_tty_digiseta(struct tty_struct *tty,
92 static int dgnc_tty_write_room(struct tty_struct *tty);
93 static int dgnc_tty_put_char(struct tty_struct *tty, unsigned char c);
94 static int dgnc_tty_chars_in_buffer(struct tty_struct *tty);
95 static void dgnc_tty_start(struct tty_struct *tty);
[all …]
/drivers/input/serio/
Dserport.c36 struct tty_struct *tty; member
51 return -(serport->tty->ops->write(serport->tty, &data, 1) != 1); in serport_serio_write()
82 static int serport_ldisc_open(struct tty_struct *tty) in serport_ldisc_open() argument
93 serport->tty = tty; in serport_ldisc_open()
97 tty->disc_data = serport; in serport_ldisc_open()
98 tty->receive_room = 256; in serport_ldisc_open()
99 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in serport_ldisc_open()
108 static void serport_ldisc_close(struct tty_struct *tty) in serport_ldisc_close() argument
110 struct serport *serport = (struct serport *) tty->disc_data; in serport_ldisc_close()
121 static void serport_ldisc_receive(struct tty_struct *tty, const unsigned char *cp, char *fp, int co… in serport_ldisc_receive() argument
[all …]
/drivers/isdn/gigaset/
Dinterface.c116 static int if_open(struct tty_struct *tty, struct file *filp) in if_open() argument
121 tty->driver->minor_start, tty->index, __func__); in if_open()
123 cs = gigaset_get_cs_by_tty(tty); in if_open()
131 tty->driver_data = cs; in if_open()
136 tty_port_tty_set(&cs->port, tty); in if_open()
144 static void if_close(struct tty_struct *tty, struct file *filp) in if_close() argument
146 struct cardstate *cs = tty->driver_data; in if_close()
169 static int if_ioctl(struct tty_struct *tty, in if_ioctl() argument
172 struct cardstate *cs = tty->driver_data; in if_ioctl()
236 static int if_tiocmget(struct tty_struct *tty) in if_tiocmget() argument
[all …]
Dser-gigaset.c47 struct tty_struct *tty; member
65 struct tty_struct *tty = cs->hw.ser->tty; in write_modem() local
70 WARN_ON(!tty || !tty->ops || !skb); in write_modem()
78 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in write_modem()
79 if (tty->ops->write) in write_modem()
80 sent = tty->ops->write(tty, skb->data, skb->len); in write_modem()
106 struct tty_struct *tty = cs->hw.ser->tty; in send_cb() local
111 WARN_ON(!tty || !tty->ops); in send_cb()
118 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in send_cb()
119 sent = tty->ops->write(tty, cb->buf + cb->offset, cb->len); in send_cb()
[all …]
/drivers/mmc/card/
Dsdio_uart.c434 struct tty_struct *tty; in sdio_uart_transmit_chars() local
445 tty = tty_port_tty_get(&port->port); in sdio_uart_transmit_chars()
447 if (tty == NULL || !kfifo_len(xmit) || in sdio_uart_transmit_chars()
448 tty->stopped || tty->hw_stopped) { in sdio_uart_transmit_chars()
450 tty_kref_put(tty); in sdio_uart_transmit_chars()
462 tty_wakeup(tty); in sdio_uart_transmit_chars()
466 tty_kref_put(tty); in sdio_uart_transmit_chars()
472 struct tty_struct *tty; in sdio_uart_check_modem_status() local
495 tty = tty_port_tty_get(&port->port); in sdio_uart_check_modem_status()
496 if (tty && C_CRTSCTS(tty)) { in sdio_uart_check_modem_status()
[all …]
/drivers/tty/hvc/
Dhvc_console.c311 static void hvc_unthrottle(struct tty_struct *tty) in hvc_unthrottle() argument
316 static int hvc_install(struct tty_driver *driver, struct tty_struct *tty) in hvc_install() argument
322 hp = hvc_get_by_index(tty->index); in hvc_install()
326 tty->driver_data = hp; in hvc_install()
328 rc = tty_port_install(&hp->port, driver, tty); in hvc_install()
338 static int hvc_open(struct tty_struct *tty, struct file * filp) in hvc_open() argument
340 struct hvc_struct *hp = tty->driver_data; in hvc_open()
353 tty_port_tty_set(&hp->port, tty); in hvc_open()
366 tty->driver_data = NULL; in hvc_open()
371 if (C_BAUD(tty)) in hvc_open()
[all …]
/drivers/ipack/devices/
Dipoctal.c74 static int ipoctal_port_activate(struct tty_port *port, struct tty_struct *tty) in ipoctal_port_activate() argument
78 channel = dev_get_drvdata(tty->dev); in ipoctal_port_activate()
89 static int ipoctal_open(struct tty_struct *tty, struct file *file) in ipoctal_open() argument
91 struct ipoctal_channel *channel = dev_get_drvdata(tty->dev); in ipoctal_open()
92 struct ipoctal *ipoctal = chan_to_ipoctal(channel, tty->index); in ipoctal_open()
95 tty->driver_data = channel; in ipoctal_open()
100 err = tty_port_open(&channel->tty_port, tty, file); in ipoctal_open()
125 static void ipoctal_close(struct tty_struct *tty, struct file *filp) in ipoctal_close() argument
127 struct ipoctal_channel *channel = tty->driver_data; in ipoctal_close()
129 tty_port_close(&channel->tty_port, tty, filp); in ipoctal_close()
[all …]
/drivers/net/hamradio/
D6pack.c87 struct tty_struct *tty; /* ptr to TTY structure */ member
149 sp->tty->ops->write(sp->tty, &sp->led_state, 1); in sp_xmit_on_air()
151 actual = sp->tty->ops->write(sp->tty, sp->xbuff, sp->status2); in sp_xmit_on_air()
155 sp->tty->ops->write(sp->tty, &sp->led_state, 1); in sp_xmit_on_air()
195 set_bit(TTY_DO_WRITE_WAKEUP, &sp->tty->flags); in sp_encaps()
221 sp->tty->ops->write(sp->tty, &sp->led_state, 1); in sp_encaps()
223 actual = sp->tty->ops->write(sp->tty, sp->xbuff, count); in sp_encaps()
227 sp->tty->ops->write(sp->tty, &sp->led_state, 1); in sp_encaps()
269 if (sp->tty == NULL) in sp_open_dev()
280 if (sp->tty) { in sp_close()
[all …]
/drivers/net/can/
Dslcan.c83 struct tty_struct *tty; /* ptr to TTY structure */ member
305 set_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags); in slc_encaps()
306 actual = sl->tty->ops->write(sl->tty, sl->xbuff, pos - sl->xbuff); in slc_encaps()
320 if (!sl->tty || sl->magic != SLCAN_MAGIC || !netif_running(sl->dev)) { in slcan_transmit()
329 clear_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags); in slcan_transmit()
335 actual = sl->tty->ops->write(sl->tty, sl->xhead, sl->xleft); in slcan_transmit()
345 static void slcan_write_wakeup(struct tty_struct *tty) in slcan_write_wakeup() argument
347 struct slcan *sl = tty->disc_data; in slcan_write_wakeup()
366 if (sl->tty == NULL) { in slc_xmit()
391 if (sl->tty) { in slc_close()
[all …]
/drivers/net/caif/
Dcaif_serial.c70 struct tty_struct *tty; member
85 static void ldisc_tx_wakeup(struct tty_struct *tty);
90 ser->tty->stopped << 5 | in update_tty_status()
91 ser->tty->flow_stopped << 3 | in update_tty_status()
92 ser->tty->packet << 2 | in update_tty_status()
93 ser->tty->port->low_latency << 1; in update_tty_status()
95 static inline void debugfs_init(struct ser_device *ser, struct tty_struct *tty) in debugfs_init() argument
98 debugfs_create_dir(tty->name, debugfsdir); in debugfs_init()
146 static inline void debugfs_init(struct ser_device *ser, struct tty_struct *tty) in debugfs_init() argument
168 static void ldisc_receive(struct tty_struct *tty, const u8 *data, in ldisc_receive() argument
[all …]

12345678