diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-20 19:05:23 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-20 19:05:23 -0500 |
| commit | bcee63488ece9a0fca8be19951428a7b41001e66 (patch) | |
| tree | ad8b040db89dd91437ec0c024ecd1a10cb91f4c9 /include/linux | |
| 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/linux')
| -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); | |||
| 286 | #define arch_initcall(fn) module_init(fn) | 286 | #define arch_initcall(fn) module_init(fn) |
| 287 | #define subsys_initcall(fn) module_init(fn) | 287 | #define subsys_initcall(fn) module_init(fn) |
| 288 | #define fs_initcall(fn) module_init(fn) | 288 | #define fs_initcall(fn) module_init(fn) |
| 289 | #define rootfs_initcall(fn) module_init(fn) | ||
| 289 | #define device_initcall(fn) module_init(fn) | 290 | #define device_initcall(fn) module_init(fn) |
| 290 | #define late_initcall(fn) module_init(fn) | 291 | #define late_initcall(fn) module_init(fn) |
| 291 | 292 | ||
| 293 | #define console_initcall(fn) module_init(fn) | ||
| 292 | #define security_initcall(fn) module_init(fn) | 294 | #define security_initcall(fn) module_init(fn) |
| 293 | 295 | ||
| 294 | /* Each module must use one module_init(). */ | 296 | /* 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 { | |||
| 39 | int size; | 39 | int size; |
| 40 | int commit; | 40 | int commit; |
| 41 | int read; | 41 | int read; |
| 42 | int flags; | ||
| 42 | /* Data points here */ | 43 | /* Data points here */ |
| 43 | unsigned long data[0]; | 44 | unsigned long data[0]; |
| 44 | }; | 45 | }; |
| 45 | 46 | ||
| 47 | /* Values for .flags field of tty_buffer */ | ||
| 48 | #define TTYB_NORMAL 1 /* buffer has no flags buffer */ | ||
| 49 | |||
| 46 | static inline unsigned char *char_buf_ptr(struct tty_buffer *b, int ofs) | 50 | static inline unsigned char *char_buf_ptr(struct tty_buffer *b, int ofs) |
| 47 | { | 51 | { |
| 48 | return ((unsigned char *)b->data) + ofs; | 52 | return ((unsigned char *)b->data) + ofs; |
| @@ -60,7 +64,8 @@ struct tty_bufhead { | |||
| 60 | atomic_t priority; | 64 | atomic_t priority; |
| 61 | struct tty_buffer sentinel; | 65 | struct tty_buffer sentinel; |
| 62 | struct llist_head free; /* Free queue head */ | 66 | struct llist_head free; /* Free queue head */ |
| 63 | atomic_t memory_used; /* In-use buffers excluding free list */ | 67 | atomic_t mem_used; /* In-use buffers excluding free list */ |
| 68 | int mem_limit; | ||
| 64 | struct tty_buffer *tail; /* Active buffer */ | 69 | struct tty_buffer *tail; /* Active buffer */ |
| 65 | }; | 70 | }; |
| 66 | /* | 71 | /* |
| @@ -422,7 +427,6 @@ extern int is_ignored(int sig); | |||
| 422 | extern int tty_signal(int sig, struct tty_struct *tty); | 427 | extern int tty_signal(int sig, struct tty_struct *tty); |
| 423 | extern void tty_hangup(struct tty_struct *tty); | 428 | extern void tty_hangup(struct tty_struct *tty); |
| 424 | extern void tty_vhangup(struct tty_struct *tty); | 429 | extern void tty_vhangup(struct tty_struct *tty); |
| 425 | extern void tty_vhangup_locked(struct tty_struct *tty); | ||
| 426 | extern void tty_unhangup(struct file *filp); | 430 | extern void tty_unhangup(struct file *filp); |
| 427 | extern int tty_hung_up_p(struct file *filp); | 431 | extern int tty_hung_up_p(struct file *filp); |
| 428 | extern void do_SAK(struct tty_struct *tty); | 432 | 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 @@ | |||
| 1 | #ifndef _LINUX_TTY_FLIP_H | 1 | #ifndef _LINUX_TTY_FLIP_H |
| 2 | #define _LINUX_TTY_FLIP_H | 2 | #define _LINUX_TTY_FLIP_H |
| 3 | 3 | ||
| 4 | extern int tty_buffer_set_limit(struct tty_port *port, int limit); | ||
| 4 | extern int tty_buffer_space_avail(struct tty_port *port); | 5 | extern int tty_buffer_space_avail(struct tty_port *port); |
| 5 | extern int tty_buffer_request_room(struct tty_port *port, size_t size); | 6 | extern int tty_buffer_request_room(struct tty_port *port, size_t size); |
| 6 | extern int tty_insert_flip_string_flags(struct tty_port *port, | 7 | 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, | |||
| 9 | const unsigned char *chars, char flag, size_t size); | 10 | const unsigned char *chars, char flag, size_t size); |
| 10 | extern int tty_prepare_flip_string(struct tty_port *port, | 11 | extern int tty_prepare_flip_string(struct tty_port *port, |
| 11 | unsigned char **chars, size_t size); | 12 | unsigned char **chars, size_t size); |
| 12 | extern int tty_prepare_flip_string_flags(struct tty_port *port, | ||
| 13 | unsigned char **chars, char **flags, size_t size); | ||
| 14 | extern void tty_flip_buffer_push(struct tty_port *port); | 13 | extern void tty_flip_buffer_push(struct tty_port *port); |
| 15 | void tty_schedule_flip(struct tty_port *port); | 14 | void tty_schedule_flip(struct tty_port *port); |
| 16 | 15 | ||
| @@ -18,8 +17,12 @@ static inline int tty_insert_flip_char(struct tty_port *port, | |||
| 18 | unsigned char ch, char flag) | 17 | unsigned char ch, char flag) |
| 19 | { | 18 | { |
| 20 | struct tty_buffer *tb = port->buf.tail; | 19 | struct tty_buffer *tb = port->buf.tail; |
| 21 | if (tb && tb->used < tb->size) { | 20 | int change; |
| 22 | *flag_buf_ptr(tb, tb->used) = flag; | 21 | |
| 22 | change = (tb->flags & TTYB_NORMAL) && (flag != TTY_NORMAL); | ||
| 23 | if (!change && tb->used < tb->size) { | ||
| 24 | if (~tb->flags & TTYB_NORMAL) | ||
| 25 | *flag_buf_ptr(tb, tb->used) = flag; | ||
| 23 | *char_buf_ptr(tb, tb->used++) = ch; | 26 | *char_buf_ptr(tb, tb->used++) = ch; |
| 24 | return 1; | 27 | return 1; |
| 25 | } | 28 | } |
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 @@ | |||
| 84 | * processing. <cp> is a pointer to the buffer of input | 84 | * processing. <cp> is a pointer to the buffer of input |
| 85 | * character received by the device. <fp> is a pointer to a | 85 | * character received by the device. <fp> is a pointer to a |
| 86 | * pointer of flag bytes which indicate whether a character was | 86 | * pointer of flag bytes which indicate whether a character was |
| 87 | * received with a parity error, etc. | 87 | * received with a parity error, etc. <fp> may be NULL to indicate |
| 88 | * all data received is TTY_NORMAL. | ||
| 88 | * | 89 | * |
| 89 | * void (*write_wakeup)(struct tty_struct *); | 90 | * void (*write_wakeup)(struct tty_struct *); |
| 90 | * | 91 | * |
| @@ -118,7 +119,8 @@ | |||
| 118 | * processing. <cp> is a pointer to the buffer of input | 119 | * processing. <cp> is a pointer to the buffer of input |
| 119 | * character received by the device. <fp> is a pointer to a | 120 | * character received by the device. <fp> is a pointer to a |
| 120 | * pointer of flag bytes which indicate whether a character was | 121 | * pointer of flag bytes which indicate whether a character was |
| 121 | * received with a parity error, etc. | 122 | * received with a parity error, etc. <fp> may be NULL to indicate |
| 123 | * all data received is TTY_NORMAL. | ||
| 122 | * If assigned, prefer this function for automatic flow control. | 124 | * If assigned, prefer this function for automatic flow control. |
| 123 | */ | 125 | */ |
| 124 | 126 | ||
