svn will drive me nuts, part 1/x
[reactos.git] / drivers / storage / scsiport / stubs.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Storage Stack
4 * FILE: drivers/storage/scsiport/stubs.c
5 * PURPOSE: SCSI port driver
6 * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
7 */
8
9 /* INCLUDES *****************************************************************/
10
11 #include <ntddk.h>
12 #include <srb.h>
13
14 #define NDEBUG
15 #include <debug.h>
16
17 #ifdef _MSC_VER
18 #define DDKAPI
19 #endif
20
21 SCSI_PHYSICAL_ADDRESS
22 DDKAPI
23 ScsiPortConvertUlongToPhysicalAddress(
24 IN ULONG UlongAddress)
25 {
26 return RtlConvertUlongToLargeInteger(UlongAddress);
27 }
28
29 VOID
30 DDKAPI
31 ScsiPortReadPortBufferUchar(
32 IN PUCHAR Port,
33 IN PUCHAR Buffer,
34 IN ULONG Count)
35 {
36 READ_PORT_BUFFER_UCHAR(Port, Buffer, Count);
37 }
38
39 VOID
40 DDKAPI
41 ScsiPortReadPortBufferUshort(
42 IN PUSHORT Port,
43 IN PUSHORT Buffer,
44 IN ULONG Count)
45 {
46 READ_PORT_BUFFER_USHORT(Port, Buffer, Count);
47 }
48
49 VOID
50 DDKAPI
51 ScsiPortReadPortBufferUlong(
52 IN PULONG Port,
53 IN PULONG Buffer,
54 IN ULONG Count)
55 {
56 READ_PORT_BUFFER_ULONG(Port, Buffer, Count);
57 }
58
59 UCHAR
60 DDKAPI
61 ScsiPortReadPortUchar(
62 IN PUCHAR Port)
63 {
64 return READ_PORT_UCHAR(Port);
65 }
66
67 USHORT
68 DDKAPI
69 ScsiPortReadPortUshort(
70 IN PUSHORT Port)
71 {
72 return READ_PORT_USHORT(Port);
73 }
74
75 ULONG
76 DDKAPI
77 ScsiPortReadPortUlong(
78 IN PULONG Port)
79 {
80 return READ_PORT_ULONG(Port);
81 }
82
83 VOID
84 DDKAPI
85 ScsiPortReadRegisterBufferUchar(
86 IN PUCHAR Register,
87 IN PUCHAR Buffer,
88 IN ULONG Count)
89 {
90 READ_REGISTER_BUFFER_UCHAR(Register, Buffer, Count);
91 }
92
93 VOID
94 DDKAPI
95 ScsiPortReadRegisterBufferUshort(
96 IN PUSHORT Register,
97 IN PUSHORT Buffer,
98 IN ULONG Count)
99 {
100 READ_REGISTER_BUFFER_USHORT(Register, Buffer, Count);
101 }
102
103 VOID
104 DDKAPI
105 ScsiPortReadRegisterBufferUlong(
106 IN PULONG Register,
107 IN PULONG Buffer,
108 IN ULONG Count)
109 {
110 READ_REGISTER_BUFFER_ULONG(Register, Buffer, Count);
111 }
112
113 UCHAR
114 DDKAPI
115 ScsiPortReadRegisterUchar(
116 IN PUCHAR Register)
117 {
118 return READ_REGISTER_UCHAR(Register);
119 }
120
121 USHORT
122 DDKAPI
123 ScsiPortReadRegisterUshort(
124 IN PUSHORT Register)
125 {
126 return READ_REGISTER_USHORT(Register);
127 }
128
129 ULONG
130 DDKAPI
131 ScsiPortReadRegisterUlong(
132 IN PULONG Register)
133 {
134 return READ_REGISTER_ULONG(Register);
135 }
136
137 VOID
138 DDKAPI
139 ScsiPortWritePortBufferUchar(
140 IN PUCHAR Port,
141 IN PUCHAR Buffer,
142 IN ULONG Count)
143 {
144 WRITE_PORT_BUFFER_UCHAR(Port, Buffer, Count);
145 }
146
147 VOID
148 DDKAPI
149 ScsiPortWritePortBufferUshort(
150 IN PUSHORT Port,
151 IN PUSHORT Buffer,
152 IN ULONG Count)
153 {
154 WRITE_PORT_BUFFER_USHORT(Port, Buffer, Count);
155 }
156
157 VOID
158 DDKAPI
159 ScsiPortWritePortBufferUlong(
160 IN PULONG Port,
161 IN PULONG Buffer,
162 IN ULONG Count)
163 {
164 WRITE_PORT_BUFFER_ULONG(Port, Buffer, Count);
165 }
166
167 VOID
168 DDKAPI
169 ScsiPortWritePortUchar(
170 IN PUCHAR Port,
171 IN UCHAR Value)
172 {
173 WRITE_PORT_UCHAR(Port, Value);
174 }
175
176 VOID
177 DDKAPI
178 ScsiPortWritePortUshort(
179 IN PUSHORT Port,
180 IN USHORT Value)
181 {
182 WRITE_PORT_USHORT(Port, Value);
183 }
184
185 VOID
186 DDKAPI
187 ScsiPortWritePortUlong(
188 IN PULONG Port,
189 IN ULONG Value)
190 {
191 WRITE_PORT_ULONG(Port, Value);
192 }
193
194 VOID
195 DDKAPI
196 ScsiPortWriteRegisterBufferUchar(
197 IN PUCHAR Register,
198 IN PUCHAR Buffer,
199 IN ULONG Count)
200 {
201 WRITE_REGISTER_BUFFER_UCHAR(Register, Buffer, Count);
202 }
203
204 VOID
205 DDKAPI
206 ScsiPortWriteRegisterBufferUshort(
207 IN PUSHORT Register,
208 IN PUSHORT Buffer,
209 IN ULONG Count)
210 {
211 WRITE_REGISTER_BUFFER_USHORT(Register, Buffer, Count);
212 }
213
214 VOID
215 DDKAPI
216 ScsiPortWriteRegisterBufferUlong(
217 IN PULONG Register,
218 IN PULONG Buffer,
219 IN ULONG Count)
220 {
221 WRITE_REGISTER_BUFFER_ULONG(Register, Buffer, Count);
222 }
223
224 VOID
225 DDKAPI
226 ScsiPortWriteRegisterUchar(
227 IN PUCHAR Register,
228 IN ULONG Value)
229 {
230 WRITE_REGISTER_UCHAR(Register, Value);
231 }
232
233 VOID
234 DDKAPI
235 ScsiPortWriteRegisterUshort(
236 IN PUSHORT Register,
237 IN USHORT Value)
238 {
239 WRITE_REGISTER_USHORT(Register, Value);
240 }
241
242 VOID
243 DDKAPI
244 ScsiPortWriteRegisterUlong(
245 IN PULONG Register,
246 IN ULONG Value)
247 {
248 WRITE_REGISTER_ULONG(Register, Value);
249 }
250