diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-12-08 05:38:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:28:57 -0500 |
commit | 592ee3a5e5e2a981ef2829a0380093006d045661 (patch) | |
tree | 78fee67dc74a138a2edbc51247f6ec752071f488 /include/asm-x86_64/termbits.h | |
parent | 64bb6c5e1ddcd47c951740485026ef08975ee2e6 (diff) |
[PATCH] termios: Enable new style termios ioctls on x86-64
This turns on the split input/output speed features and arbitary baud rate
handling for the x86-64 platform. Nothing should break if you use existing
standard speeds. If you use the new speed stuff then you may see some
drivers failing to report the speed changes properly in error cases. This
will be worked on further. For the working cases this all seems happy.
I'll post a test suite used to test the basic stuff as well.
Patches for i386 will follow when I get a moment but are basically the
same. If people could patch/test-suite other architectures and submit them
that would be great.
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-x86_64/termbits.h')
-rw-r--r-- | include/asm-x86_64/termbits.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/asm-x86_64/termbits.h b/include/asm-x86_64/termbits.h index f31918cea510..6cfc3bb10c1a 100644 --- a/include/asm-x86_64/termbits.h +++ b/include/asm-x86_64/termbits.h | |||
@@ -17,6 +17,17 @@ struct termios { | |||
17 | cc_t c_cc[NCCS]; /* control characters */ | 17 | cc_t c_cc[NCCS]; /* control characters */ |
18 | }; | 18 | }; |
19 | 19 | ||
20 | struct termios2 { | ||
21 | tcflag_t c_iflag; /* input mode flags */ | ||
22 | tcflag_t c_oflag; /* output mode flags */ | ||
23 | tcflag_t c_cflag; /* control mode flags */ | ||
24 | tcflag_t c_lflag; /* local mode flags */ | ||
25 | cc_t c_line; /* line discipline */ | ||
26 | cc_t c_cc[NCCS]; /* control characters */ | ||
27 | speed_t c_ispeed; /* input speed */ | ||
28 | speed_t c_ospeed; /* output speed */ | ||
29 | }; | ||
30 | |||
20 | struct ktermios { | 31 | struct ktermios { |
21 | tcflag_t c_iflag; /* input mode flags */ | 32 | tcflag_t c_iflag; /* input mode flags */ |
22 | tcflag_t c_oflag; /* output mode flags */ | 33 | tcflag_t c_oflag; /* output mode flags */ |
@@ -129,6 +140,7 @@ struct ktermios { | |||
129 | #define HUPCL 0002000 | 140 | #define HUPCL 0002000 |
130 | #define CLOCAL 0004000 | 141 | #define CLOCAL 0004000 |
131 | #define CBAUDEX 0010000 | 142 | #define CBAUDEX 0010000 |
143 | #define BOTHER 0010000 /* non standard rate */ | ||
132 | #define B57600 0010001 | 144 | #define B57600 0010001 |
133 | #define B115200 0010002 | 145 | #define B115200 0010002 |
134 | #define B230400 0010003 | 146 | #define B230400 0010003 |
@@ -144,10 +156,12 @@ struct ktermios { | |||
144 | #define B3000000 0010015 | 156 | #define B3000000 0010015 |
145 | #define B3500000 0010016 | 157 | #define B3500000 0010016 |
146 | #define B4000000 0010017 | 158 | #define B4000000 0010017 |
147 | #define CIBAUD 002003600000 /* input baud rate (not used) */ | 159 | #define CIBAUD 002003600000 /* input baud rate */ |
148 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | 160 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ |
149 | #define CRTSCTS 020000000000 /* flow control */ | 161 | #define CRTSCTS 020000000000 /* flow control */ |
150 | 162 | ||
163 | #define IBSHIFT 8 /* Shift from CBAUD to CIBAUD */ | ||
164 | |||
151 | /* c_lflag bits */ | 165 | /* c_lflag bits */ |
152 | #define ISIG 0000001 | 166 | #define ISIG 0000001 |
153 | #define ICANON 0000002 | 167 | #define ICANON 0000002 |