1 | /** @file
|
---|
2 | Provides the functions to submit Scsi commands defined in SCSI-2 specification for SCSI devices.
|
---|
3 |
|
---|
4 | This library class provides the functions to submit SCSI commands defined in SCSI-2 specification
|
---|
5 | for hard drive, CD and DVD devices that are the most common SCSI boot targets used by UEFI platforms.
|
---|
6 | This library class depends on SCSI I/O Protocol defined in UEFI Specification and SCSI-2 industry standard.
|
---|
7 |
|
---|
8 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
---|
9 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
10 |
|
---|
11 | **/
|
---|
12 |
|
---|
13 | #ifndef __SCSI_LIB_H__
|
---|
14 | #define __SCSI_LIB_H__
|
---|
15 |
|
---|
16 | #include <Protocol/ScsiIo.h>
|
---|
17 |
|
---|
18 | /**
|
---|
19 | Execute Test Unit Ready SCSI command on a specific SCSI target.
|
---|
20 |
|
---|
21 | Executes the Test Unit Ready command on the SCSI target specified by ScsiIo.
|
---|
22 | If Timeout is zero, then this function waits indefinitely for the command to complete.
|
---|
23 | If Timeout is greater than zero, then the command is executed and will timeout after Timeout 100 ns units.
|
---|
24 | If ScsiIo is NULL, then ASSERT().
|
---|
25 | If SenseDataLength is NULL, then ASSERT().
|
---|
26 | If HostAdapterStatus is NULL, then ASSERT().
|
---|
27 | If TargetStatus is NULL, then ASSERT().
|
---|
28 |
|
---|
29 | If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet buffer
|
---|
30 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
31 | gets returned.
|
---|
32 |
|
---|
33 | @param[in] ScsiIo A pointer to the SCSI I/O Protocol instance
|
---|
34 | for the specific SCSI target.
|
---|
35 | @param[in] Timeout The timeout in 100 ns units to use for the execution
|
---|
36 | of this SCSI Request Packet. A Timeout value of
|
---|
37 | zero means that this function will wait indefinitely
|
---|
38 | for the SCSI Request Packet to execute. If Timeout
|
---|
39 | is greater than zero, then this function will return
|
---|
40 | EFI_TIMEOUT if the time required to execute the SCSI
|
---|
41 | Request Packet is greater than Timeout.
|
---|
42 | @param[in, out] SenseData A pointer to sense data that was generated by
|
---|
43 | the execution of the SCSI Request Packet. This
|
---|
44 | buffer must be allocated by the caller.
|
---|
45 | If SenseDataLength is 0, then this parameter is
|
---|
46 | optional and may be NULL.
|
---|
47 | @param[in, out] SenseDataLength On input, a pointer to the length in bytes of
|
---|
48 | the SenseData buffer. On output, a pointer to
|
---|
49 | the number of bytes written to the SenseData buffer.
|
---|
50 | @param[out] HostAdapterStatus The status of the SCSI Host Controller that produces
|
---|
51 | the SCSI bus containing the SCSI target specified by
|
---|
52 | ScsiIo when the SCSI Request Packet was executed.
|
---|
53 | See the EFI SCSI I/O Protocol in the UEFI Specification
|
---|
54 | for details on the possible return values.
|
---|
55 | @param[out] TargetStatus The status returned by the SCSI target specified
|
---|
56 | by ScsiIo when the SCSI Request Packet was executed
|
---|
57 | on the SCSI Host Controller. See the EFI SCSI I/O
|
---|
58 | Protocol in the UEFI Specification for details on
|
---|
59 | the possible return values.
|
---|
60 |
|
---|
61 | @retval EFI_SUCCESS The command was executed successfully.
|
---|
62 | See HostAdapterStatus, TargetStatus, SenseDataLength,
|
---|
63 | and SenseData in that order for additional status
|
---|
64 | information.
|
---|
65 | @retval EFI_NOT_READY The SCSI Request Packet could not be sent because
|
---|
66 | there are too many SCSI Command Packets already
|
---|
67 | queued. The SCSI Request Packet was not sent, so
|
---|
68 | no additional status information is available.
|
---|
69 | The caller may retry again later.
|
---|
70 | @retval EFI_DEVICE_ERROR A device error occurred while attempting to send
|
---|
71 | SCSI Request Packet. See HostAdapterStatus,
|
---|
72 | TargetStatus, SenseDataLength, and SenseData in that
|
---|
73 | order for additional status information.
|
---|
74 | @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
|
---|
75 | is not supported by the SCSI initiator(i.e., SCSI
|
---|
76 | Host Controller). The SCSI Request Packet was not
|
---|
77 | sent, so no additional status information is available.
|
---|
78 | @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request
|
---|
79 | Packet to execute. See HostAdapterStatus, TargetStatus,
|
---|
80 | SenseDataLength, and SenseData in that order for
|
---|
81 | additional status information.
|
---|
82 | @retval EFI_INVALID_PARAMETER The contents of the SCSI Request Packet are invalid.
|
---|
83 |
|
---|
84 | **/
|
---|
85 | EFI_STATUS
|
---|
86 | EFIAPI
|
---|
87 | ScsiTestUnitReadyCommand (
|
---|
88 | IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
---|
89 | IN UINT64 Timeout,
|
---|
90 | IN OUT VOID *SenseData, OPTIONAL
|
---|
91 | IN OUT UINT8 *SenseDataLength,
|
---|
92 | OUT UINT8 *HostAdapterStatus,
|
---|
93 | OUT UINT8 *TargetStatus
|
---|
94 | );
|
---|
95 |
|
---|
96 |
|
---|
97 | /**
|
---|
98 | Execute Inquiry SCSI command on a specific SCSI target.
|
---|
99 |
|
---|
100 | Executes the Inquiry command on the SCSI target specified by ScsiIo.
|
---|
101 | If Timeout is zero, then this function waits indefinitely for the command to complete.
|
---|
102 | If Timeout is greater than zero, then the command is executed and will timeout after Timeout 100 ns units.
|
---|
103 | If ScsiIo is NULL, then ASSERT().
|
---|
104 | If SenseDataLength is NULL, then ASSERT().
|
---|
105 | If HostAdapterStatus is NULL, then ASSERT().
|
---|
106 | If TargetStatus is NULL, then ASSERT().
|
---|
107 | If InquiryDataLength is NULL, then ASSERT().
|
---|
108 |
|
---|
109 | If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet buffer
|
---|
110 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
111 | gets returned.
|
---|
112 |
|
---|
113 | If InquiryDataLength is non-zero and InquiryDataBuffer is not NULL, InquiryDataBuffer
|
---|
114 | must meet buffer alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise
|
---|
115 | EFI_INVALID_PARAMETER gets returned.
|
---|
116 |
|
---|
117 | @param[in] ScsiIo A pointer to the SCSI I/O Protocol instance
|
---|
118 | for the specific SCSI target.
|
---|
119 | @param[in] Timeout The timeout in 100 ns units to use for the
|
---|
120 | execution of this SCSI Request Packet. A Timeout
|
---|
121 | value of zero means that this function will wait
|
---|
122 | indefinitely for the SCSI Request Packet to execute.
|
---|
123 | If Timeout is greater than zero, then this function
|
---|
124 | will return EFI_TIMEOUT if the time required to
|
---|
125 | execute the SCSI Request Packet is greater than Timeout.
|
---|
126 | @param[in, out] SenseData A pointer to sense data that was generated
|
---|
127 | by the execution of the SCSI Request Packet.
|
---|
128 | This buffer must be allocated by the caller.
|
---|
129 | If SenseDataLength is 0, then this parameter
|
---|
130 | is optional and may be NULL.
|
---|
131 | @param[in, out] SenseDataLength On input, the length in bytes of the SenseData buffer.
|
---|
132 | On output, the number of bytes written to the SenseData buffer.
|
---|
133 | @param[out] HostAdapterStatus The status of the SCSI Host Controller that
|
---|
134 | produces the SCSI bus containing the SCSI
|
---|
135 | target specified by ScsiIo when the SCSI
|
---|
136 | Request Packet was executed. See the EFI
|
---|
137 | SCSI I/O Protocol in the UEFI Specification
|
---|
138 | for details on the possible return values.
|
---|
139 | @param[out] TargetStatus The status returned by the SCSI target specified
|
---|
140 | by ScsiIo when the SCSI Request Packet was
|
---|
141 | executed on the SCSI Host Controller.
|
---|
142 | See the EFI SCSI I/O Protocol in the UEFI
|
---|
143 | Specification for details on the possible
|
---|
144 | return values.
|
---|
145 | @param[in, out] InquiryDataBuffer A pointer to inquiry data that was generated
|
---|
146 | by the execution of the SCSI Request Packet.
|
---|
147 | This buffer must be allocated by the caller.
|
---|
148 | If InquiryDataLength is 0, then this parameter
|
---|
149 | is optional and may be NULL.
|
---|
150 | @param[in, out] InquiryDataLength On input, a pointer to the length in bytes
|
---|
151 | of the InquiryDataBuffer buffer.
|
---|
152 | On output, a pointer to the number of bytes
|
---|
153 | written to the InquiryDataBuffer buffer.
|
---|
154 | @param[in] EnableVitalProductData If TRUE, then the supported vital product
|
---|
155 | data is returned in InquiryDataBuffer.
|
---|
156 | If FALSE, then the standard inquiry data is
|
---|
157 | returned in InquiryDataBuffer.
|
---|
158 |
|
---|
159 | @retval EFI_SUCCESS The command was executed successfully. See HostAdapterStatus,
|
---|
160 | TargetStatus, SenseDataLength, and SenseData in that order
|
---|
161 | for additional status information.
|
---|
162 | @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire
|
---|
163 | InquiryDataBuffer could not be transferred. The actual
|
---|
164 | number of bytes transferred is returned in InquiryDataLength.
|
---|
165 | @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there
|
---|
166 | are too many SCSI Command Packets already queued.
|
---|
167 | The SCSI Request Packet was not sent, so no additional
|
---|
168 | status information is available. The caller may retry again later.
|
---|
169 | @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI
|
---|
170 | Request Packet. See HostAdapterStatus, TargetStatus,
|
---|
171 | SenseDataLength, and SenseData in that order for additional
|
---|
172 | status information.
|
---|
173 | @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not
|
---|
174 | supported by the SCSI initiator(i.e., SCSI Host Controller).
|
---|
175 | The SCSI Request Packet was not sent, so no additional
|
---|
176 | status information is available.
|
---|
177 | @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request
|
---|
178 | Packet to execute. See HostAdapterStatus, TargetStatus,
|
---|
179 | SenseDataLength, and SenseData in that order for
|
---|
180 | additional status information.
|
---|
181 | @retval EFI_INVALID_PARAMETER The contents of the SCSI Request Packet are invalid.
|
---|
182 |
|
---|
183 | **/
|
---|
184 | EFI_STATUS
|
---|
185 | EFIAPI
|
---|
186 | ScsiInquiryCommand (
|
---|
187 | IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
---|
188 | IN UINT64 Timeout,
|
---|
189 | IN OUT VOID *SenseData, OPTIONAL
|
---|
190 | IN OUT UINT8 *SenseDataLength,
|
---|
191 | OUT UINT8 *HostAdapterStatus,
|
---|
192 | OUT UINT8 *TargetStatus,
|
---|
193 | IN OUT VOID *InquiryDataBuffer, OPTIONAL
|
---|
194 | IN OUT UINT32 *InquiryDataLength,
|
---|
195 | IN BOOLEAN EnableVitalProductData
|
---|
196 | );
|
---|
197 |
|
---|
198 |
|
---|
199 | /**
|
---|
200 | Execute Inquiry SCSI command on a specific SCSI target.
|
---|
201 |
|
---|
202 | Executes the Inquiry command on the SCSI target specified by ScsiIo.
|
---|
203 | If Timeout is zero, then this function waits indefinitely for the command to complete.
|
---|
204 | If Timeout is greater than zero, then the command is executed and will timeout after Timeout 100 ns units.
|
---|
205 | If ScsiIo is NULL, then ASSERT().
|
---|
206 | If SenseDataLength is NULL, then ASSERT().
|
---|
207 | If HostAdapterStatus is NULL, then ASSERT().
|
---|
208 | If TargetStatus is NULL, then ASSERT().
|
---|
209 | If InquiryDataLength is NULL, then ASSERT().
|
---|
210 |
|
---|
211 | If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet buffer
|
---|
212 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
213 | gets returned.
|
---|
214 |
|
---|
215 | If InquiryDataLength is non-zero and InquiryDataBuffer is not NULL, InquiryDataBuffer
|
---|
216 | must meet buffer alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise
|
---|
217 | EFI_INVALID_PARAMETER gets returned.
|
---|
218 |
|
---|
219 | @param[in] ScsiIo A pointer to the SCSI I/O Protocol instance
|
---|
220 | for the specific SCSI target.
|
---|
221 | @param[in] Timeout The timeout in 100 ns units to use for the
|
---|
222 | execution of this SCSI Request Packet. A Timeout
|
---|
223 | value of zero means that this function will wait
|
---|
224 | indefinitely for the SCSI Request Packet to execute.
|
---|
225 | If Timeout is greater than zero, then this function
|
---|
226 | will return EFI_TIMEOUT if the time required to
|
---|
227 | execute the SCSI Request Packet is greater than Timeout.
|
---|
228 | @param[in, out] SenseData A pointer to sense data that was generated
|
---|
229 | by the execution of the SCSI Request Packet.
|
---|
230 | This buffer must be allocated by the caller.
|
---|
231 | If SenseDataLength is 0, then this parameter
|
---|
232 | is optional and may be NULL.
|
---|
233 | @param[in, out] SenseDataLength On input, the length in bytes of the SenseData buffer.
|
---|
234 | On output, the number of bytes written to the SenseData buffer.
|
---|
235 | @param[out] HostAdapterStatus The status of the SCSI Host Controller that
|
---|
236 | produces the SCSI bus containing the SCSI
|
---|
237 | target specified by ScsiIo when the SCSI
|
---|
238 | Request Packet was executed. See the EFI
|
---|
239 | SCSI I/O Protocol in the UEFI Specification
|
---|
240 | for details on the possible return values.
|
---|
241 | @param[out] TargetStatus The status returned by the SCSI target specified
|
---|
242 | by ScsiIo when the SCSI Request Packet was
|
---|
243 | executed on the SCSI Host Controller.
|
---|
244 | See the EFI SCSI I/O Protocol in the UEFI
|
---|
245 | Specification for details on the possible
|
---|
246 | return values.
|
---|
247 | @param[in, out] InquiryDataBuffer A pointer to inquiry data that was generated
|
---|
248 | by the execution of the SCSI Request Packet.
|
---|
249 | This buffer must be allocated by the caller.
|
---|
250 | If InquiryDataLength is 0, then this parameter
|
---|
251 | is optional and may be NULL.
|
---|
252 | @param[in, out] InquiryDataLength On input, a pointer to the length in bytes
|
---|
253 | of the InquiryDataBuffer buffer.
|
---|
254 | On output, a pointer to the number of bytes
|
---|
255 | written to the InquiryDataBuffer buffer.
|
---|
256 | @param[in] EnableVitalProductData If TRUE, then the supported vital product
|
---|
257 | data for the PageCode is returned in InquiryDataBuffer.
|
---|
258 | If FALSE, then the standard inquiry data is
|
---|
259 | returned in InquiryDataBuffer and PageCode is ignored.
|
---|
260 | @param[in] PageCode The page code of the vital product data.
|
---|
261 | It's ignored if EnableVitalProductData is FALSE.
|
---|
262 |
|
---|
263 | @retval EFI_SUCCESS The command executed successfully. See HostAdapterStatus,
|
---|
264 | TargetStatus, SenseDataLength, and SenseData in that order
|
---|
265 | for additional status information.
|
---|
266 | @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire
|
---|
267 | InquiryDataBuffer could not be transferred. The actual
|
---|
268 | number of bytes transferred is returned in InquiryDataLength.
|
---|
269 | @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there
|
---|
270 | are too many SCSI Command Packets already queued.
|
---|
271 | The SCSI Request Packet was not sent, so no additional
|
---|
272 | status information is available. The caller may retry again later.
|
---|
273 | @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI
|
---|
274 | Request Packet. See HostAdapterStatus, TargetStatus,
|
---|
275 | SenseDataLength, and SenseData in that order for additional
|
---|
276 | status information.
|
---|
277 | @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not
|
---|
278 | supported by the SCSI initiator(i.e., SCSI Host Controller).
|
---|
279 | The SCSI Request Packet was not sent, so no additional
|
---|
280 | status information is available.
|
---|
281 | @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request
|
---|
282 | Packet to execute. See HostAdapterStatus, TargetStatus,
|
---|
283 | SenseDataLength, and SenseData in that order for
|
---|
284 | additional status information.
|
---|
285 | @retval EFI_INVALID_PARAMETER The contents of the SCSI Request Packet are invalid.
|
---|
286 |
|
---|
287 | **/
|
---|
288 | EFI_STATUS
|
---|
289 | EFIAPI
|
---|
290 | ScsiInquiryCommandEx (
|
---|
291 | IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
---|
292 | IN UINT64 Timeout,
|
---|
293 | IN OUT VOID *SenseData, OPTIONAL
|
---|
294 | IN OUT UINT8 *SenseDataLength,
|
---|
295 | OUT UINT8 *HostAdapterStatus,
|
---|
296 | OUT UINT8 *TargetStatus,
|
---|
297 | IN OUT VOID *InquiryDataBuffer, OPTIONAL
|
---|
298 | IN OUT UINT32 *InquiryDataLength,
|
---|
299 | IN BOOLEAN EnableVitalProductData,
|
---|
300 | IN UINT8 PageCode
|
---|
301 | );
|
---|
302 |
|
---|
303 |
|
---|
304 | /**
|
---|
305 | Execute Mode Sense(10) SCSI command on a specific SCSI target.
|
---|
306 |
|
---|
307 | Executes the SCSI Mode Sense(10) command on the SCSI target specified by ScsiIo.
|
---|
308 | If Timeout is zero, then this function waits indefinitely for the command to complete.
|
---|
309 | If Timeout is greater than zero, then the command is executed and will timeout
|
---|
310 | after Timeout 100 ns units. The DBDField, PageControl, and PageCode parameters
|
---|
311 | are used to construct the CDB for this SCSI command.
|
---|
312 | If ScsiIo is NULL, then ASSERT().
|
---|
313 | If SenseDataLength is NULL, then ASSERT().
|
---|
314 | If HostAdapterStatus is NULL, then ASSERT().
|
---|
315 | If TargetStatus is NULL, then ASSERT().
|
---|
316 | If DataLength is NULL, then ASSERT().
|
---|
317 |
|
---|
318 | If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet buffer
|
---|
319 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
320 | gets returned.
|
---|
321 |
|
---|
322 | If DataLength is non-zero and DataBuffer is not NULL, DataBuffer must meet buffer
|
---|
323 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
324 | gets returned.
|
---|
325 |
|
---|
326 | @param[in] ScsiIo A pointer to the SCSI I/O Protocol instance
|
---|
327 | for the specific SCSI target.
|
---|
328 | @param[in] Timeout The timeout in 100 ns units to use for the
|
---|
329 | execution of this SCSI Request Packet. A Timeout
|
---|
330 | value of zero means that this function will wait
|
---|
331 | indefinitely for the SCSI Request Packet to execute.
|
---|
332 | If Timeout is greater than zero, then this function
|
---|
333 | will return EFI_TIMEOUT if the time required to
|
---|
334 | execute the SCSI Request Packet is greater than Timeout.
|
---|
335 | @param[in, out] SenseData A pointer to sense data that was generated
|
---|
336 | by the execution of the SCSI Request Packet.
|
---|
337 | This buffer must be allocated by the caller.
|
---|
338 | If SenseDataLength is 0, then this parameter
|
---|
339 | is optional and may be NULL.
|
---|
340 | @param[in, out] SenseDataLength On input, the length in bytes of the SenseData buffer.
|
---|
341 | On output, the number of bytes written to the SenseData buffer.
|
---|
342 | @param[out] HostAdapterStatus The status of the SCSI Host Controller that
|
---|
343 | produces the SCSI bus containing the SCSI target
|
---|
344 | specified by ScsiIo when the SCSI Request Packet
|
---|
345 | was executed. See the EFI SCSI I/O Protocol in the
|
---|
346 | UEFI Specification for details on the possible
|
---|
347 | return values.
|
---|
348 | @param[out] TargetStatus The status returned by the SCSI target specified
|
---|
349 | by ScsiIo when the SCSI Request Packet was executed
|
---|
350 | on the SCSI Host Controller. See the EFI SCSI
|
---|
351 | I/O Protocol in the UEFI Specification for details
|
---|
352 | on the possible return values.
|
---|
353 | @param[in, out] DataBuffer A pointer to data that was generated by the
|
---|
354 | execution of the SCSI Request Packet. This
|
---|
355 | buffer must be allocated by the caller. If
|
---|
356 | DataLength is 0, then this parameter is optional
|
---|
357 | and may be NULL.
|
---|
358 | @param[in, out] DataLength On input, a pointer to the length in bytes of
|
---|
359 | the DataBuffer buffer. On output, a pointer
|
---|
360 | to the number of bytes written to the DataBuffer
|
---|
361 | buffer.
|
---|
362 | @param[in] DBDField Specifies the DBD field of the CDB for this SCSI Command.
|
---|
363 | @param[in] PageControl Specifies the PC field of the CDB for this SCSI Command.
|
---|
364 | @param[in] PageCode Specifies the Page Control field of the CDB for this SCSI Command.
|
---|
365 |
|
---|
366 | @retval EFI_SUCCESS The command was executed successfully.
|
---|
367 | See HostAdapterStatus, TargetStatus, SenseDataLength,
|
---|
368 | and SenseData in that order for additional status information.
|
---|
369 | @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the
|
---|
370 | entire DataBuffer could not be transferred.
|
---|
371 | The actual number of bytes transferred is returned
|
---|
372 | in DataLength.
|
---|
373 | @retval EFI_NOT_READY The SCSI Request Packet could not be sent because
|
---|
374 | there are too many SCSI Command Packets already queued.
|
---|
375 | The SCSI Request Packet was not sent, so no additional
|
---|
376 | status information is available. The caller may retry
|
---|
377 | again later.
|
---|
378 | @retval EFI_DEVICE_ERROR A device error occurred while attempting to send
|
---|
379 | SCSI Request Packet. See HostAdapterStatus, TargetStatus,
|
---|
380 | SenseDataLength, and SenseData in that order for
|
---|
381 | additional status information.
|
---|
382 | @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
|
---|
383 | is not supported by the SCSI initiator(i.e., SCSI
|
---|
384 | Host Controller). The SCSI Request Packet was not
|
---|
385 | sent, so no additional status information is available.
|
---|
386 | @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI
|
---|
387 | Request Packet to execute. See HostAdapterStatus,
|
---|
388 | TargetStatus, SenseDataLength, and SenseData in that
|
---|
389 | order for additional status information.
|
---|
390 | @retval EFI_INVALID_PARAMETER The contents of the SCSI Request Packet are invalid.
|
---|
391 |
|
---|
392 | **/
|
---|
393 | EFI_STATUS
|
---|
394 | EFIAPI
|
---|
395 | ScsiModeSense10Command (
|
---|
396 | IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
---|
397 | IN UINT64 Timeout,
|
---|
398 | IN OUT VOID *SenseData, OPTIONAL
|
---|
399 | IN OUT UINT8 *SenseDataLength,
|
---|
400 | OUT UINT8 *HostAdapterStatus,
|
---|
401 | OUT UINT8 *TargetStatus,
|
---|
402 | IN OUT VOID *DataBuffer, OPTIONAL
|
---|
403 | IN OUT UINT32 *DataLength,
|
---|
404 | IN UINT8 DBDField, OPTIONAL
|
---|
405 | IN UINT8 PageControl,
|
---|
406 | IN UINT8 PageCode
|
---|
407 | );
|
---|
408 |
|
---|
409 |
|
---|
410 |
|
---|
411 | /**
|
---|
412 | Execute Request Sense SCSI command on a specific SCSI target.
|
---|
413 |
|
---|
414 | Executes the Request Sense command on the SCSI target specified by ScsiIo.
|
---|
415 | If Timeout is zero, then this function waits indefinitely for the command to complete.
|
---|
416 | If Timeout is greater than zero, then the command is executed and will timeout after Timeout 100 ns units.
|
---|
417 | If ScsiIo is NULL, then ASSERT().
|
---|
418 | If SenseDataLength is NULL, then ASSERT().
|
---|
419 | If HostAdapterStatus is NULL, then ASSERT().
|
---|
420 | If TargetStatus is NULL, then ASSERT().
|
---|
421 |
|
---|
422 | If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet buffer
|
---|
423 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
424 | gets returned.
|
---|
425 |
|
---|
426 | @param[in] ScsiIo A pointer to SCSI IO protocol.
|
---|
427 | @param[in] Timeout The length of timeout period.
|
---|
428 | @param[in, out] SenseData A pointer to output sense data.
|
---|
429 | @param[in, out] SenseDataLength The length of output sense data.
|
---|
430 | @param[out] HostAdapterStatus The status of Host Adapter.
|
---|
431 | @param[out] TargetStatus The status of the target.
|
---|
432 |
|
---|
433 | @retval EFI_SUCCESS Command is executed successfully.
|
---|
434 | @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are
|
---|
435 | too many SCSI Command Packets already queued.
|
---|
436 | @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.
|
---|
437 | @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by
|
---|
438 | the SCSI initiator(i.e., SCSI Host Controller)
|
---|
439 | @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
|
---|
440 | @retval EFI_INVALID_PARAMETER The contents of the SCSI Request Packet are invalid.
|
---|
441 |
|
---|
442 | **/
|
---|
443 | EFI_STATUS
|
---|
444 | EFIAPI
|
---|
445 | ScsiRequestSenseCommand (
|
---|
446 | IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
---|
447 | IN UINT64 Timeout,
|
---|
448 | IN OUT VOID *SenseData, OPTIONAL
|
---|
449 | IN OUT UINT8 *SenseDataLength,
|
---|
450 | OUT UINT8 *HostAdapterStatus,
|
---|
451 | OUT UINT8 *TargetStatus
|
---|
452 | );
|
---|
453 |
|
---|
454 |
|
---|
455 | /**
|
---|
456 | Execute Read Capacity SCSI command on a specific SCSI target.
|
---|
457 |
|
---|
458 | Executes the SCSI Read Capacity command on the SCSI target specified by ScsiIo.
|
---|
459 | If Timeout is zero, then this function waits indefinitely for the command to complete.
|
---|
460 | If Timeout is greater than zero, then the command is executed and will timeout after
|
---|
461 | Timeout 100 ns units. The Pmi parameter is used to construct the CDB for this SCSI command.
|
---|
462 | If ScsiIo is NULL, then ASSERT().
|
---|
463 | If SenseDataLength is NULL, then ASSERT().
|
---|
464 | If HostAdapterStatus is NULL, then ASSERT().
|
---|
465 | If TargetStatus is NULL, then ASSERT().
|
---|
466 | If DataLength is NULL, then ASSERT().
|
---|
467 |
|
---|
468 | If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet buffer
|
---|
469 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
470 | gets returned.
|
---|
471 |
|
---|
472 | If DataLength is non-zero and DataBuffer is not NULL, DataBuffer must meet buffer
|
---|
473 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
474 | gets returned.
|
---|
475 |
|
---|
476 | @param[in] ScsiIo A pointer to SCSI IO protocol.
|
---|
477 | @param[in] Timeout The length of timeout period.
|
---|
478 | @param[in, out] SenseData A pointer to output sense data.
|
---|
479 | @param[in, out] SenseDataLength The length of output sense data.
|
---|
480 | @param[out] HostAdapterStatus The status of Host Adapter.
|
---|
481 | @param[out] TargetStatus The status of the target.
|
---|
482 | @param[in, out] DataBuffer A pointer to a data buffer.
|
---|
483 | @param[in, out] DataLength The length of data buffer.
|
---|
484 | @param[in] Pmi Partial medium indicator.
|
---|
485 |
|
---|
486 | @retval EFI_SUCCESS Command is executed successfully.
|
---|
487 | @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire
|
---|
488 | DataBuffer could not be transferred. The actual
|
---|
489 | number of bytes transferred is returned in DataLength.
|
---|
490 | @retval EFI_NOT_READY The SCSI Request Packet could not be sent because
|
---|
491 | there are too many SCSI Command Packets already queued.
|
---|
492 | @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.
|
---|
493 | @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
|
---|
494 | is not supported by the SCSI initiator(i.e., SCSI Host Controller)
|
---|
495 | @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
|
---|
496 | @retval EFI_INVALID_PARAMETER The contents of the SCSI Request Packet are invalid.
|
---|
497 |
|
---|
498 | **/
|
---|
499 | EFI_STATUS
|
---|
500 | EFIAPI
|
---|
501 | ScsiReadCapacityCommand (
|
---|
502 | IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
---|
503 | IN UINT64 Timeout,
|
---|
504 | IN OUT VOID *SenseData, OPTIONAL
|
---|
505 | IN OUT UINT8 *SenseDataLength,
|
---|
506 | OUT UINT8 *HostAdapterStatus,
|
---|
507 | OUT UINT8 *TargetStatus,
|
---|
508 | IN OUT VOID *DataBuffer, OPTIONAL
|
---|
509 | IN OUT UINT32 *DataLength,
|
---|
510 | IN BOOLEAN Pmi
|
---|
511 | );
|
---|
512 |
|
---|
513 |
|
---|
514 | /**
|
---|
515 | Execute Read Capacity SCSI 16 command on a specific SCSI target.
|
---|
516 |
|
---|
517 | Executes the SCSI Read Capacity 16 command on the SCSI target specified by ScsiIo.
|
---|
518 | If Timeout is zero, then this function waits indefinitely for the command to complete.
|
---|
519 | If Timeout is greater than zero, then the command is executed and will timeout after
|
---|
520 | Timeout 100 ns units. The Pmi parameter is used to construct the CDB for this SCSI command.
|
---|
521 | If ScsiIo is NULL, then ASSERT().
|
---|
522 | If SenseDataLength is NULL, then ASSERT().
|
---|
523 | If HostAdapterStatus is NULL, then ASSERT().
|
---|
524 | If TargetStatus is NULL, then ASSERT().
|
---|
525 | If DataLength is NULL, then ASSERT().
|
---|
526 |
|
---|
527 | If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet buffer
|
---|
528 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
529 | gets returned.
|
---|
530 |
|
---|
531 | If DataLength is non-zero and DataBuffer is not NULL, DataBuffer must meet buffer
|
---|
532 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
533 | gets returned.
|
---|
534 |
|
---|
535 | @param[in] ScsiIo A pointer to SCSI IO protocol.
|
---|
536 | @param[in] Timeout The length of timeout period.
|
---|
537 | @param[in, out] SenseData A pointer to output sense data.
|
---|
538 | @param[in, out] SenseDataLength The length of output sense data.
|
---|
539 | @param[out] HostAdapterStatus The status of Host Adapter.
|
---|
540 | @param[out] TargetStatus The status of the target.
|
---|
541 | @param[in, out] DataBuffer A pointer to a data buffer.
|
---|
542 | @param[in, out] DataLength The length of data buffer.
|
---|
543 | @param[in] Pmi Partial medium indicator.
|
---|
544 |
|
---|
545 | @retval EFI_SUCCESS Command is executed successfully.
|
---|
546 | @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire
|
---|
547 | DataBuffer could not be transferred. The actual
|
---|
548 | number of bytes transferred is returned in DataLength.
|
---|
549 | @retval EFI_NOT_READY The SCSI Request Packet could not be sent because
|
---|
550 | there are too many SCSI Command Packets already queued.
|
---|
551 | @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.
|
---|
552 | @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet
|
---|
553 | is not supported by the SCSI initiator(i.e., SCSI Host Controller)
|
---|
554 | @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
|
---|
555 | @retval EFI_INVALID_PARAMETER The contents of the SCSI Request Packet are invalid.
|
---|
556 |
|
---|
557 | **/
|
---|
558 | EFI_STATUS
|
---|
559 | EFIAPI
|
---|
560 | ScsiReadCapacity16Command (
|
---|
561 | IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
---|
562 | IN UINT64 Timeout,
|
---|
563 | IN OUT VOID *SenseData, OPTIONAL
|
---|
564 | IN OUT UINT8 *SenseDataLength,
|
---|
565 | OUT UINT8 *HostAdapterStatus,
|
---|
566 | OUT UINT8 *TargetStatus,
|
---|
567 | IN OUT VOID *DataBuffer, OPTIONAL
|
---|
568 | IN OUT UINT32 *DataLength,
|
---|
569 | IN BOOLEAN Pmi
|
---|
570 | );
|
---|
571 |
|
---|
572 |
|
---|
573 | /**
|
---|
574 | Execute Read(10) SCSI command on a specific SCSI target.
|
---|
575 |
|
---|
576 | Executes the SCSI Read(10) command on the SCSI target specified by ScsiIo.
|
---|
577 | If Timeout is zero, then this function waits indefinitely for the command to complete.
|
---|
578 | If Timeout is greater than zero, then the command is executed and will timeout
|
---|
579 | after Timeout 100 ns units. The StartLba and SectorSize parameters are used to
|
---|
580 | construct the CDB for this SCSI command.
|
---|
581 | If ScsiIo is NULL, then ASSERT().
|
---|
582 | If SenseDataLength is NULL, then ASSERT().
|
---|
583 | If HostAdapterStatus is NULL, then ASSERT().
|
---|
584 | If TargetStatus is NULL, then ASSERT().
|
---|
585 | If DataLength is NULL, then ASSERT().
|
---|
586 |
|
---|
587 | If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet buffer
|
---|
588 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
589 | gets returned.
|
---|
590 |
|
---|
591 | If DataLength is non-zero and DataBuffer is not NULL, DataBuffer must meet buffer
|
---|
592 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
593 | gets returned.
|
---|
594 |
|
---|
595 | @param[in] ScsiIo A pointer to SCSI IO protocol.
|
---|
596 | @param[in] Timeout The length of timeout period.
|
---|
597 | @param[in, out] SenseData A pointer to output sense data.
|
---|
598 | @param[in, out] SenseDataLength The length of output sense data.
|
---|
599 | @param[out] HostAdapterStatus The status of Host Adapter.
|
---|
600 | @param[out] TargetStatus The status of the target.
|
---|
601 | @param[in, out] DataBuffer Read 10 command data.
|
---|
602 | @param[in, out] DataLength The length of data buffer.
|
---|
603 | @param[in] StartLba The start address of LBA.
|
---|
604 | @param[in] SectorSize The number of contiguous logical blocks of data that shall be transferred.
|
---|
605 |
|
---|
606 | @retval EFI_SUCCESS Command is executed successfully.
|
---|
607 | @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire DataBuffer could
|
---|
608 | not be transferred. The actual number of bytes transferred is returned in DataLength.
|
---|
609 | @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many
|
---|
610 | SCSI Command Packets already queued.
|
---|
611 | @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.
|
---|
612 | @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by
|
---|
613 | the SCSI initiator(i.e., SCSI Host Controller)
|
---|
614 | @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
|
---|
615 | @retval EFI_INVALID_PARAMETER The contents of the SCSI Request Packet are invalid.
|
---|
616 |
|
---|
617 | **/
|
---|
618 | EFI_STATUS
|
---|
619 | EFIAPI
|
---|
620 | ScsiRead10Command (
|
---|
621 | IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
---|
622 | IN UINT64 Timeout,
|
---|
623 | IN OUT VOID *SenseData, OPTIONAL
|
---|
624 | IN OUT UINT8 *SenseDataLength,
|
---|
625 | OUT UINT8 *HostAdapterStatus,
|
---|
626 | OUT UINT8 *TargetStatus,
|
---|
627 | IN OUT VOID *DataBuffer, OPTIONAL
|
---|
628 | IN OUT UINT32 *DataLength,
|
---|
629 | IN UINT32 StartLba,
|
---|
630 | IN UINT32 SectorSize
|
---|
631 | );
|
---|
632 |
|
---|
633 |
|
---|
634 | /**
|
---|
635 | Execute Write(10) SCSI command on a specific SCSI target.
|
---|
636 |
|
---|
637 | Executes the SCSI Write(10) command on the SCSI target specified by ScsiIo.
|
---|
638 | If Timeout is zero, then this function waits indefinitely for the command to complete.
|
---|
639 | If Timeout is greater than zero, then the command is executed and will timeout after
|
---|
640 | Timeout 100 ns units. The StartLba and SectorSize parameters are used to construct
|
---|
641 | the CDB for this SCSI command.
|
---|
642 | If ScsiIo is NULL, then ASSERT().
|
---|
643 | If SenseDataLength is NULL, then ASSERT().
|
---|
644 | If HostAdapterStatus is NULL, then ASSERT().
|
---|
645 | If TargetStatus is NULL, then ASSERT().
|
---|
646 | If DataLength is NULL, then ASSERT().
|
---|
647 |
|
---|
648 | If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet buffer
|
---|
649 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
650 | gets returned.
|
---|
651 |
|
---|
652 | If DataLength is non-zero and DataBuffer is not NULL, DataBuffer must meet buffer
|
---|
653 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
654 | gets returned.
|
---|
655 |
|
---|
656 | @param[in] ScsiIo SCSI IO Protocol to use
|
---|
657 | @param[in] Timeout The length of timeout period.
|
---|
658 | @param[in, out] SenseData A pointer to output sense data.
|
---|
659 | @param[in, out] SenseDataLength The length of output sense data.
|
---|
660 | @param[out] HostAdapterStatus The status of Host Adapter.
|
---|
661 | @param[out] TargetStatus The status of the target.
|
---|
662 | @param[in, out] DataBuffer A pointer to a data buffer.
|
---|
663 | @param[in, out] DataLength The length of data buffer.
|
---|
664 | @param[in] StartLba The start address of LBA.
|
---|
665 | @param[in] SectorSize The number of contiguous logical blocks of data that shall be transferred.
|
---|
666 |
|
---|
667 | @retval EFI_SUCCESS Command is executed successfully.
|
---|
668 | @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire DataBuffer could
|
---|
669 | not be transferred. The actual number of bytes transferred is returned in DataLength.
|
---|
670 | @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many
|
---|
671 | SCSI Command Packets already queued.
|
---|
672 | @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.
|
---|
673 | @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by
|
---|
674 | the SCSI initiator(i.e., SCSI Host Controller)
|
---|
675 | @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
|
---|
676 | @retval EFI_INVALID_PARAMETER The contents of the SCSI Request Packet are invalid.
|
---|
677 |
|
---|
678 | **/
|
---|
679 | EFI_STATUS
|
---|
680 | EFIAPI
|
---|
681 | ScsiWrite10Command (
|
---|
682 | IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
---|
683 | IN UINT64 Timeout,
|
---|
684 | IN OUT VOID *SenseData, OPTIONAL
|
---|
685 | IN OUT UINT8 *SenseDataLength,
|
---|
686 | OUT UINT8 *HostAdapterStatus,
|
---|
687 | OUT UINT8 *TargetStatus,
|
---|
688 | IN OUT VOID *DataBuffer, OPTIONAL
|
---|
689 | IN OUT UINT32 *DataLength,
|
---|
690 | IN UINT32 StartLba,
|
---|
691 | IN UINT32 SectorSize
|
---|
692 | );
|
---|
693 |
|
---|
694 | /**
|
---|
695 | Execute Read(16) SCSI command on a specific SCSI target.
|
---|
696 |
|
---|
697 | Executes the SCSI Read(16) command on the SCSI target specified by ScsiIo.
|
---|
698 | If Timeout is zero, then this function waits indefinitely for the command to complete.
|
---|
699 | If Timeout is greater than zero, then the command is executed and will timeout
|
---|
700 | after Timeout 100 ns units. The StartLba and SectorSize parameters are used to
|
---|
701 | construct the CDB for this SCSI command.
|
---|
702 | If ScsiIo is NULL, then ASSERT().
|
---|
703 | If SenseDataLength is NULL, then ASSERT().
|
---|
704 | If HostAdapterStatus is NULL, then ASSERT().
|
---|
705 | If TargetStatus is NULL, then ASSERT().
|
---|
706 | If DataLength is NULL, then ASSERT().
|
---|
707 |
|
---|
708 | If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet buffer
|
---|
709 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
710 | gets returned.
|
---|
711 |
|
---|
712 | If DataLength is non-zero and DataBuffer is not NULL, DataBuffer must meet buffer
|
---|
713 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
714 | gets returned.
|
---|
715 |
|
---|
716 | @param[in] ScsiIo A pointer to SCSI IO protocol.
|
---|
717 | @param[in] Timeout The length of timeout period.
|
---|
718 | @param[in, out] SenseData A pointer to output sense data.
|
---|
719 | @param[in, out] SenseDataLength The length of output sense data.
|
---|
720 | @param[out] HostAdapterStatus The status of Host Adapter.
|
---|
721 | @param[out] TargetStatus The status of the target.
|
---|
722 | @param[in, out] DataBuffer Read 16 command data.
|
---|
723 | @param[in, out] DataLength The length of data buffer.
|
---|
724 | @param[in] StartLba The start address of LBA.
|
---|
725 | @param[in] SectorSize The number of contiguous logical blocks of data that shall be transferred.
|
---|
726 |
|
---|
727 | @retval EFI_SUCCESS Command is executed successfully.
|
---|
728 | @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire DataBuffer could
|
---|
729 | not be transferred. The actual number of bytes transferred is returned in DataLength.
|
---|
730 | @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many
|
---|
731 | SCSI Command Packets already queued.
|
---|
732 | @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.
|
---|
733 | @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by
|
---|
734 | the SCSI initiator(i.e., SCSI Host Controller)
|
---|
735 | @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
|
---|
736 | @retval EFI_INVALID_PARAMETER The contents of the SCSI Request Packet are invalid.
|
---|
737 |
|
---|
738 | **/
|
---|
739 | EFI_STATUS
|
---|
740 | EFIAPI
|
---|
741 | ScsiRead16Command (
|
---|
742 | IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
---|
743 | IN UINT64 Timeout,
|
---|
744 | IN OUT VOID *SenseData, OPTIONAL
|
---|
745 | IN OUT UINT8 *SenseDataLength,
|
---|
746 | OUT UINT8 *HostAdapterStatus,
|
---|
747 | OUT UINT8 *TargetStatus,
|
---|
748 | IN OUT VOID *DataBuffer, OPTIONAL
|
---|
749 | IN OUT UINT32 *DataLength,
|
---|
750 | IN UINT64 StartLba,
|
---|
751 | IN UINT32 SectorSize
|
---|
752 | );
|
---|
753 |
|
---|
754 |
|
---|
755 | /**
|
---|
756 | Execute Write(16) SCSI command on a specific SCSI target.
|
---|
757 |
|
---|
758 | Executes the SCSI Write(16) command on the SCSI target specified by ScsiIo.
|
---|
759 | If Timeout is zero, then this function waits indefinitely for the command to complete.
|
---|
760 | If Timeout is greater than zero, then the command is executed and will timeout after
|
---|
761 | Timeout 100 ns units. The StartLba and SectorSize parameters are used to construct
|
---|
762 | the CDB for this SCSI command.
|
---|
763 | If ScsiIo is NULL, then ASSERT().
|
---|
764 | If SenseDataLength is NULL, then ASSERT().
|
---|
765 | If HostAdapterStatus is NULL, then ASSERT().
|
---|
766 | If TargetStatus is NULL, then ASSERT().
|
---|
767 | If DataLength is NULL, then ASSERT().
|
---|
768 |
|
---|
769 | If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet buffer
|
---|
770 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
771 | gets returned.
|
---|
772 |
|
---|
773 | If DataLength is non-zero and DataBuffer is not NULL, DataBuffer must meet buffer
|
---|
774 | alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise EFI_INVALID_PARAMETER
|
---|
775 | gets returned.
|
---|
776 |
|
---|
777 | @param[in] ScsiIo SCSI IO Protocol to use
|
---|
778 | @param[in] Timeout The length of timeout period.
|
---|
779 | @param[in, out] SenseData A pointer to output sense data.
|
---|
780 | @param[in, out] SenseDataLength The length of output sense data.
|
---|
781 | @param[out] HostAdapterStatus The status of Host Adapter.
|
---|
782 | @param[out] TargetStatus The status of the target.
|
---|
783 | @param[in, out] DataBuffer A pointer to a data buffer.
|
---|
784 | @param[in, out] DataLength The length of data buffer.
|
---|
785 | @param[in] StartLba The start address of LBA.
|
---|
786 | @param[in] SectorSize The number of contiguous logical blocks of data that shall be transferred.
|
---|
787 |
|
---|
788 | @retval EFI_SUCCESS Command is executed successfully.
|
---|
789 | @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire DataBuffer could
|
---|
790 | not be transferred. The actual number of bytes transferred is returned in DataLength.
|
---|
791 | @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many
|
---|
792 | SCSI Command Packets already queued.
|
---|
793 | @retval EFI_DEVICE_ERROR A device error occurred while attempting to send SCSI Request Packet.
|
---|
794 | @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by
|
---|
795 | the SCSI initiator(i.e., SCSI Host Controller)
|
---|
796 | @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
|
---|
797 | @retval EFI_INVALID_PARAMETER The contents of the SCSI Request Packet are invalid.
|
---|
798 |
|
---|
799 | **/
|
---|
800 | EFI_STATUS
|
---|
801 | EFIAPI
|
---|
802 | ScsiWrite16Command (
|
---|
803 | IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
---|
804 | IN UINT64 Timeout,
|
---|
805 | IN OUT VOID *SenseData, OPTIONAL
|
---|
806 | IN OUT UINT8 *SenseDataLength,
|
---|
807 | OUT UINT8 *HostAdapterStatus,
|
---|
808 | OUT UINT8 *TargetStatus,
|
---|
809 | IN OUT VOID *DataBuffer, OPTIONAL
|
---|
810 | IN OUT UINT32 *DataLength,
|
---|
811 | IN UINT64 StartLba,
|
---|
812 | IN UINT32 SectorSize
|
---|
813 | );
|
---|
814 |
|
---|
815 |
|
---|
816 | /**
|
---|
817 | Execute blocking/non-blocking Read(10) SCSI command on a specific SCSI
|
---|
818 | target.
|
---|
819 |
|
---|
820 | Executes the SCSI Read(10) command on the SCSI target specified by ScsiIo.
|
---|
821 | When Event is NULL, blocking command will be executed. Otherwise non-blocking
|
---|
822 | command will be executed.
|
---|
823 | For blocking I/O, if Timeout is zero, this function will wait indefinitely
|
---|
824 | for the command to complete. If Timeout is greater than zero, then the
|
---|
825 | command is executed and will timeout after Timeout 100 ns units.
|
---|
826 | For non-blocking I/O, if Timeout is zero, Event will be signaled only after
|
---|
827 | the command to completes. If Timeout is greater than zero, Event will also be
|
---|
828 | signaled after Timeout 100 ns units.
|
---|
829 | The StartLba and SectorSize parameters are used to construct the CDB for this
|
---|
830 | SCSI command.
|
---|
831 |
|
---|
832 | If ScsiIo is NULL, then ASSERT().
|
---|
833 | If SenseDataLength is NULL, then ASSERT().
|
---|
834 | If HostAdapterStatus is NULL, then ASSERT().
|
---|
835 | If TargetStatus is NULL, then ASSERT().
|
---|
836 | If DataLength is NULL, then ASSERT().
|
---|
837 |
|
---|
838 | If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet
|
---|
839 | buffer alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise
|
---|
840 | EFI_INVALID_PARAMETER gets returned.
|
---|
841 |
|
---|
842 | If DataLength is non-zero and DataBuffer is not NULL, DataBuffer must meet
|
---|
843 | buffer alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise
|
---|
844 | EFI_INVALID_PARAMETER gets returned.
|
---|
845 |
|
---|
846 | @param[in] ScsiIo A pointer to SCSI IO protocol.
|
---|
847 | @param[in] Timeout The length of timeout period.
|
---|
848 | @param[in, out] SenseData A pointer to output sense data.
|
---|
849 | @param[in, out] SenseDataLength The length of output sense data.
|
---|
850 | @param[out] HostAdapterStatus The status of Host Adapter.
|
---|
851 | @param[out] TargetStatus The status of the target.
|
---|
852 | @param[in, out] DataBuffer Read 16 command data.
|
---|
853 | @param[in, out] DataLength The length of data buffer.
|
---|
854 | @param[in] StartLba The start address of LBA.
|
---|
855 | @param[in] SectorSize The number of contiguous logical blocks
|
---|
856 | of data that shall be transferred.
|
---|
857 | @param[in] Event If the SCSI target does not support
|
---|
858 | non-blocking I/O, then Event is ignored,
|
---|
859 | and blocking I/O is performed. If Event
|
---|
860 | is NULL, then blocking I/O is performed.
|
---|
861 | If Event is not NULL and non-blocking
|
---|
862 | I/O is supported, then non-blocking I/O
|
---|
863 | is performed, and Event will be signaled
|
---|
864 | when the SCSI Read(10) command
|
---|
865 | completes.
|
---|
866 |
|
---|
867 | @retval EFI_SUCCESS Command is executed successfully.
|
---|
868 | @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed,
|
---|
869 | but the entire DataBuffer could not be
|
---|
870 | transferred. The actual number of bytes
|
---|
871 | transferred is returned in DataLength.
|
---|
872 | @retval EFI_NOT_READY The SCSI Request Packet could not be
|
---|
873 | sent because there are too many SCSI
|
---|
874 | Command Packets already queued.
|
---|
875 | @retval EFI_DEVICE_ERROR A device error occurred while attempting
|
---|
876 | to send SCSI Request Packet.
|
---|
877 | @retval EFI_UNSUPPORTED The command described by the SCSI
|
---|
878 | Request Packet is not supported by the
|
---|
879 | SCSI initiator(i.e., SCSI Host
|
---|
880 | Controller)
|
---|
881 | @retval EFI_TIMEOUT A timeout occurred while waiting for the
|
---|
882 | SCSI Request Packet to execute.
|
---|
883 | @retval EFI_INVALID_PARAMETER The contents of the SCSI Request Packet
|
---|
884 | are invalid.
|
---|
885 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due
|
---|
886 | to a lack of resources.
|
---|
887 |
|
---|
888 | **/
|
---|
889 | EFI_STATUS
|
---|
890 | EFIAPI
|
---|
891 | ScsiRead10CommandEx (
|
---|
892 | IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
---|
893 | IN UINT64 Timeout,
|
---|
894 | IN OUT VOID *SenseData, OPTIONAL
|
---|
895 | IN OUT UINT8 *SenseDataLength,
|
---|
896 | OUT UINT8 *HostAdapterStatus,
|
---|
897 | OUT UINT8 *TargetStatus,
|
---|
898 | IN OUT VOID *DataBuffer, OPTIONAL
|
---|
899 | IN OUT UINT32 *DataLength,
|
---|
900 | IN UINT32 StartLba,
|
---|
901 | IN UINT32 SectorSize,
|
---|
902 | IN EFI_EVENT Event OPTIONAL
|
---|
903 | );
|
---|
904 |
|
---|
905 |
|
---|
906 | /**
|
---|
907 | Execute blocking/non-blocking Write(10) SCSI command on a specific SCSI
|
---|
908 | target.
|
---|
909 |
|
---|
910 | Executes the SCSI Write(10) command on the SCSI target specified by ScsiIo.
|
---|
911 | When Event is NULL, blocking command will be executed. Otherwise non-blocking
|
---|
912 | command will be executed.
|
---|
913 | For blocking I/O, if Timeout is zero, this function will wait indefinitely
|
---|
914 | for the command to complete. If Timeout is greater than zero, then the
|
---|
915 | command is executed and will timeout after Timeout 100 ns units.
|
---|
916 | For non-blocking I/O, if Timeout is zero, Event will be signaled only after
|
---|
917 | the command to completes. If Timeout is greater than zero, Event will also be
|
---|
918 | signaled after Timeout 100 ns units.
|
---|
919 | The StartLba and SectorSize parameters are used to construct the CDB for this
|
---|
920 | SCSI command.
|
---|
921 |
|
---|
922 | If ScsiIo is NULL, then ASSERT().
|
---|
923 | If SenseDataLength is NULL, then ASSERT().
|
---|
924 | If HostAdapterStatus is NULL, then ASSERT().
|
---|
925 | If TargetStatus is NULL, then ASSERT().
|
---|
926 | If DataLength is NULL, then ASSERT().
|
---|
927 |
|
---|
928 | If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet
|
---|
929 | buffer alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise
|
---|
930 | EFI_INVALID_PARAMETER gets returned.
|
---|
931 |
|
---|
932 | If DataLength is non-zero and DataBuffer is not NULL, DataBuffer must meet
|
---|
933 | buffer alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise
|
---|
934 | EFI_INVALID_PARAMETER gets returned.
|
---|
935 |
|
---|
936 | @param[in] ScsiIo SCSI IO Protocol to use
|
---|
937 | @param[in] Timeout The length of timeout period.
|
---|
938 | @param[in, out] SenseData A pointer to output sense data.
|
---|
939 | @param[in, out] SenseDataLength The length of output sense data.
|
---|
940 | @param[out] HostAdapterStatus The status of Host Adapter.
|
---|
941 | @param[out] TargetStatus The status of the target.
|
---|
942 | @param[in, out] DataBuffer A pointer to a data buffer.
|
---|
943 | @param[in, out] DataLength The length of data buffer.
|
---|
944 | @param[in] StartLba The start address of LBA.
|
---|
945 | @param[in] SectorSize The number of contiguous logical blocks
|
---|
946 | of data that shall be transferred.
|
---|
947 | @param[in] Event If the SCSI target does not support
|
---|
948 | non-blocking I/O, then Event is ignored,
|
---|
949 | and blocking I/O is performed. If Event
|
---|
950 | is NULL, then blocking I/O is performed.
|
---|
951 | If Event is not NULL and non-blocking
|
---|
952 | I/O is supported, then non-blocking I/O
|
---|
953 | is performed, and Event will be signaled
|
---|
954 | when the SCSI Write(10) command
|
---|
955 | completes.
|
---|
956 |
|
---|
957 | @retval EFI_SUCCESS Command is executed successfully.
|
---|
958 | @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed,
|
---|
959 | but the entire DataBuffer could not be
|
---|
960 | transferred. The actual number of bytes
|
---|
961 | transferred is returned in DataLength.
|
---|
962 | @retval EFI_NOT_READY The SCSI Request Packet could not be
|
---|
963 | sent because there are too many SCSI
|
---|
964 | Command Packets already queued.
|
---|
965 | @retval EFI_DEVICE_ERROR A device error occurred while attempting
|
---|
966 | to send SCSI Request Packet.
|
---|
967 | @retval EFI_UNSUPPORTED The command described by the SCSI
|
---|
968 | Request Packet is not supported by the
|
---|
969 | SCSI initiator(i.e., SCSI Host
|
---|
970 | Controller)
|
---|
971 | @retval EFI_TIMEOUT A timeout occurred while waiting for the
|
---|
972 | SCSI Request Packet to execute.
|
---|
973 | @retval EFI_INVALID_PARAMETER The contents of the SCSI Request Packet
|
---|
974 | are invalid.
|
---|
975 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due
|
---|
976 | to a lack of resources.
|
---|
977 |
|
---|
978 | **/
|
---|
979 | EFI_STATUS
|
---|
980 | EFIAPI
|
---|
981 | ScsiWrite10CommandEx (
|
---|
982 | IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
---|
983 | IN UINT64 Timeout,
|
---|
984 | IN OUT VOID *SenseData, OPTIONAL
|
---|
985 | IN OUT UINT8 *SenseDataLength,
|
---|
986 | OUT UINT8 *HostAdapterStatus,
|
---|
987 | OUT UINT8 *TargetStatus,
|
---|
988 | IN OUT VOID *DataBuffer, OPTIONAL
|
---|
989 | IN OUT UINT32 *DataLength,
|
---|
990 | IN UINT32 StartLba,
|
---|
991 | IN UINT32 SectorSize,
|
---|
992 | IN EFI_EVENT Event OPTIONAL
|
---|
993 | );
|
---|
994 |
|
---|
995 |
|
---|
996 | /**
|
---|
997 | Execute blocking/non-blocking Read(16) SCSI command on a specific SCSI
|
---|
998 | target.
|
---|
999 |
|
---|
1000 | Executes the SCSI Read(16) command on the SCSI target specified by ScsiIo.
|
---|
1001 | When Event is NULL, blocking command will be executed. Otherwise non-blocking
|
---|
1002 | command will be executed.
|
---|
1003 | For blocking I/O, if Timeout is zero, this function will wait indefinitely
|
---|
1004 | for the command to complete. If Timeout is greater than zero, then the
|
---|
1005 | command is executed and will timeout after Timeout 100 ns units.
|
---|
1006 | For non-blocking I/O, if Timeout is zero, Event will be signaled only after
|
---|
1007 | the command to completes. If Timeout is greater than zero, Event will also be
|
---|
1008 | signaled after Timeout 100 ns units.
|
---|
1009 | The StartLba and SectorSize parameters are used to construct the CDB for this
|
---|
1010 | SCSI command.
|
---|
1011 |
|
---|
1012 | If ScsiIo is NULL, then ASSERT().
|
---|
1013 | If SenseDataLength is NULL, then ASSERT().
|
---|
1014 | If HostAdapterStatus is NULL, then ASSERT().
|
---|
1015 | If TargetStatus is NULL, then ASSERT().
|
---|
1016 | If DataLength is NULL, then ASSERT().
|
---|
1017 |
|
---|
1018 | If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet
|
---|
1019 | buffer alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise
|
---|
1020 | EFI_INVALID_PARAMETER gets returned.
|
---|
1021 |
|
---|
1022 | If DataLength is non-zero and DataBuffer is not NULL, DataBuffer must meet
|
---|
1023 | buffer alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise
|
---|
1024 | EFI_INVALID_PARAMETER gets returned.
|
---|
1025 |
|
---|
1026 | @param[in] ScsiIo A pointer to SCSI IO protocol.
|
---|
1027 | @param[in] Timeout The length of timeout period.
|
---|
1028 | @param[in, out] SenseData A pointer to output sense data.
|
---|
1029 | @param[in, out] SenseDataLength The length of output sense data.
|
---|
1030 | @param[out] HostAdapterStatus The status of Host Adapter.
|
---|
1031 | @param[out] TargetStatus The status of the target.
|
---|
1032 | @param[in, out] DataBuffer Read 16 command data.
|
---|
1033 | @param[in, out] DataLength The length of data buffer.
|
---|
1034 | @param[in] StartLba The start address of LBA.
|
---|
1035 | @param[in] SectorSize The number of contiguous logical blocks
|
---|
1036 | of data that shall be transferred.
|
---|
1037 | @param[in] Event If the SCSI target does not support
|
---|
1038 | non-blocking I/O, then Event is ignored,
|
---|
1039 | and blocking I/O is performed. If Event
|
---|
1040 | is NULL, then blocking I/O is performed.
|
---|
1041 | If Event is not NULL and non-blocking
|
---|
1042 | I/O is supported, then non-blocking I/O
|
---|
1043 | is performed, and Event will be signaled
|
---|
1044 | when the SCSI Read(16) command
|
---|
1045 | completes.
|
---|
1046 |
|
---|
1047 | @retval EFI_SUCCESS Command is executed successfully.
|
---|
1048 | @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed,
|
---|
1049 | but the entire DataBuffer could not be
|
---|
1050 | transferred. The actual number of bytes
|
---|
1051 | transferred is returned in DataLength.
|
---|
1052 | @retval EFI_NOT_READY The SCSI Request Packet could not be
|
---|
1053 | sent because there are too many SCSI
|
---|
1054 | Command Packets already queued.
|
---|
1055 | @retval EFI_DEVICE_ERROR A device error occurred while attempting
|
---|
1056 | to send SCSI Request Packet.
|
---|
1057 | @retval EFI_UNSUPPORTED The command described by the SCSI
|
---|
1058 | Request Packet is not supported by the
|
---|
1059 | SCSI initiator(i.e., SCSI Host
|
---|
1060 | Controller)
|
---|
1061 | @retval EFI_TIMEOUT A timeout occurred while waiting for the
|
---|
1062 | SCSI Request Packet to execute.
|
---|
1063 | @retval EFI_INVALID_PARAMETER The contents of the SCSI Request Packet
|
---|
1064 | are invalid.
|
---|
1065 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due
|
---|
1066 | to a lack of resources.
|
---|
1067 |
|
---|
1068 | **/
|
---|
1069 | EFI_STATUS
|
---|
1070 | EFIAPI
|
---|
1071 | ScsiRead16CommandEx (
|
---|
1072 | IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
---|
1073 | IN UINT64 Timeout,
|
---|
1074 | IN OUT VOID *SenseData, OPTIONAL
|
---|
1075 | IN OUT UINT8 *SenseDataLength,
|
---|
1076 | OUT UINT8 *HostAdapterStatus,
|
---|
1077 | OUT UINT8 *TargetStatus,
|
---|
1078 | IN OUT VOID *DataBuffer, OPTIONAL
|
---|
1079 | IN OUT UINT32 *DataLength,
|
---|
1080 | IN UINT64 StartLba,
|
---|
1081 | IN UINT32 SectorSize,
|
---|
1082 | IN EFI_EVENT Event OPTIONAL
|
---|
1083 | );
|
---|
1084 |
|
---|
1085 |
|
---|
1086 | /**
|
---|
1087 | Execute blocking/non-blocking Write(16) SCSI command on a specific SCSI
|
---|
1088 | target.
|
---|
1089 |
|
---|
1090 | Executes the SCSI Write(16) command on the SCSI target specified by ScsiIo.
|
---|
1091 | When Event is NULL, blocking command will be executed. Otherwise non-blocking
|
---|
1092 | command will be executed.
|
---|
1093 | For blocking I/O, if Timeout is zero, this function will wait indefinitely
|
---|
1094 | for the command to complete. If Timeout is greater than zero, then the
|
---|
1095 | command is executed and will timeout after Timeout 100 ns units.
|
---|
1096 | For non-blocking I/O, if Timeout is zero, Event will be signaled only after
|
---|
1097 | the command to completes. If Timeout is greater than zero, Event will also be
|
---|
1098 | signaled after Timeout 100 ns units.
|
---|
1099 | The StartLba and SectorSize parameters are used to construct the CDB for this
|
---|
1100 | SCSI command.
|
---|
1101 |
|
---|
1102 | If ScsiIo is NULL, then ASSERT().
|
---|
1103 | If SenseDataLength is NULL, then ASSERT().
|
---|
1104 | If HostAdapterStatus is NULL, then ASSERT().
|
---|
1105 | If TargetStatus is NULL, then ASSERT().
|
---|
1106 | If DataLength is NULL, then ASSERT().
|
---|
1107 |
|
---|
1108 | If SenseDataLength is non-zero and SenseData is not NULL, SenseData must meet
|
---|
1109 | buffer alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise
|
---|
1110 | EFI_INVALID_PARAMETER gets returned.
|
---|
1111 |
|
---|
1112 | If DataLength is non-zero and DataBuffer is not NULL, DataBuffer must meet
|
---|
1113 | buffer alignment requirement defined in EFI_SCSI_IO_PROTOCOL. Otherwise
|
---|
1114 | EFI_INVALID_PARAMETER gets returned.
|
---|
1115 |
|
---|
1116 | @param[in] ScsiIo SCSI IO Protocol to use
|
---|
1117 | @param[in] Timeout The length of timeout period.
|
---|
1118 | @param[in, out] SenseData A pointer to output sense data.
|
---|
1119 | @param[in, out] SenseDataLength The length of output sense data.
|
---|
1120 | @param[out] HostAdapterStatus The status of Host Adapter.
|
---|
1121 | @param[out] TargetStatus The status of the target.
|
---|
1122 | @param[in, out] DataBuffer A pointer to a data buffer.
|
---|
1123 | @param[in, out] DataLength The length of data buffer.
|
---|
1124 | @param[in] StartLba The start address of LBA.
|
---|
1125 | @param[in] SectorSize The number of contiguous logical blocks
|
---|
1126 | of data that shall be transferred.
|
---|
1127 | @param[in] Event If the SCSI target does not support
|
---|
1128 | non-blocking I/O, then Event is ignored,
|
---|
1129 | and blocking I/O is performed. If Event
|
---|
1130 | is NULL, then blocking I/O is performed.
|
---|
1131 | If Event is not NULL and non-blocking
|
---|
1132 | I/O is supported, then non-blocking I/O
|
---|
1133 | is performed, and Event will be signaled
|
---|
1134 | when the SCSI Write(16) command
|
---|
1135 | completes.
|
---|
1136 |
|
---|
1137 | @retval EFI_SUCCESS Command is executed successfully.
|
---|
1138 | @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed,
|
---|
1139 | but the entire DataBuffer could not be
|
---|
1140 | transferred. The actual number of bytes
|
---|
1141 | transferred is returned in DataLength.
|
---|
1142 | @retval EFI_NOT_READY The SCSI Request Packet could not be
|
---|
1143 | sent because there are too many SCSI
|
---|
1144 | Command Packets already queued.
|
---|
1145 | @retval EFI_DEVICE_ERROR A device error occurred while attempting
|
---|
1146 | to send SCSI Request Packet.
|
---|
1147 | @retval EFI_UNSUPPORTED The command described by the SCSI
|
---|
1148 | Request Packet is not supported by the
|
---|
1149 | SCSI initiator(i.e., SCSI Host
|
---|
1150 | Controller)
|
---|
1151 | @retval EFI_TIMEOUT A timeout occurred while waiting for the
|
---|
1152 | SCSI Request Packet to execute.
|
---|
1153 | @retval EFI_INVALID_PARAMETER The contents of the SCSI Request Packet
|
---|
1154 | are invalid.
|
---|
1155 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due
|
---|
1156 | to a lack of resources.
|
---|
1157 |
|
---|
1158 | **/
|
---|
1159 | EFI_STATUS
|
---|
1160 | EFIAPI
|
---|
1161 | ScsiWrite16CommandEx (
|
---|
1162 | IN EFI_SCSI_IO_PROTOCOL *ScsiIo,
|
---|
1163 | IN UINT64 Timeout,
|
---|
1164 | IN OUT VOID *SenseData, OPTIONAL
|
---|
1165 | IN OUT UINT8 *SenseDataLength,
|
---|
1166 | OUT UINT8 *HostAdapterStatus,
|
---|
1167 | OUT UINT8 *TargetStatus,
|
---|
1168 | IN OUT VOID *DataBuffer, OPTIONAL
|
---|
1169 | IN OUT UINT32 *DataLength,
|
---|
1170 | IN UINT64 StartLba,
|
---|
1171 | IN UINT32 SectorSize,
|
---|
1172 | IN EFI_EVENT Event OPTIONAL
|
---|
1173 | );
|
---|
1174 |
|
---|
1175 | #endif
|
---|