diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 19:12:24 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 19:12:24 -0400 |
| commit | 94b5aff4c6f72fee6b0f49d49e4fa8b204e8ded9 (patch) | |
| tree | 39197121b6ef8cddaa0f4057fe24b4ced58e8982 /include/linux | |
| parent | 5d4e2d08e7fdf7339f84a1c670d296a77e02f881 (diff) | |
| parent | 59bd234b72fc29887839d792b7d6c7e8d2a577a6 (diff) | |
Merge tag 'tty-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull TTY updates from Greg Kroah-Hartman:
"Here's the big TTY/serial driver pull request for the 3.5-rc1 merge
window.
Nothing major in here, just lots of incremental changes from Alan and
Jiri reworking some tty core things to behave better and to get a more
solid grasp on some of the nasty tty locking issues.
There are a few tty and serial driver updates in here as well.
All of this has been in the linux-next releases for a while with no
problems.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'tty-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (115 commits)
serial: bfin_uart: Make MMR access compatible with 32 bits bf609 style controller.
serial: bfin_uart: RTS and CTS MMRs can be either 16-bit width or 32-bit width.
serial: bfin_uart: narrow the reboot condition in DMA tx interrupt
serial: bfin_uart: Adapt bf5xx serial driver to bf60x serial4 controller.
Revert "serial_core: Update buffer overrun statistics."
tty: hvc_xen: NULL dereference on allocation failure
tty: Fix LED error return
tty: Allow uart_register/unregister/register
tty: move global ldisc idle waitqueue to the individual ldisc
serial8250-em: Add DT support
serial8250-em: clk_get() IS_ERR() error handling fix
serial_core: Update buffer overrun statistics.
tty: drop the pty lock during hangup
cris: fix missing tty arg in wait_event_interruptible_tty call
tty/amiserial: Add missing argument for tty_unlock()
tty_lock: Localise the lock
pty: Lock the devpts bits privately
tty_lock: undo the old tty_lock use on the ctty
serial8250-em: Emma Mobile UART driver V2
Add missing call to uart_update_timeout()
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/generic_serial.h | 64 | ||||
| -rw-r--r-- | include/linux/isdn.h | 26 | ||||
| -rw-r--r-- | include/linux/of_serial.h | 17 | ||||
| -rw-r--r-- | include/linux/serial_8250.h | 2 | ||||
| -rw-r--r-- | include/linux/serial_core.h | 5 | ||||
| -rw-r--r-- | include/linux/tty.h | 23 | ||||
| -rw-r--r-- | include/linux/tty_ldisc.h | 2 | ||||
| -rw-r--r-- | include/linux/vt_kern.h | 1 |
8 files changed, 44 insertions, 96 deletions
diff --git a/include/linux/generic_serial.h b/include/linux/generic_serial.h index fadff28505bb..79b3eb37243a 100644 --- a/include/linux/generic_serial.h +++ b/include/linux/generic_serial.h | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | * Copyright (C) 1998 R.E.Wolff@BitWizard.nl | 4 | * Copyright (C) 1998 R.E.Wolff@BitWizard.nl |
| 5 | * | 5 | * |
| 6 | * written for the SX serial driver. | 6 | * written for the SX serial driver. |
| 7 | * Contains the code that should be shared over all the serial drivers. | ||
| 8 | * | 7 | * |
| 9 | * Version 0.1 -- December, 1998. | 8 | * Version 0.1 -- December, 1998. |
| 10 | */ | 9 | */ |
| @@ -12,45 +11,8 @@ | |||
| 12 | #ifndef GENERIC_SERIAL_H | 11 | #ifndef GENERIC_SERIAL_H |
| 13 | #define GENERIC_SERIAL_H | 12 | #define GENERIC_SERIAL_H |
| 14 | 13 | ||
| 15 | #ifdef __KERNEL__ | 14 | #warning Use of this header is deprecated. |
| 16 | #include <linux/mutex.h> | 15 | #warning Since nobody sets the constants defined here for you, you should not, in any case, use them. Including the header is thus pointless. |
| 17 | #include <linux/tty.h> | ||
| 18 | |||
| 19 | struct real_driver { | ||
| 20 | void (*disable_tx_interrupts) (void *); | ||
| 21 | void (*enable_tx_interrupts) (void *); | ||
| 22 | void (*disable_rx_interrupts) (void *); | ||
| 23 | void (*enable_rx_interrupts) (void *); | ||
| 24 | void (*shutdown_port) (void*); | ||
| 25 | int (*set_real_termios) (void*); | ||
| 26 | int (*chars_in_buffer) (void*); | ||
| 27 | void (*close) (void*); | ||
| 28 | void (*hungup) (void*); | ||
| 29 | void (*getserial) (void*, struct serial_struct *sp); | ||
| 30 | }; | ||
| 31 | |||
| 32 | |||
| 33 | |||
| 34 | struct gs_port { | ||
| 35 | int magic; | ||
| 36 | struct tty_port port; | ||
| 37 | unsigned char *xmit_buf; | ||
| 38 | int xmit_head; | ||
| 39 | int xmit_tail; | ||
| 40 | int xmit_cnt; | ||
| 41 | struct mutex port_write_mutex; | ||
| 42 | unsigned long event; | ||
| 43 | unsigned short closing_wait; | ||
| 44 | int close_delay; | ||
| 45 | struct real_driver *rd; | ||
| 46 | int wakeup_chars; | ||
| 47 | int baud_base; | ||
| 48 | int baud; | ||
| 49 | int custom_divisor; | ||
| 50 | spinlock_t driver_lock; | ||
| 51 | }; | ||
| 52 | |||
| 53 | #endif /* __KERNEL__ */ | ||
| 54 | 16 | ||
| 55 | /* Flags */ | 17 | /* Flags */ |
| 56 | /* Warning: serial.h defines some ASYNC_ flags, they say they are "only" | 18 | /* Warning: serial.h defines some ASYNC_ flags, they say they are "only" |
| @@ -60,8 +22,6 @@ struct gs_port { | |||
| 60 | #define GS_RX_INTEN 0x00400000 | 22 | #define GS_RX_INTEN 0x00400000 |
| 61 | #define GS_ACTIVE 0x00200000 | 23 | #define GS_ACTIVE 0x00200000 |
| 62 | 24 | ||
| 63 | |||
| 64 | |||
| 65 | #define GS_TYPE_NORMAL 1 | 25 | #define GS_TYPE_NORMAL 1 |
| 66 | 26 | ||
| 67 | #define GS_DEBUG_FLUSH 0x00000001 | 27 | #define GS_DEBUG_FLUSH 0x00000001 |
| @@ -72,24 +32,4 @@ struct gs_port { | |||
| 72 | #define GS_DEBUG_FLOW 0x00000020 | 32 | #define GS_DEBUG_FLOW 0x00000020 |
| 73 | #define GS_DEBUG_WRITE 0x00000040 | 33 | #define GS_DEBUG_WRITE 0x00000040 |
| 74 | 34 | ||
| 75 | #ifdef __KERNEL__ | ||
| 76 | int gs_put_char(struct tty_struct *tty, unsigned char ch); | ||
| 77 | int gs_write(struct tty_struct *tty, | ||
| 78 | const unsigned char *buf, int count); | ||
| 79 | int gs_write_room(struct tty_struct *tty); | ||
| 80 | int gs_chars_in_buffer(struct tty_struct *tty); | ||
| 81 | void gs_flush_buffer(struct tty_struct *tty); | ||
| 82 | void gs_flush_chars(struct tty_struct *tty); | ||
| 83 | void gs_stop(struct tty_struct *tty); | ||
| 84 | void gs_start(struct tty_struct *tty); | ||
| 85 | void gs_hangup(struct tty_struct *tty); | ||
| 86 | int gs_block_til_ready(void *port, struct file *filp); | ||
| 87 | void gs_close(struct tty_struct *tty, struct file *filp); | ||
| 88 | void gs_set_termios (struct tty_struct * tty, | ||
| 89 | struct ktermios * old_termios); | ||
| 90 | int gs_init_port(struct gs_port *port); | ||
| 91 | int gs_setserial(struct gs_port *port, struct serial_struct __user *sp); | ||
| 92 | int gs_getserial(struct gs_port *port, struct serial_struct __user *sp); | ||
| 93 | void gs_got_break(struct gs_port *port); | ||
| 94 | #endif /* __KERNEL__ */ | ||
| 95 | #endif | 35 | #endif |
diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 292f27a793d4..215c41602af8 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #define __ISDN_H__ | 15 | #define __ISDN_H__ |
| 16 | 16 | ||
| 17 | #include <linux/ioctl.h> | 17 | #include <linux/ioctl.h> |
| 18 | #include <linux/tty.h> | ||
| 18 | 19 | ||
| 19 | #define ISDN_MAX_DRIVERS 32 | 20 | #define ISDN_MAX_DRIVERS 32 |
| 20 | #define ISDN_MAX_CHANNELS 64 | 21 | #define ISDN_MAX_CHANNELS 64 |
| @@ -392,21 +393,8 @@ typedef struct isdn_net_dev_s { | |||
| 392 | /*======================= Start of ISDN-tty stuff ===========================*/ | 393 | /*======================= Start of ISDN-tty stuff ===========================*/ |
| 393 | 394 | ||
| 394 | #define ISDN_ASYNC_MAGIC 0x49344C01 /* for paranoia-checking */ | 395 | #define ISDN_ASYNC_MAGIC 0x49344C01 /* for paranoia-checking */ |
| 395 | #define ISDN_ASYNC_INITIALIZED 0x80000000 /* port was initialized */ | ||
| 396 | #define ISDN_ASYNC_CALLOUT_ACTIVE 0x40000000 /* Call out device active */ | ||
| 397 | #define ISDN_ASYNC_NORMAL_ACTIVE 0x20000000 /* Normal device active */ | ||
| 398 | #define ISDN_ASYNC_CLOSING 0x08000000 /* Serial port is closing */ | ||
| 399 | #define ISDN_ASYNC_CTS_FLOW 0x04000000 /* Do CTS flow control */ | ||
| 400 | #define ISDN_ASYNC_CHECK_CD 0x02000000 /* i.e., CLOCAL */ | ||
| 401 | #define ISDN_ASYNC_HUP_NOTIFY 0x0001 /* Notify tty on hangups/closes */ | ||
| 402 | #define ISDN_ASYNC_SESSION_LOCKOUT 0x0100 /* Lock cua opens on session */ | ||
| 403 | #define ISDN_ASYNC_PGRP_LOCKOUT 0x0200 /* Lock cua opens on pgrp */ | ||
| 404 | #define ISDN_ASYNC_CALLOUT_NOHUP 0x0400 /* No hangup for cui */ | ||
| 405 | #define ISDN_ASYNC_SPLIT_TERMIOS 0x0008 /* Sep. termios for dialin/out */ | ||
| 406 | #define ISDN_SERIAL_XMIT_SIZE 1024 /* Default bufsize for write */ | 396 | #define ISDN_SERIAL_XMIT_SIZE 1024 /* Default bufsize for write */ |
| 407 | #define ISDN_SERIAL_XMIT_MAX 4000 /* Maximum bufsize for write */ | 397 | #define ISDN_SERIAL_XMIT_MAX 4000 /* Maximum bufsize for write */ |
| 408 | #define ISDN_SERIAL_TYPE_NORMAL 1 | ||
| 409 | #define ISDN_SERIAL_TYPE_CALLOUT 2 | ||
| 410 | 398 | ||
| 411 | #ifdef CONFIG_ISDN_AUDIO | 399 | #ifdef CONFIG_ISDN_AUDIO |
| 412 | /* For using sk_buffs with audio we need some private variables | 400 | /* For using sk_buffs with audio we need some private variables |
| @@ -448,17 +436,12 @@ typedef struct atemu { | |||
| 448 | /* Private data (similar to async_struct in <linux/serial.h>) */ | 436 | /* Private data (similar to async_struct in <linux/serial.h>) */ |
| 449 | typedef struct modem_info { | 437 | typedef struct modem_info { |
| 450 | int magic; | 438 | int magic; |
| 451 | struct module *owner; | 439 | struct tty_port port; |
| 452 | int flags; /* defined in tty.h */ | ||
| 453 | int x_char; /* xon/xoff character */ | 440 | int x_char; /* xon/xoff character */ |
| 454 | int mcr; /* Modem control register */ | 441 | int mcr; /* Modem control register */ |
| 455 | int msr; /* Modem status register */ | 442 | int msr; /* Modem status register */ |
| 456 | int lsr; /* Line status register */ | 443 | int lsr; /* Line status register */ |
| 457 | int line; | 444 | int line; |
| 458 | int count; /* # of fd on device */ | ||
| 459 | int blocked_open; /* # of blocked opens */ | ||
| 460 | long session; /* Session of opening process */ | ||
| 461 | long pgrp; /* pgrp of opening process */ | ||
| 462 | int online; /* 1 = B-Channel is up, drop data */ | 445 | int online; /* 1 = B-Channel is up, drop data */ |
| 463 | /* 2 = B-Channel is up, deliver d.*/ | 446 | /* 2 = B-Channel is up, deliver d.*/ |
| 464 | int dialing; /* Dial in progress or ATA */ | 447 | int dialing; /* Dial in progress or ATA */ |
| @@ -478,7 +461,6 @@ typedef struct modem_info { | |||
| 478 | int send_outstanding;/* # of outstanding send-requests */ | 461 | int send_outstanding;/* # of outstanding send-requests */ |
| 479 | int xmit_size; /* max. # of chars in xmit_buf */ | 462 | int xmit_size; /* max. # of chars in xmit_buf */ |
| 480 | int xmit_count; /* # of chars in xmit_buf */ | 463 | int xmit_count; /* # of chars in xmit_buf */ |
| 481 | unsigned char *xmit_buf; /* transmit buffer */ | ||
| 482 | struct sk_buff_head xmit_queue; /* transmit queue */ | 464 | struct sk_buff_head xmit_queue; /* transmit queue */ |
| 483 | atomic_t xmit_lock; /* Semaphore for isdn_tty_write */ | 465 | atomic_t xmit_lock; /* Semaphore for isdn_tty_write */ |
| 484 | #ifdef CONFIG_ISDN_AUDIO | 466 | #ifdef CONFIG_ISDN_AUDIO |
| @@ -496,11 +478,7 @@ typedef struct modem_info { | |||
| 496 | struct T30_s *fax; /* T30 Fax Group 3 data/interface */ | 478 | struct T30_s *fax; /* T30 Fax Group 3 data/interface */ |
| 497 | int faxonline; /* Fax-channel status */ | 479 | int faxonline; /* Fax-channel status */ |
| 498 | #endif | 480 | #endif |
| 499 | struct tty_struct *tty; /* Pointer to corresponding tty */ | ||
| 500 | atemu emu; /* AT-emulator data */ | 481 | atemu emu; /* AT-emulator data */ |
| 501 | struct ktermios normal_termios; /* For saving termios structs */ | ||
| 502 | struct ktermios callout_termios; | ||
