78ed81a3 |
1 | /* |
2 | * Contributed by HD Associates (hd@world.std.com). |
3 | * Copyright (c) 1992, 1993 HD Associates |
4 | * |
5 | * Berkeley style copyright. I've just snarfed it out of stdio.h: |
6 | * |
7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions |
9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. |
15 | * 3. All advertising materials mentioning features or use of this software |
16 | * must display the following acknowledgement: |
17 | * This product includes software developed by the University of |
18 | * California, Berkeley and its contributors. |
19 | * 4. Neither the name of the University nor the names of its contributors |
20 | * may be used to endorse or promote products derived from this software |
21 | * without specific prior written permission. |
22 | * |
23 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
24 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
25 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
26 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
27 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
28 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
29 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
30 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
31 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
32 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
33 | * SUCH DAMAGE. |
34 | * |
35 | * from: @(#)stdio.h 5.17 (Berkeley) 6/3/91 |
36 | * $Id$ |
37 | */ |
38 | |
39 | /* |
40 | * SGI dsreq.h clone derived from the man page. |
41 | * On SGI this header is in usr/include/sys. |
42 | */ |
43 | |
44 | #ifndef _SYS_SGIO_H_ |
45 | #define _SYS_SGIO_H_ |
46 | |
47 | #include <sys/types.h> |
48 | #include <sys/ioctl.h> |
49 | |
50 | typedef struct dsreq { |
51 | u_long ds_flags; |
52 | u_long ds_time; |
53 | |
54 | u_long ds_private; |
55 | |
56 | caddr_t ds_cmdbuf; |
57 | u_char ds_cmdlen; |
58 | |
59 | caddr_t ds_databuf; |
60 | u_long ds_datalen; |
61 | |
62 | caddr_t ds_sensebuf; |
63 | u_char ds_senselen; |
64 | |
65 | u_char ds_ret; |
66 | u_char ds_status; |
67 | u_char ds_msg; |
68 | u_char ds_cmdsent; |
69 | u_long ds_datasent; |
70 | u_char ds_sensesent; |
71 | } dsreq_t; |
72 | |
73 | #define DS_ENTER _IOWR('d', 1, struct dsreq) |
74 | #define DS_DISCONNECT _IOW('d', 2, int) |
75 | #define DS_SYNC _IOW('d', 3, int) |
76 | #define DS_TARGET _IOW('d', 4, int) |
77 | |
78 | /* Data transfer: |
79 | */ |
80 | #define DSRQ_READ 0x00000001 |
81 | #define DSRQ_WRITE 0x00000002 |
82 | #define DSRQ_IOV 0x00000004 |
83 | #define DSRQ_BUF 0x00000008 |
84 | |
85 | /* devscsi options: |
86 | */ |
87 | #define DSRQ_ASYNC 0x00000010 |
88 | #define DSRQ_SENSE 0x00000020 |
89 | #define DSRQ_TARGET 0x00000040 |
90 | |
91 | /* select options: |
92 | */ |
93 | #define DSRQ_SELATN 0x00000080 |
94 | #define DSRQ_DISC 0x00000100 |
95 | #define DSRQ_SYNXFR 0x00000200 |
96 | #define DSRQ_SELMSG 0x00000400 |
97 | |
98 | /* progress/continuation callbacs: |
99 | */ |
100 | #define DSRQ_CALL 0x00000800 |
101 | #define DSRQ_ACKH 0x00001000 |
102 | #define DSRQ_ATNH 0x00002000 |
103 | #define DSRQ_ABORT 0x00004000 |
104 | |
105 | /* Host options (non-portable): |
106 | */ |
107 | #define DSRQ_TRACE 0x00008000 |
108 | #define DSRQ_PRINT 0x00010000 |
109 | #define DSRQ_CTRL1 0x00020000 |
110 | #define DSRQ_CTRL2 0x00040000 |
111 | |
112 | /* Additional flags: |
113 | */ |
114 | #define DSRQ_MIXRDWR 0x00080000 |
115 | |
116 | #define DSRT_OK 0 |
117 | |
118 | #define DSRT_DEVSCSI 1 |
119 | #define DSRT_MULT 2 |
120 | #define DSRT_CANCEL 3 |
121 | #define DSRT_REVCODE 4 |
122 | #define DSRT_AGAIN 5 |
123 | #define DSRT_UNIMPL 6 |
124 | |
125 | #define DSRT_HOST 7 |
126 | #define DSRT_NOSEL 8 |
127 | #define DSRT_SHORT 9 |
128 | #define DSRT_SENSE 10 |
129 | #define DSRT_NOSENSE 11 |
130 | #define DSRT_TIMEOUT 12 |
131 | #define DSRT_LONG 13 |
132 | |
133 | #define DSRT_PROTO 14 |
134 | #define DSRT_EBSY 15 |
135 | #define DSRT_REJECT 16 |
136 | #define DSRT_PARITY 17 |
137 | #define DSRT_MEMORY 18 |
138 | #define DSRT_CMDO 19 |
139 | #define DSRT_STAI 20 |
140 | |
141 | #ifdef BRAINDEAD |
142 | /* BUG: This does not belong here, |
143 | * but I don't want to break my code; it will be moved out |
144 | * in the near future. |
145 | */ |
146 | |
147 | #define CMDBUF(DS) (DS)->ds_cmdbuf |
148 | #endif |
149 | |
150 | #endif /* _SYS_SGIO_H_ */ |