diff options
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r-- | include/linux/tty.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index 568369a86306..bb44fa9ae135 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ | 24 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ |
25 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ | 25 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ |
26 | #define NR_LDISCS 20 | 26 | #define NR_LDISCS 21 |
27 | 27 | ||
28 | /* line disciplines */ | 28 | /* line disciplines */ |
29 | #define N_TTY 0 | 29 | #define N_TTY 0 |
@@ -46,8 +46,8 @@ | |||
46 | #define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */ | 46 | #define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */ |
47 | #define N_SLCAN 17 /* Serial / USB serial CAN Adaptors */ | 47 | #define N_SLCAN 17 /* Serial / USB serial CAN Adaptors */ |
48 | #define N_PPS 18 /* Pulse per Second */ | 48 | #define N_PPS 18 /* Pulse per Second */ |
49 | |||
50 | #define N_V253 19 /* Codec control over voice modem */ | 49 | #define N_V253 19 /* Codec control over voice modem */ |
50 | #define N_CAIF 20 /* CAIF protocol for talking to modems */ | ||
51 | 51 | ||
52 | /* | 52 | /* |
53 | * This character is the same as _POSIX_VDISABLE: it cannot be used as | 53 | * This character is the same as _POSIX_VDISABLE: it cannot be used as |
@@ -70,12 +70,13 @@ struct tty_buffer { | |||
70 | 70 | ||
71 | /* | 71 | /* |
72 | * We default to dicing tty buffer allocations to this many characters | 72 | * We default to dicing tty buffer allocations to this many characters |
73 | * in order to avoid multiple page allocations. We assume tty_buffer itself | 73 | * in order to avoid multiple page allocations. We know the size of |
74 | * is under 256 bytes. See tty_buffer_find for the allocation logic this | 74 | * tty_buffer itself but it must also be taken into account that the |
75 | * must match | 75 | * the buffer is 256 byte aligned. See tty_buffer_find for the allocation |
76 | * logic this must match | ||
76 | */ | 77 | */ |
77 | 78 | ||
78 | #define TTY_BUFFER_PAGE ((PAGE_SIZE - 256) / 2) | 79 | #define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~0xFF) |
79 | 80 | ||
80 | 81 | ||
81 | struct tty_bufhead { | 82 | struct tty_bufhead { |
@@ -223,6 +224,7 @@ struct tty_port { | |||
223 | wait_queue_head_t close_wait; /* Close waiters */ | 224 | wait_queue_head_t close_wait; /* Close waiters */ |
224 | wait_queue_head_t delta_msr_wait; /* Modem status change */ | 225 | wait_queue_head_t delta_msr_wait; /* Modem status change */ |
225 | unsigned long flags; /* TTY flags ASY_*/ | 226 | unsigned long flags; /* TTY flags ASY_*/ |
227 | unsigned char console:1; /* port is a console */ | ||
226 | struct mutex mutex; /* Locking */ | 228 | struct mutex mutex; /* Locking */ |
227 | struct mutex buf_mutex; /* Buffer alloc lock */ | 229 | struct mutex buf_mutex; /* Buffer alloc lock */ |
228 | unsigned char *xmit_buf; /* Optional buffer */ | 230 | unsigned char *xmit_buf; /* Optional buffer */ |