diff options
| -rw-r--r-- | arch/alpha/include/asm/termios.h | 8 | ||||
| -rw-r--r-- | arch/alpha/include/uapi/asm/ioctls.h | 5 | ||||
| -rw-r--r-- | arch/alpha/include/uapi/asm/termbits.h | 17 |
3 files changed, 29 insertions, 1 deletions
diff --git a/arch/alpha/include/asm/termios.h b/arch/alpha/include/asm/termios.h index 6a8c53dec57e..b7c77bb1bfd2 100644 --- a/arch/alpha/include/asm/termios.h +++ b/arch/alpha/include/asm/termios.h | |||
| @@ -73,9 +73,15 @@ | |||
| 73 | }) | 73 | }) |
| 74 | 74 | ||
| 75 | #define user_termios_to_kernel_termios(k, u) \ | 75 | #define user_termios_to_kernel_termios(k, u) \ |
| 76 | copy_from_user(k, u, sizeof(struct termios)) | 76 | copy_from_user(k, u, sizeof(struct termios2)) |
| 77 | 77 | ||
| 78 | #define kernel_termios_to_user_termios(u, k) \ | 78 | #define kernel_termios_to_user_termios(u, k) \ |
| 79 | copy_to_user(u, k, sizeof(struct termios2)) | ||
| 80 | |||
| 81 | #define user_termios_to_kernel_termios_1(k, u) \ | ||
| 82 | copy_from_user(k, u, sizeof(struct termios)) | ||
| 83 | |||
| 84 | #define kernel_termios_to_user_termios_1(u, k) \ | ||
| 79 | copy_to_user(u, k, sizeof(struct termios)) | 85 | copy_to_user(u, k, sizeof(struct termios)) |
| 80 | 86 | ||
| 81 | #endif /* _ALPHA_TERMIOS_H */ | 87 | #endif /* _ALPHA_TERMIOS_H */ |
diff --git a/arch/alpha/include/uapi/asm/ioctls.h b/arch/alpha/include/uapi/asm/ioctls.h index 3729d92d3fa8..dc8c20ac7191 100644 --- a/arch/alpha/include/uapi/asm/ioctls.h +++ b/arch/alpha/include/uapi/asm/ioctls.h | |||
| @@ -32,6 +32,11 @@ | |||
| 32 | #define TCXONC _IO('t', 30) | 32 | #define TCXONC _IO('t', 30) |
| 33 | #define TCFLSH _IO('t', 31) | 33 | #define TCFLSH _IO('t', 31) |
| 34 | 34 | ||
| 35 | #define TCGETS2 _IOR('T', 42, struct termios2) | ||
| 36 | #define TCSETS2 _IOW('T', 43, struct termios2) | ||
| 37 | #define TCSETSW2 _IOW('T', 44, struct termios2) | ||
| 38 | #define TCSETSF2 _IOW('T', 45, struct termios2) | ||
| 39 | |||
| 35 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) | 40 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) |
| 36 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) | 41 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) |
| 37 | #define TIOCSTART _IO('t', 110) /* start output, like ^Q */ | 42 | #define TIOCSTART _IO('t', 110) /* start output, like ^Q */ |
diff --git a/arch/alpha/include/uapi/asm/termbits.h b/arch/alpha/include/uapi/asm/termbits.h index de6c8360fbe3..4575ba34a0ea 100644 --- a/arch/alpha/include/uapi/asm/termbits.h +++ b/arch/alpha/include/uapi/asm/termbits.h | |||
| @@ -26,6 +26,19 @@ struct termios { | |||
| 26 | speed_t c_ospeed; /* output speed */ | 26 | speed_t c_ospeed; /* output speed */ |
| 27 | }; | 27 | }; |
| 28 | 28 | ||
| 29 | /* Alpha has identical termios and termios2 */ | ||
| 30 | |||
| 31 | struct termios2 { | ||
| 32 | tcflag_t c_iflag; /* input mode flags */ | ||
| 33 | tcflag_t c_oflag; /* output mode flags */ | ||
| 34 | tcflag_t c_cflag; /* control mode flags */ | ||
| 35 | tcflag_t c_lflag; /* local mode flags */ | ||
| 36 | cc_t c_cc[NCCS]; /* control characters */ | ||
| 37 | cc_t c_line; /* line discipline (== c_cc[19]) */ | ||
| 38 | speed_t c_ispeed; /* input speed */ | ||
| 39 | speed_t c_ospeed; /* output speed */ | ||
| 40 | }; | ||
| 41 | |||
| 29 | /* Alpha has matching termios and ktermios */ | 42 | /* Alpha has matching termios and ktermios */ |
| 30 | 43 | ||
| 31 | struct ktermios { | 44 | struct ktermios { |
| @@ -152,6 +165,7 @@ struct ktermios { | |||
| 152 | #define B3000000 00034 | 165 | #define B3000000 00034 |
| 153 | #define B3500000 00035 | 166 | #define B3500000 00035 |
| 154 | #define B4000000 00036 | 167 | #define B4000000 00036 |
| 168 | #define BOTHER 00037 | ||
| 155 | 169 | ||
| 156 | #define CSIZE 00001400 | 170 | #define CSIZE 00001400 |
| 157 | #define CS5 00000000 | 171 | #define CS5 00000000 |
| @@ -169,6 +183,9 @@ struct ktermios { | |||
| 169 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | 183 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ |
| 170 | #define CRTSCTS 020000000000 /* flow control */ | 184 | #define CRTSCTS 020000000000 /* flow control */ |
| 171 | 185 | ||
| 186 | #define CIBAUD 07600000 | ||
| 187 | #define IBSHIFT 16 | ||
| 188 | |||
| 172 | /* c_lflag bits */ | 189 | /* c_lflag bits */ |
| 173 | #define ISIG 0x00000080 | 190 | #define ISIG 0x00000080 |
| 174 | #define ICANON 0x00000100 | 191 | #define ICANON 0x00000100 |
