diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-20 16:05:23 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-20 16:05:23 -0800 |
commit | bcee63488ece9a0fca8be19951428a7b41001e66 (patch) | |
tree | ad8b040db89dd91437ec0c024ecd1a10cb91f4c9 /include | |
parent | de4fe30af1620b5117d65489621a5037913e7a92 (diff) | |
parent | 8bc661bfc0c2d221e209f4205bdaaf574d50100c (diff) |
Merge tag 'tty-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial driver updates from Greg KH:
"Here's the big tty/serial driver pull request for 3.14-rc1
There are a number of n_tty fixes and cleanups, and some serial driver
bugfixes, and we got rid of one obsolete driver, making this series
remove more lines than added, always a nice surprise.
All of these have been in linux-next with no reports of issues"
* tag 'tty-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (60 commits)
tty/serial: at91: disable uart timer at start of shutdown
serial: 8250: enable UART_BUG_NOMSR for Tegra
tty/serial: at91: reset rx_ring when port is shutdown
tty/serial: at91: fix race condition in atmel_serial_remove
tty/serial: at91: Handle shutdown more safely
serial: sirf: correct condition for fetching dma buffer into tty
serial: sirf: provide pm entries of uart_ops
serial: sirf: use PM macro initialize PM functions
serial: clps711x: Enable driver compilation with COMPILE_TEST
serial: clps711x: Add support for N_IRDA line discipline
tty: synclink: avoid sleep_on race
tty/amiserial: avoid interruptible_sleep_on
tty: delete non-required instances of include <linux/init.h>
tty: an overflow of multiplication in drivers/tty/cyclades.c
serial: Remove old SC26XX driver
serial: add support for 200 v3 series Titan card
serial: 8250: Fix initialisation of Quatech cards with the AMCC PCI chip
tty: Removing the deprecated function tty_vhangup_locked()
TTY/n_gsm: Removing the wrong tty_unlock/lock() in gsm_dlci_release()
tty/serial: at91: document clock properties
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/init.h | 2 | ||||
-rw-r--r-- | include/linux/tty.h | 8 | ||||
-rw-r--r-- | include/linux/tty_flip.h | 11 | ||||
-rw-r--r-- | include/linux/tty_ldisc.h | 6 |
4 files changed, 19 insertions, 8 deletions
diff --git a/include/linux/init.h b/include/linux/init.h index 8e68a64bfe00..e1688802964f 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -286,9 +286,11 @@ void __init parse_early_options(char *cmdline); #define arch_initcall(fn) module_init(fn) #define subsys_initcall(fn) module_init(fn) #define fs_initcall(fn) module_init(fn) +#define rootfs_initcall(fn) module_init(fn) #define device_initcall(fn) module_init(fn) #define late_initcall(fn) module_init(fn) +#define console_initcall(fn) module_init(fn) #define security_initcall(fn) module_init(fn) /* Each module must use one module_init(). */ diff --git a/include/linux/tty.h b/include/linux/tty.h index 97d660ed70c1..978d0f09d039 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -39,10 +39,14 @@ struct tty_buffer { int size; int commit; int read; + int flags; /* Data points here */ unsigned long data[0]; }; +/* Values for .flags field of tty_buffer */ +#define TTYB_NORMAL 1 /* buffer has no flags buffer */ + static inline unsigned char *char_buf_ptr(struct tty_buffer *b, int ofs) { return ((unsigned char *)b->data) + ofs; @@ -60,7 +64,8 @@ struct tty_bufhead { atomic_t priority; struct tty_buffer sentinel; struct llist_head free; /* Free queue head */ - atomic_t memory_used; /* In-use buffers excluding free list */ + atomic_t mem_used; /* In-use buffers excluding free list */ + int mem_limit; struct tty_buffer *tail; /* Active buffer */ }; /* @@ -422,7 +427,6 @@ extern int is_ignored(int sig); extern int tty_signal(int sig, struct tty_struct *tty); extern void tty_hangup(struct tty_struct *tty); extern void tty_vhangup(struct tty_struct *tty); -extern void tty_vhangup_locked(struct tty_struct *tty); extern void tty_unhangup(struct file *filp); extern int tty_hung_up_p(struct file *filp); extern void do_SAK(struct tty_struct *tty); diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index 21ddd7d9ea1f..c28dd523f96e 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h @@ -1,6 +1,7 @@ #ifndef _LINUX_TTY_FLIP_H #define _LINUX_TTY_FLIP_H +extern int tty_buffer_set_limit(struct tty_port *port, int limit); extern int tty_buffer_space_avail(struct tty_port *port); extern int tty_buffer_request_room(struct tty_port *port, size_t size); extern int tty_insert_flip_string_flags(struct tty_port *port, @@ -9,8 +10,6 @@ extern int tty_insert_flip_string_fixed_flag(struct tty_port *port, const unsigned char *chars, char flag, size_t size); extern int tty_prepare_flip_string(struct tty_port *port, unsigned char **chars, size_t size); -extern int tty_prepare_flip_string_flags(struct tty_port *port, - unsigned char **chars, char **flags, size_t size); extern void tty_flip_buffer_push(struct tty_port *port); void tty_schedule_flip(struct tty_port *port); @@ -18,8 +17,12 @@ static inline int tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag) { struct tty_buffer *tb = port->buf.tail; - if (tb && tb->used < tb->size) { - *flag_buf_ptr(tb, tb->used) = flag; + int change; + + change = (tb->flags & TTYB_NORMAL) && (flag != TTY_NORMAL); + if (!change && tb->used < tb->size) { + if (~tb->flags & TTYB_NORMAL) + *flag_buf_ptr(tb, tb->used) = flag; *char_buf_ptr(tb, tb->used++) = ch; return 1; } diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index f15c898ff462..b8347c207cb8 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h @@ -84,7 +84,8 @@ * processing. <cp> is a pointer to the buffer of input * character received by the device. <fp> is a pointer to a * pointer of flag bytes which indicate whether a character was - * received with a parity error, etc. + * received with a parity error, etc. <fp> may be NULL to indicate + * all data received is TTY_NORMAL. * * void (*write_wakeup)(struct tty_struct *); * @@ -118,7 +119,8 @@ * processing. <cp> is a pointer to the buffer of input * character received by the device. <fp> is a pointer to a * pointer of flag bytes which indicate whether a character was - * received with a parity error, etc. + * received with a parity error, etc. <fp> may be NULL to indicate + * all data received is TTY_NORMAL. * If assigned, prefer this function for automatic flow control. */ |