Home
last modified time | relevance | path

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

12345678

/drivers/tty/
Dn_tty.c158 static void zero_buffer(struct tty_struct *tty, u8 *buffer, int size) in zero_buffer() argument
160 bool icanon = !!L_ICANON(tty); in zero_buffer()
161 bool no_echo = !L_ECHO(tty); in zero_buffer()
167 static int tty_copy_to_user(struct tty_struct *tty, void __user *to, in tty_copy_to_user() argument
170 struct n_tty_data *ldata = tty->disc_data; in tty_copy_to_user()
176 tty_audit_add_data(tty, from, size); in tty_copy_to_user()
178 zero_buffer(tty, from, size - uncopied); in tty_copy_to_user()
186 tty_audit_add_data(tty, from, n); in tty_copy_to_user()
188 zero_buffer(tty, from, n - uncopied); in tty_copy_to_user()
204 static void n_tty_kick_worker(struct tty_struct *tty) in n_tty_kick_worker() argument
[all …]
Dtty_ldisc.c26 #define tty_ldisc_debug(tty, f, args...) tty_debug(tty, f, ##args) argument
28 #define tty_ldisc_debug(tty, f, args...) argument
166 static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc) in tty_ldisc_get() argument
194 ld->tty = tty; in tty_ldisc_get()
268 struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *tty) in tty_ldisc_ref_wait() argument
272 ldsem_down_read(&tty->ldisc_sem, MAX_SCHEDULE_TIMEOUT); in tty_ldisc_ref_wait()
273 ld = tty->ldisc; in tty_ldisc_ref_wait()
275 ldsem_up_read(&tty->ldisc_sem); in tty_ldisc_ref_wait()
289 struct tty_ldisc *tty_ldisc_ref(struct tty_struct *tty) in tty_ldisc_ref() argument
293 if (ldsem_down_read_trylock(&tty->ldisc_sem)) { in tty_ldisc_ref()
[all …]
Dtty_io.c113 # define tty_debug_hangup(tty, f, args...) tty_debug(tty, f, ##args) argument
115 # define tty_debug_hangup(tty, f, args...) do { } while (0) argument
159 static void release_tty(struct tty_struct *tty, int idx);
170 static void free_tty_struct(struct tty_struct *tty) in free_tty_struct() argument
172 tty_ldisc_deinit(tty); in free_tty_struct()
173 put_device(tty->dev); in free_tty_struct()
174 kfree(tty->write_buf); in free_tty_struct()
175 tty->magic = 0xDEADDEAD; in free_tty_struct()
176 kfree(tty); in free_tty_struct()
181 return ((struct tty_file_private *)file->private_data)->tty; in file_tty()
[all …]
Dtty_ioctl.c31 # define tty_debug_wait_until_sent(tty, f, args...) tty_debug(tty, f, ##args) argument
33 # define tty_debug_wait_until_sent(tty, f, args...) do {} while (0) argument
56 int tty_chars_in_buffer(struct tty_struct *tty) in tty_chars_in_buffer() argument
58 if (tty->ops->chars_in_buffer) in tty_chars_in_buffer()
59 return tty->ops->chars_in_buffer(tty); in tty_chars_in_buffer()
76 int tty_write_room(struct tty_struct *tty) in tty_write_room() argument
78 if (tty->ops->write_room) in tty_write_room()
79 return tty->ops->write_room(tty); in tty_write_room()
92 void tty_driver_flush_buffer(struct tty_struct *tty) in tty_driver_flush_buffer() argument
94 if (tty->ops->flush_buffer) in tty_driver_flush_buffer()
[all …]
Dpty.c35 # define tty_debug_hangup(tty, f, args...) tty_debug(tty, f, ##args) argument
37 # define tty_debug_hangup(tty, f, args...) do {} while (0) argument
46 static void pty_close(struct tty_struct *tty, struct file *filp) in pty_close() argument
48 BUG_ON(!tty); in pty_close()
49 if (tty->driver->subtype == PTY_TYPE_MASTER) in pty_close()
50 WARN_ON(tty->count > 1); in pty_close()
52 if (tty_io_error(tty)) in pty_close()
54 if (tty->count > 2) in pty_close()
57 set_bit(TTY_IO_ERROR, &tty->flags); in pty_close()
58 wake_up_interruptible(&tty->read_wait); in pty_close()
[all …]
Dtty_jobctrl.c31 int __tty_check_change(struct tty_struct *tty, int sig) in __tty_check_change() argument
37 if (current->signal->tty != tty) in __tty_check_change()
43 spin_lock_irqsave(&tty->ctrl_lock, flags); in __tty_check_change()
44 tty_pgrp = tty->pgrp; in __tty_check_change()
45 spin_unlock_irqrestore(&tty->ctrl_lock, flags); in __tty_check_change()
62 tty_warn(tty, "sig=%d, tty->pgrp == NULL!\n", sig); in __tty_check_change()
67 int tty_check_change(struct tty_struct *tty) in tty_check_change() argument
69 return __tty_check_change(tty, SIGTTOU); in tty_check_change()
76 struct tty_struct *tty; in proc_clear_tty() local
78 tty = p->signal->tty; in proc_clear_tty()
[all …]
Dtty_mutex.c14 void tty_lock(struct tty_struct *tty) in tty_lock() argument
16 if (WARN(tty->magic != TTY_MAGIC, "L Bad %p\n", tty)) in tty_lock()
18 tty_kref_get(tty); in tty_lock()
19 mutex_lock(&tty->legacy_mutex); in tty_lock()
23 int tty_lock_interruptible(struct tty_struct *tty) in tty_lock_interruptible() argument
27 if (WARN(tty->magic != TTY_MAGIC, "L Bad %p\n", tty)) in tty_lock_interruptible()
29 tty_kref_get(tty); in tty_lock_interruptible()
30 ret = mutex_lock_interruptible(&tty->legacy_mutex); in tty_lock_interruptible()
32 tty_kref_put(tty); in tty_lock_interruptible()
36 void tty_unlock(struct tty_struct *tty) in tty_unlock() argument
[all …]
Dn_hdlc.c145 struct tty_struct *tty; member
177 static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
179 static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
181 static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
183 static __poll_t n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp,
185 static int n_hdlc_tty_open(struct tty_struct *tty);
186 static void n_hdlc_tty_close(struct tty_struct *tty);
187 static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *cp,
189 static void n_hdlc_tty_wakeup(struct tty_struct *tty);
193 #define tty2n_hdlc(tty) ((struct n_hdlc *) ((tty)->disc_data)) argument
[all …]
Dtty_port.c27 struct tty_struct *tty; in tty_port_default_receive_buf() local
30 tty = READ_ONCE(port->itty); in tty_port_default_receive_buf()
31 if (!tty) in tty_port_default_receive_buf()
34 disc = tty_ldisc_ref(tty); in tty_port_default_receive_buf()
47 struct tty_struct *tty = tty_port_tty_get(port); in tty_port_default_wakeup() local
49 if (tty) { in tty_port_default_wakeup()
50 tty_wakeup(tty); in tty_port_default_wakeup()
51 tty_kref_put(tty); in tty_port_default_wakeup()
285 struct tty_struct *tty; in tty_port_tty_get() local
288 tty = tty_kref_get(port->tty); in tty_port_tty_get()
[all …]
Damiserial.c48 tty->name, (info->tport.flags), serial_driver->refcount,info->count,tty->count,s)
122 static void change_speed(struct tty_struct *tty, struct serial_state *info,
124 static void rs_wait_until_sent(struct tty_struct *tty, int timeout);
187 static void rs_stop(struct tty_struct *tty) in rs_stop() argument
189 struct serial_state *info = tty->driver_data; in rs_stop()
192 if (serial_paranoia_check(info, tty->name, "rs_stop")) in rs_stop()
207 static void rs_start(struct tty_struct *tty) in rs_start() argument
209 struct serial_state *info = tty->driver_data; in rs_start()
212 if (serial_paranoia_check(info, tty->name, "rs_start")) in rs_start()
316 do_SAK(info->tport.tty); in receive_chars()
[all …]
Dvcc.c33 struct tty_struct *tty; /* only populated while dev is open */ member
285 static int vcc_rx_check(struct tty_struct *tty, int size) in vcc_rx_check() argument
287 if (WARN_ON(!tty || !tty->port)) in vcc_rx_check()
293 if (test_bit(TTY_THROTTLED, &tty->flags) || in vcc_rx_check()
294 (tty_buffer_request_room(tty->port, VCC_BUFF_LEN) < VCC_BUFF_LEN)) in vcc_rx_check()
300 static int vcc_rx(struct tty_struct *tty, char *buf, int size) in vcc_rx() argument
304 if (WARN_ON(!tty || !tty->port)) in vcc_rx()
307 len = tty_insert_flip_string(tty->port, buf, size); in vcc_rx()
309 tty_flip_buffer_push(tty->port); in vcc_rx()
317 struct tty_struct *tty; in vcc_ldc_read() local
[all …]
Disicom.c174 static void isicom_start(struct tty_struct *tty);
400 struct tty_struct *tty; in isicom_tx() local
427 tty = tty_port_tty_get(&port->port); in isicom_tx()
428 if (tty == NULL) in isicom_tx()
438 if (txcount <= 0 || tty->stopped || tty->hw_stopped) in isicom_tx()
491 tty_wakeup(tty); in isicom_tx()
495 tty_kref_put(tty); in isicom_tx()
511 struct tty_struct *tty; in isicom_interrupt() local
554 tty = tty_port_tty_get(&port->port); in isicom_interrupt()
555 if (tty == NULL) { in isicom_interrupt()
[all …]
/drivers/tty/ipwireless/
Dtty.c91 struct ipw_tty *tty = get_tty(linux_tty->index); in ipw_open() local
93 if (!tty) in ipw_open()
96 mutex_lock(&tty->ipw_tty_mutex); in ipw_open()
97 if (tty->port.count == 0) in ipw_open()
98 tty->tx_bytes_queued = 0; in ipw_open()
100 tty->port.count++; in ipw_open()
102 tty->port.tty = linux_tty; in ipw_open()
103 linux_tty->driver_data = tty; in ipw_open()
104 tty->port.low_latency = 1; in ipw_open()
106 if (tty->tty_type == TTYTYPE_MODEM) in ipw_open()
[all …]
/drivers/tty/serdev/
Dserdev-ttyport.c15 struct tty_struct *tty; member
52 struct tty_struct *tty; in ttyport_write_wakeup() local
54 tty = tty_port_tty_get(port); in ttyport_write_wakeup()
55 if (!tty) in ttyport_write_wakeup()
58 if (test_and_clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags) && in ttyport_write_wakeup()
63 wake_up_interruptible(&tty->write_wait); in ttyport_write_wakeup()
65 tty_kref_put(tty); in ttyport_write_wakeup()
80 struct tty_struct *tty = serport->tty; in ttyport_write_buf() local
85 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in ttyport_write_buf()
86 return tty->ops->write(serport->tty, data, len); in ttyport_write_buf()
[all …]
/drivers/staging/speakup/
Dselection.c22 struct tty_struct *tty; member
37 struct tty_struct *tty; in __speakup_set_selection() local
46 tty = xchg(&ssw->tty, NULL); in __speakup_set_selection()
55 set_selection_kernel(&sel, tty); in __speakup_set_selection()
59 tty_kref_put(tty); in __speakup_set_selection()
67 int speakup_set_selection(struct tty_struct *tty) in speakup_set_selection() argument
75 tty_kref_get(tty); in speakup_set_selection()
76 if (cmpxchg(&speakup_sel_work.tty, NULL, tty)) { in speakup_set_selection()
77 tty_kref_put(tty); in speakup_set_selection()
99 struct tty_struct *tty; in speakup_cancel_selection() local
[all …]
/drivers/usb/serial/
Dupd78f0730.c188 static int upd78f0730_tiocmget(struct tty_struct *tty) in upd78f0730_tiocmget() argument
190 struct device *dev = tty->dev; in upd78f0730_tiocmget()
192 struct usb_serial_port *port = tty->driver_data; in upd78f0730_tiocmget()
210 static int upd78f0730_tiocmset(struct tty_struct *tty, in upd78f0730_tiocmset() argument
213 struct device *dev = tty->dev; in upd78f0730_tiocmset()
214 struct usb_serial_port *port = tty->driver_data; in upd78f0730_tiocmset()
247 static void upd78f0730_break_ctl(struct tty_struct *tty, int break_state) in upd78f0730_break_ctl() argument
249 struct device *dev = tty->dev; in upd78f0730_break_ctl()
251 struct usb_serial_port *port = tty->driver_data; in upd78f0730_break_ctl()
273 struct tty_struct *tty = port->port.tty; in upd78f0730_dtr_rts() local
[all …]
/drivers/bluetooth/
Dhci_ldisc.c149 struct tty_struct *tty = hu->tty; in hci_uart_write_work() local
163 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in hci_uart_write_work()
164 len = tty->ops->write(tty, skb->data, skb->len); in hci_uart_write_work()
229 struct tty_struct *tty = hu->tty; in hci_uart_flush() local
231 BT_DBG("hdev %p tty %p", hdev, tty); in hci_uart_flush()
238 tty_ldisc_flush(tty); in hci_uart_flush()
239 tty_driver_flush_buffer(tty); in hci_uart_flush()
302 if (hu->tty->driver->ops->tiocmget && hu->tty->driver->ops->tiocmset) in hci_uart_has_flow_control()
311 struct tty_struct *tty = hu->tty; in hci_uart_set_flow_control() local
325 ktermios = tty->termios; in hci_uart_set_flow_control()
[all …]
/drivers/staging/isdn/gigaset/
Dinterface.c113 static int if_open(struct tty_struct *tty, struct file *filp) in if_open() argument
118 tty->driver->minor_start, tty->index, __func__); in if_open()
120 cs = gigaset_get_cs_by_tty(tty); in if_open()
128 tty->driver_data = cs; in if_open()
133 tty_port_tty_set(&cs->port, tty); in if_open()
141 static void if_close(struct tty_struct *tty, struct file *filp) in if_close() argument
143 struct cardstate *cs = tty->driver_data; in if_close()
166 static int if_ioctl(struct tty_struct *tty, in if_ioctl() argument
169 struct cardstate *cs = tty->driver_data; in if_ioctl()
234 static long if_compat_ioctl(struct tty_struct *tty, in if_compat_ioctl() argument
[all …]
Dser-gigaset.c44 struct tty_struct *tty; member
62 struct tty_struct *tty = cs->hw.ser->tty; in write_modem() local
67 WARN_ON(!tty || !tty->ops || !skb); in write_modem()
75 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in write_modem()
76 if (tty->ops->write) in write_modem()
77 sent = tty->ops->write(tty, skb->data, skb->len); in write_modem()
103 struct tty_struct *tty = cs->hw.ser->tty; in send_cb() local
108 WARN_ON(!tty || !tty->ops); in send_cb()
115 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in send_cb()
116 sent = tty->ops->write(tty, cb->buf + cb->offset, cb->len); in send_cb()
[all …]
/drivers/input/serio/
Dserport.c32 struct tty_struct *tty; member
47 return -(serport->tty->ops->write(serport->tty, &data, 1) != 1); in serport_serio_write()
78 static int serport_ldisc_open(struct tty_struct *tty) in serport_ldisc_open() argument
89 serport->tty = tty; in serport_ldisc_open()
93 tty->disc_data = serport; in serport_ldisc_open()
94 tty->receive_room = 256; in serport_ldisc_open()
95 set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); in serport_ldisc_open()
104 static void serport_ldisc_close(struct tty_struct *tty) in serport_ldisc_close() argument
106 struct serport *serport = (struct serport *) tty->disc_data; in serport_ldisc_close()
117 static void serport_ldisc_receive(struct tty_struct *tty, const unsigned char *cp, char *fp, int co… in serport_ldisc_receive() argument
[all …]
/drivers/mmc/core/
Dsdio_uart.c428 struct tty_struct *tty; in sdio_uart_transmit_chars() local
439 tty = tty_port_tty_get(&port->port); in sdio_uart_transmit_chars()
441 if (tty == NULL || !kfifo_len(xmit) || in sdio_uart_transmit_chars()
442 tty->stopped || tty->hw_stopped) { in sdio_uart_transmit_chars()
444 tty_kref_put(tty); in sdio_uart_transmit_chars()
456 tty_wakeup(tty); in sdio_uart_transmit_chars()
460 tty_kref_put(tty); in sdio_uart_transmit_chars()
466 struct tty_struct *tty; in sdio_uart_check_modem_status() local
489 tty = tty_port_tty_get(&port->port); in sdio_uart_check_modem_status()
490 if (tty && C_CRTSCTS(tty)) { in sdio_uart_check_modem_status()
[all …]
/drivers/ipack/devices/
Dipoctal.c71 static int ipoctal_port_activate(struct tty_port *port, struct tty_struct *tty) in ipoctal_port_activate() argument
75 channel = dev_get_drvdata(tty->dev); in ipoctal_port_activate()
86 static int ipoctal_open(struct tty_struct *tty, struct file *file) in ipoctal_open() argument
88 struct ipoctal_channel *channel = dev_get_drvdata(tty->dev); in ipoctal_open()
89 struct ipoctal *ipoctal = chan_to_ipoctal(channel, tty->index); in ipoctal_open()
92 tty->driver_data = channel; in ipoctal_open()
97 err = tty_port_open(&channel->tty_port, tty, file); in ipoctal_open()
122 static void ipoctal_close(struct tty_struct *tty, struct file *filp) in ipoctal_close() argument
124 struct ipoctal_channel *channel = tty->driver_data; in ipoctal_close()
126 tty_port_close(&channel->tty_port, tty, filp); in ipoctal_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
97 ser->debugfs_tty_dir = debugfs_create_dir(tty->name, debugfsdir); in debugfs_init()
140 static inline void debugfs_init(struct ser_device *ser, struct tty_struct *tty) in debugfs_init() argument
162 static void ldisc_receive(struct tty_struct *tty, const u8 *data, in ldisc_receive() argument
[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/tty/hvc/
Dhvc_console.c324 static void hvc_unthrottle(struct tty_struct *tty) in hvc_unthrottle() argument
329 static int hvc_install(struct tty_driver *driver, struct tty_struct *tty) in hvc_install() argument
335 hp = hvc_get_by_index(tty->index); in hvc_install()
339 tty->driver_data = hp; in hvc_install()
341 rc = tty_port_install(&hp->port, driver, tty); in hvc_install()
351 static int hvc_open(struct tty_struct *tty, struct file * filp) in hvc_open() argument
353 struct hvc_struct *hp = tty->driver_data; in hvc_open()
366 tty_port_tty_set(&hp->port, tty); in hvc_open()
379 tty->driver_data = NULL; in hvc_open()
384 if (C_BAUD(tty)) in hvc_open()
[all …]

12345678