ia64/linux-2.6.18-xen.hg

annotate drivers/char/rio/daemon.h @ 893:f994bfe9b93b

linux/blktap2: reduce TLB flush scope

c/s 885 added very coarse TLB flushing. Since these flushes always
follow single page updates, single page flushes (when available) are
sufficient.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 04 10:32:57 2009 +0100 (2009-06-04)
parents 831230e53067
children
rev   line source
ian@0 1 /*
ian@0 2 ** -----------------------------------------------------------------------------
ian@0 3 **
ian@0 4 ** Perle Specialix driver for Linux
ian@0 5 ** Ported from existing RIO Driver for SCO sources.
ian@0 6 *
ian@0 7 * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
ian@0 8 *
ian@0 9 * This program is free software; you can redistribute it and/or modify
ian@0 10 * it under the terms of the GNU General Public License as published by
ian@0 11 * the Free Software Foundation; either version 2 of the License, or
ian@0 12 * (at your option) any later version.
ian@0 13 *
ian@0 14 * This program is distributed in the hope that it will be useful,
ian@0 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ian@0 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ian@0 17 * GNU General Public License for more details.
ian@0 18 *
ian@0 19 * You should have received a copy of the GNU General Public License
ian@0 20 * along with this program; if not, write to the Free Software
ian@0 21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
ian@0 22 **
ian@0 23 ** Module : daemon.h
ian@0 24 ** SID : 1.3
ian@0 25 ** Last Modified : 11/6/98 11:34:09
ian@0 26 ** Retrieved : 11/6/98 11:34:21
ian@0 27 **
ian@0 28 ** ident @(#)daemon.h 1.3
ian@0 29 **
ian@0 30 ** -----------------------------------------------------------------------------
ian@0 31 */
ian@0 32
ian@0 33 #ifndef __rio_daemon_h__
ian@0 34 #define __rio_daemon_h__
ian@0 35
ian@0 36 #ifdef SCCS_LABELS
ian@0 37 #ifndef lint
ian@0 38 static char *_daemon_h_sccs_ = "@(#)daemon.h 1.3";
ian@0 39 #endif
ian@0 40 #endif
ian@0 41
ian@0 42
ian@0 43 /*
ian@0 44 ** structures used on /dev/rio
ian@0 45 */
ian@0 46
ian@0 47 struct Error {
ian@0 48 unsigned int Error;
ian@0 49 unsigned int Entry;
ian@0 50 unsigned int Other;
ian@0 51 };
ian@0 52
ian@0 53 struct DownLoad {
ian@0 54 char __user *DataP;
ian@0 55 unsigned int Count;
ian@0 56 unsigned int ProductCode;
ian@0 57 };
ian@0 58
ian@0 59 /*
ian@0 60 ** A few constants....
ian@0 61 */
ian@0 62 #ifndef MAX_VERSION_LEN
ian@0 63 #define MAX_VERSION_LEN 256
ian@0 64 #endif
ian@0 65
ian@0 66 #ifndef MAX_XP_CTRL_LEN
ian@0 67 #define MAX_XP_CTRL_LEN 16 /* ALSO IN PORT.H */
ian@0 68 #endif
ian@0 69
ian@0 70 struct PortSetup {
ian@0 71 unsigned int From; /* Set/Clear XP & IXANY Control from this port.... */
ian@0 72 unsigned int To; /* .... to this port */
ian@0 73 unsigned int XpCps; /* at this speed */
ian@0 74 char XpOn[MAX_XP_CTRL_LEN]; /* this is the start string */
ian@0 75 char XpOff[MAX_XP_CTRL_LEN]; /* this is the stop string */
ian@0 76 u8 IxAny; /* enable/disable IXANY */
ian@0 77 u8 IxOn; /* enable/disable IXON */
ian@0 78 u8 Lock; /* lock port params */
ian@0 79 u8 Store; /* store params across closes */
ian@0 80 u8 Drain; /* close only when drained */
ian@0 81 };
ian@0 82
ian@0 83 struct LpbReq {
ian@0 84 unsigned int Host;
ian@0 85 unsigned int Link;
ian@0 86 struct LPB __user *LpbP;
ian@0 87 };
ian@0 88
ian@0 89 struct RupReq {
ian@0 90 unsigned int HostNum;
ian@0 91 unsigned int RupNum;
ian@0 92 struct RUP __user *RupP;
ian@0 93 };
ian@0 94
ian@0 95 struct PortReq {
ian@0 96 unsigned int SysPort;
ian@0 97 struct Port __user *PortP;
ian@0 98 };
ian@0 99
ian@0 100 struct StreamInfo {
ian@0 101 unsigned int SysPort;
ian@0 102 int RQueue;
ian@0 103 int WQueue;
ian@0 104 };
ian@0 105
ian@0 106 struct HostReq {
ian@0 107 unsigned int HostNum;
ian@0 108 struct Host __user *HostP;
ian@0 109 };
ian@0 110
ian@0 111 struct HostDpRam {
ian@0 112 unsigned int HostNum;
ian@0 113 struct DpRam __user *DpRamP;
ian@0 114 };
ian@0 115
ian@0 116 struct DebugCtrl {
ian@0 117 unsigned int SysPort;
ian@0 118 unsigned int Debug;
ian@0 119 unsigned int Wait;
ian@0 120 };
ian@0 121
ian@0 122 struct MapInfo {
ian@0 123 unsigned int FirstPort; /* 8 ports, starting from this (tty) number */
ian@0 124 unsigned int RtaUnique; /* reside on this RTA (unique number) */
ian@0 125 };
ian@0 126
ian@0 127 struct MapIn {
ian@0 128 unsigned int NumEntries; /* How many port sets are we mapping? */
ian@0 129 struct MapInfo *MapInfoP; /* Pointer to (user space) info */
ian@0 130 };
ian@0 131
ian@0 132 struct SendPack {
ian@0 133 unsigned int PortNum;
ian@0 134 unsigned char Len;
ian@0 135 unsigned char Data[PKT_MAX_DATA_LEN];
ian@0 136 };
ian@0 137
ian@0 138 struct SpecialRupCmd {
ian@0 139 struct PKT Packet;
ian@0 140 unsigned short Host;
ian@0 141 unsigned short RupNum;
ian@0 142 };
ian@0 143
ian@0 144 struct IdentifyRta {
ian@0 145 unsigned long RtaUnique;
ian@0 146 u8 ID;
ian@0 147 };
ian@0 148
ian@0 149 struct KillNeighbour {
ian@0 150 unsigned long UniqueNum;
ian@0 151 u8 Link;
ian@0 152 };
ian@0 153
ian@0 154 struct rioVersion {
ian@0 155 char version[MAX_VERSION_LEN];
ian@0 156 char relid[MAX_VERSION_LEN];
ian@0 157 int buildLevel;
ian@0 158 char buildDate[MAX_VERSION_LEN];
ian@0 159 };
ian@0 160
ian@0 161
ian@0 162 /*
ian@0 163 ** RIOC commands are for the daemon type operations
ian@0 164 **
ian@0 165 ** 09.12.1998 ARG - ESIL 0776 part fix
ian@0 166 ** Definition for 'RIOC' also appears in rioioctl.h, so we'd better do a
ian@0 167 ** #ifndef here first.
ian@0 168 ** rioioctl.h also now has #define 'RIO_QUICK_CHECK' as this ioctl is now
ian@0 169 ** allowed to be used by customers.
ian@0 170 */
ian@0 171 #ifndef RIOC
ian@0 172 #define RIOC ('R'<<8)|('i'<<16)|('o'<<24)
ian@0 173 #endif
ian@0 174
ian@0 175 /*
ian@0 176 ** Boot stuff
ian@0 177 */
ian@0 178 #define RIO_GET_TABLE (RIOC | 100)
ian@0 179 #define RIO_PUT_TABLE (RIOC | 101)
ian@0 180 #define RIO_ASSIGN_RTA (RIOC | 102)
ian@0 181 #define RIO_DELETE_RTA (RIOC | 103)
ian@0 182 #define RIO_HOST_FOAD (RIOC | 104)
ian@0 183 #define RIO_QUICK_CHECK (RIOC | 105)
ian@0 184 #define RIO_SIGNALS_ON (RIOC | 106)
ian@0 185 #define RIO_SIGNALS_OFF (RIOC | 107)
ian@0 186 #define RIO_CHANGE_NAME (RIOC | 108)
ian@0 187 #define RIO_DOWNLOAD (RIOC | 109)
ian@0 188 #define RIO_GET_LOG (RIOC | 110)
ian@0 189 #define RIO_SETUP_PORTS (RIOC | 111)
ian@0 190 #define RIO_ALL_MODEM (RIOC | 112)
ian@0 191
ian@0 192 /*
ian@0 193 ** card state, debug stuff
ian@0 194 */
ian@0 195 #define RIO_NUM_HOSTS (RIOC | 120)
ian@0 196 #define RIO_HOST_LPB (RIOC | 121)
ian@0 197 #define RIO_HOST_RUP (RIOC | 122)
ian@0 198 #define RIO_HOST_PORT (RIOC | 123)
ian@0 199 #define RIO_PARMS (RIOC | 124)
ian@0 200 #define RIO_HOST_REQ (RIOC | 125)
ian@0 201 #define RIO_READ_CONFIG (RIOC | 126)
ian@0 202 #define RIO_SET_CONFIG (RIOC | 127)
ian@0 203 #define RIO_VERSID (RIOC | 128)
ian@0 204 #define RIO_FLAGS (RIOC | 129)
ian@0 205 #define RIO_SETDEBUG (RIOC | 130)
ian@0 206 #define RIO_GETDEBUG (RIOC | 131)
ian@0 207 #define RIO_READ_LEVELS (RIOC | 132)
ian@0 208 #define RIO_SET_FAST_BUS (RIOC | 133)
ian@0 209 #define RIO_SET_SLOW_BUS (RIOC | 134)
ian@0 210 #define RIO_SET_BYTE_MODE (RIOC | 135)
ian@0 211 #define RIO_SET_WORD_MODE (RIOC | 136)
ian@0 212 #define RIO_STREAM_INFO (RIOC | 137)
ian@0 213 #define RIO_START_POLLER (RIOC | 138)
ian@0 214 #define RIO_STOP_POLLER (RIOC | 139)
ian@0 215 #define RIO_LAST_ERROR (RIOC | 140)
ian@0 216 #define RIO_TICK (RIOC | 141)
ian@0 217 #define RIO_TOCK (RIOC | 241) /* I did this on purpose, you know. */
ian@0 218 #define RIO_SEND_PACKET (RIOC | 142)
ian@0 219 #define RIO_SET_BUSY (RIOC | 143)
ian@0 220 #define SPECIAL_RUP_CMD (RIOC | 144)
ian@0 221 #define RIO_FOAD_RTA (RIOC | 145)
ian@0 222 #define RIO_ZOMBIE_RTA (RIOC | 146)
ian@0 223 #define RIO_IDENTIFY_RTA (RIOC | 147)
ian@0 224 #define RIO_KILL_NEIGHBOUR (RIOC | 148)
ian@0 225 #define RIO_DEBUG_MEM (RIOC | 149)
ian@0 226 /*
ian@0 227 ** 150 - 167 used..... See below
ian@0 228 */
ian@0 229 #define RIO_GET_PORT_SETUP (RIOC | 168)
ian@0 230 #define RIO_RESUME (RIOC | 169)
ian@0 231 #define RIO_MESG (RIOC | 170)
ian@0 232 #define RIO_NO_MESG (RIOC | 171)
ian@0 233 #define RIO_WHAT_MESG (RIOC | 172)
ian@0 234 #define RIO_HOST_DPRAM (RIOC | 173)
ian@0 235 #define RIO_MAP_B50_TO_50 (RIOC | 174)
ian@0 236 #define RIO_MAP_B50_TO_57600 (RIOC | 175)
ian@0 237 #define RIO_MAP_B110_TO_110 (RIOC | 176)
ian@0 238 #define RIO_MAP_B110_TO_115200 (RIOC | 177)
ian@0 239 #define RIO_GET_PORT_PARAMS (RIOC | 178)
ian@0 240 #define RIO_SET_PORT_PARAMS (RIOC | 179)
ian@0 241 #define RIO_GET_PORT_TTY (RIOC | 180)
ian@0 242 #define RIO_SET_PORT_TTY (RIOC | 181)
ian@0 243 #define RIO_SYSLOG_ONLY (RIOC | 182)
ian@0 244 #define RIO_SYSLOG_CONS (RIOC | 183)
ian@0 245 #define RIO_CONS_ONLY (RIOC | 184)
ian@0 246 #define RIO_BLOCK_OPENS (RIOC | 185)
ian@0 247
ian@0 248 /*
ian@0 249 ** 02.03.1999 ARG - ESIL 0820 fix :
ian@0 250 ** RIOBootMode is no longer use by the driver, so these ioctls
ian@0 251 ** are now obsolete :
ian@0 252 **
ian@0 253 #define RIO_GET_BOOT_MODE (RIOC | 186)
ian@0 254 #define RIO_SET_BOOT_MODE (RIOC | 187)
ian@0 255 **
ian@0 256 */
ian@0 257
ian@0 258 #define RIO_MEM_DUMP (RIOC | 189)
ian@0 259 #define RIO_READ_REGISTER (RIOC | 190)
ian@0 260 #define RIO_GET_MODTYPE (RIOC | 191)
ian@0 261 #define RIO_SET_TIMER (RIOC | 192)
ian@0 262 #define RIO_READ_CHECK (RIOC | 196)
ian@0 263 #define RIO_WAITING_FOR_RESTART (RIOC | 197)
ian@0 264 #define RIO_BIND_RTA (RIOC | 198)
ian@0 265 #define RIO_GET_BINDINGS (RIOC | 199)
ian@0 266 #define RIO_PUT_BINDINGS (RIOC | 200)
ian@0 267
ian@0 268 #define RIO_MAKE_DEV (RIOC | 201)
ian@0 269 #define RIO_MINOR (RIOC | 202)
ian@0 270
ian@0 271 #define RIO_IDENTIFY_DRIVER (RIOC | 203)
ian@0 272 #define RIO_DISPLAY_HOST_CFG (RIOC | 204)
ian@0 273
ian@0 274
ian@0 275 /*
ian@0 276 ** MAKE_DEV / MINOR stuff
ian@0 277 */
ian@0 278 #define RIO_DEV_DIRECT 0x0000
ian@0 279 #define RIO_DEV_MODEM 0x0200
ian@0 280 #define RIO_DEV_XPRINT 0x0400
ian@0 281 #define RIO_DEV_MASK 0x0600
ian@0 282
ian@0 283 /*
ian@0 284 ** port management, xprint stuff
ian@0 285 */
ian@0 286 #define rIOCN(N) (RIOC|(N))
ian@0 287 #define rIOCR(N,T) (RIOC|(N))
ian@0 288 #define rIOCW(N,T) (RIOC|(N))
ian@0 289
ian@0 290 #define RIO_GET_XP_ON rIOCR(150,char[16]) /* start xprint string */
ian@0 291 #define RIO_SET_XP_ON rIOCW(151,char[16])
ian@0 292 #define RIO_GET_XP_OFF rIOCR(152,char[16]) /* finish xprint string */
ian@0 293 #define RIO_SET_XP_OFF rIOCW(153,char[16])
ian@0 294 #define RIO_GET_XP_CPS rIOCR(154,int) /* xprint CPS */
ian@0 295 #define RIO_SET_XP_CPS rIOCW(155,int)
ian@0 296 #define RIO_GET_IXANY rIOCR(156,int) /* ixany allowed? */
ian@0 297 #define RIO_SET_IXANY rIOCW(157,int)
ian@0 298 #define RIO_SET_IXANY_ON rIOCN(158) /* allow ixany */
ian@0 299 #define RIO_SET_IXANY_OFF rIOCN(159) /* disallow ixany */
ian@0 300 #define RIO_GET_MODEM rIOCR(160,int) /* port is modem/direct line? */
ian@0 301 #define RIO_SET_MODEM rIOCW(161,int)
ian@0 302 #define RIO_SET_MODEM_ON rIOCN(162) /* port is a modem */
ian@0 303 #define RIO_SET_MODEM_OFF rIOCN(163) /* port is direct */
ian@0 304 #define RIO_GET_IXON rIOCR(164,int) /* ixon allowed? */
ian@0 305 #define RIO_SET_IXON rIOCW(165,int)
ian@0 306 #define RIO_SET_IXON_ON rIOCN(166) /* allow ixon */
ian@0 307 #define RIO_SET_IXON_OFF rIOCN(167) /* disallow ixon */
ian@0 308
ian@0 309 #define RIO_GET_SIVIEW ((('s')<<8) | 106) /* backwards compatible with SI */
ian@0 310
ian@0 311 #define RIO_IOCTL_UNKNOWN -2
ian@0 312
ian@0 313 #endif