]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h
Update all files to follow doxygen style file header.
[mirror_edk2.git] / MdeModulePkg / Bus / Scsi / ScsiDiskDxe / ScsiDisk.h
1 /** @file
2 Header file for SCSI Disk Driver.
3
4 Copyright (c) 2004 - 2008, Intel Corporation. <BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef _SCSI_DISK_H
16 #define _SCSI_DISK_H
17
18
19 #include <IndustryStandard/Scsi.h>
20
21 #define IsDeviceFixed(a) (a)->FixedDevice ? 1 : 0
22
23 #define SCSI_DISK_DEV_SIGNATURE EFI_SIGNATURE_32 ('s', 'c', 'd', 'k')
24
25 typedef struct {
26 UINT32 Signature;
27
28 EFI_HANDLE Handle;
29
30 EFI_BLOCK_IO_PROTOCOL BlkIo;
31 EFI_BLOCK_IO_MEDIA BlkIoMedia;
32 EFI_SCSI_IO_PROTOCOL *ScsiIo;
33 UINT8 DeviceType;
34 BOOLEAN FixedDevice;
35 UINT16 Reserved;
36
37 EFI_SCSI_SENSE_DATA *SenseData;
38 UINTN SenseDataNumber;
39 EFI_SCSI_INQUIRY_DATA InquiryData;
40
41 EFI_UNICODE_STRING_TABLE *ControllerNameTable;
42
43 } SCSI_DISK_DEV;
44
45 #define SCSI_DISK_DEV_FROM_THIS(a) CR (a, SCSI_DISK_DEV, BlkIo, SCSI_DISK_DEV_SIGNATURE)
46
47 //
48 // Global Variables
49 //
50 extern EFI_DRIVER_BINDING_PROTOCOL gScsiDiskDriverBinding;
51 extern EFI_COMPONENT_NAME_PROTOCOL gScsiDiskComponentName;
52 extern EFI_COMPONENT_NAME2_PROTOCOL gScsiDiskComponentName2;
53 //
54 // action code used in detect media process
55 //
56 #define ACTION_NO_ACTION 0x00
57 #define ACTION_READ_CAPACITY 0x01
58 #define ACTION_RETRY_COMMAND_LATER 0x02
59
60 EFI_STATUS
61 EFIAPI
62 ScsiDiskDriverBindingSupported (
63 IN EFI_DRIVER_BINDING_PROTOCOL *This,
64 IN EFI_HANDLE Controller,
65 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
66 );
67
68 EFI_STATUS
69 EFIAPI
70 ScsiDiskDriverBindingStart (
71 IN EFI_DRIVER_BINDING_PROTOCOL *This,
72 IN EFI_HANDLE Controller,
73 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
74 );
75
76 EFI_STATUS
77 EFIAPI
78 ScsiDiskDriverBindingStop (
79 IN EFI_DRIVER_BINDING_PROTOCOL *This,
80 IN EFI_HANDLE Controller,
81 IN UINTN NumberOfChildren,
82 IN EFI_HANDLE *ChildHandleBuffer
83 );
84
85 //
86 // EFI Component Name Functions
87 //
88 /**
89 Retrieves a Unicode string that is the user readable name of the driver.
90
91 This function retrieves the user readable name of a driver in the form of a
92 Unicode string. If the driver specified by This has a user readable name in
93 the language specified by Language, then a pointer to the driver name is
94 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
95 by This does not support the language specified by Language,
96 then EFI_UNSUPPORTED is returned.
97
98 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
99 EFI_COMPONENT_NAME_PROTOCOL instance.
100
101 @param Language[in] A pointer to a Null-terminated ASCII string
102 array indicating the language. This is the
103 language of the driver name that the caller is
104 requesting, and it must match one of the
105 languages specified in SupportedLanguages. The
106 number of languages supported by a driver is up
107 to the driver writer. Language is specified
108 in RFC 3066 or ISO 639-2 language code format.
109
110 @param DriverName[out] A pointer to the Unicode string to return.
111 This Unicode string is the name of the
112 driver specified by This in the language
113 specified by Language.
114
115 @retval EFI_SUCCESS The Unicode string for the Driver specified by
116 This and the language specified by Language was
117 returned in DriverName.
118
119 @retval EFI_INVALID_PARAMETER Language is NULL.
120
121 @retval EFI_INVALID_PARAMETER DriverName is NULL.
122
123 @retval EFI_UNSUPPORTED The driver specified by This does not support
124 the language specified by Language.
125
126 **/
127 EFI_STATUS
128 EFIAPI
129 ScsiDiskComponentNameGetDriverName (
130 IN EFI_COMPONENT_NAME_PROTOCOL *This,
131 IN CHAR8 *Language,
132 OUT CHAR16 **DriverName
133 );
134
135
136 /**
137 Retrieves a Unicode string that is the user readable name of the controller
138 that is being managed by a driver.
139
140 This function retrieves the user readable name of the controller specified by
141 ControllerHandle and ChildHandle in the form of a Unicode string. If the
142 driver specified by This has a user readable name in the language specified by
143 Language, then a pointer to the controller name is returned in ControllerName,
144 and EFI_SUCCESS is returned. If the driver specified by This is not currently
145 managing the controller specified by ControllerHandle and ChildHandle,
146 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
147 support the language specified by Language, then EFI_UNSUPPORTED is returned.
148
149 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
150 EFI_COMPONENT_NAME_PROTOCOL instance.
151
152 @param ControllerHandle[in] The handle of a controller that the driver
153 specified by This is managing. This handle
154 specifies the controller whose name is to be
155 returned.
156
157 @param ChildHandle[in] The handle of the child controller to retrieve
158 the name of. This is an optional parameter that
159 may be NULL. It will be NULL for device
160 drivers. It will also be NULL for a bus drivers
161 that wish to retrieve the name of the bus
162 controller. It will not be NULL for a bus
163 driver that wishes to retrieve the name of a
164 child controller.
165
166 @param Language[in] A pointer to a Null-terminated ASCII string
167 array indicating the language. This is the
168 language of the driver name that the caller is
169 requesting, and it must match one of the
170 languages specified in SupportedLanguages. The
171 number of languages supported by a driver is up
172 to the driver writer. Language is specified in
173 RFC 3066 or ISO 639-2 language code format.
174
175 @param ControllerName[out] A pointer to the Unicode string to return.
176 This Unicode string is the name of the
177 controller specified by ControllerHandle and
178 ChildHandle in the language specified by
179 Language from the point of view of the driver
180 specified by This.
181
182 @retval EFI_SUCCESS The Unicode string for the user readable name in
183 the language specified by Language for the
184 driver specified by This was returned in
185 DriverName.
186
187 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
188
189 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
190 EFI_HANDLE.
191
192 @retval EFI_INVALID_PARAMETER Language is NULL.
193
194 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
195
196 @retval EFI_UNSUPPORTED The driver specified by This is not currently
197 managing the controller specified by
198 ControllerHandle and ChildHandle.
199
200 @retval EFI_UNSUPPORTED The driver specified by This does not support
201 the language specified by Language.
202
203 **/
204 EFI_STATUS
205 EFIAPI
206 ScsiDiskComponentNameGetControllerName (
207 IN EFI_COMPONENT_NAME_PROTOCOL *This,
208 IN EFI_HANDLE ControllerHandle,
209 IN EFI_HANDLE ChildHandle OPTIONAL,
210 IN CHAR8 *Language,
211 OUT CHAR16 **ControllerName
212 );
213
214
215 EFI_STATUS
216 EFIAPI
217 ScsiDiskReset (
218 IN EFI_BLOCK_IO_PROTOCOL *This,
219 IN BOOLEAN ExtendedVerification
220 )
221 /*++
222
223 Routine Description:
224
225 Reset SCSI Disk
226
227 Arguments:
228
229 This - The pointer of EFI_BLOCK_IO_PROTOCOL
230 ExtendedVerification - The flag about if extend verificate
231
232 Returns:
233
234 EFI_STATUS
235
236 --*/
237 ;
238
239 EFI_STATUS
240 EFIAPI
241 ScsiDiskReadBlocks (
242 IN EFI_BLOCK_IO_PROTOCOL *This,
243 IN UINT32 MediaId,
244 IN EFI_LBA LBA,
245 IN UINTN BufferSize,
246 OUT VOID *Buffer
247 )
248 /*++
249
250 Routine Description:
251
252 The function is to Read Block from SCSI Disk
253
254 Arguments:
255
256 This - The pointer of EFI_BLOCK_IO_PROTOCOL
257 MediaId - The Id of Media detected
258 LBA - The logic block address
259 BufferSize - The size of Buffer
260 Buffer - The buffer to fill the read out data
261
262 Returns:
263
264 EFI_INVALID_PARAMETER - Invalid parameter passed in.
265 EFI_SUCCESS - Successfully to read out block.
266 EFI_DEVICE_ERROR - Fail to detect media.
267 EFI_NO_MEDIA - Media is not present.
268 EFI_MEDIA_CHANGED - Media has changed.
269 EFI_BAD_BUFFER_SIZE - The buffer size is not multiple of BlockSize.
270
271 --*/
272 ;
273
274 EFI_STATUS
275 EFIAPI
276 ScsiDiskWriteBlocks (
277 IN EFI_BLOCK_IO_PROTOCOL *This,
278 IN UINT32 MediaId,
279 IN EFI_LBA LBA,
280 IN UINTN BufferSize,
281 IN VOID *Buffer
282 )
283 /*++
284
285 Routine Description:
286
287 The function is to Write Block to SCSI Disk
288
289 Arguments:
290
291 This - The pointer of EFI_BLOCK_IO_PROTOCOL
292 MediaId - The Id of Media detected
293 LBA - The logic block address
294 BufferSize - The size of Buffer
295 Buffer - The buffer to fill the read out data
296
297 Returns:
298
299 EFI_INVALID_PARAMETER - Invalid parameter passed in.
300 EFI_SUCCESS - Successfully to read out block.
301 EFI_DEVICE_ERROR - Fail to detect media.
302 EFI_NO_MEDIA - Media is not present.
303 EFI_MEDIA_CHANGED - Media has changed.
304 EFI_BAD_BUFFER_SIZE - The buffer size is not multiple of BlockSize.
305
306 --*/
307 ;
308
309 EFI_STATUS
310 EFIAPI
311 ScsiDiskFlushBlocks (
312 IN EFI_BLOCK_IO_PROTOCOL *This
313 )
314 /*++
315
316 Routine Description:
317
318 Flush Block to Disk
319
320 Arguments:
321
322 This - The pointer of EFI_BLOCK_IO_PROTOCOL
323
324 Returns:
325
326 EFI_SUCCESS
327
328 --*/
329 ;
330
331 EFI_STATUS
332 ScsiDiskDetectMedia (
333 SCSI_DISK_DEV *ScsiDiskDevice,
334 BOOLEAN MustReadCap,
335 BOOLEAN *MediaChange
336 )
337 /*++
338
339 Routine Description:
340
341 Dectect Device and read out capacity ,if error occurs, parse the sense key.
342
343 Arguments:
344
345 ScsiDiskDevice - The pointer of SCSI_DISK_DEV
346 MustReadCapacity - The flag about reading device capacity
347 MediaChange - The pointer of flag indicates if media has changed
348
349 Returns:
350
351 EFI_DEVICE_ERROR - Indicates that error occurs
352 EFI_SUCCESS - Successfully to detect media
353
354 --*/
355 ;
356
357 EFI_STATUS
358 ScsiDiskTestUnitReady (
359 SCSI_DISK_DEV *ScsiDiskDevice,
360 BOOLEAN *NeedRetry,
361 EFI_SCSI_SENSE_DATA **SenseDataArray,
362 UINTN *NumberOfSenseKeys
363 )
364 /*++
365
366 Routine Description:
367
368 When Test Unit Ready command succeeds, retrieve Sense Keys via Request Sense;
369 When Test Unit Ready command encounters any error caused by host adapter or
370 target, return error without retrieving Sense Keys.
371
372 Arguments:
373
374 ScsiDiskDevice - The pointer of SCSI_DISK_DEV
375 NeedRetry - The pointer of flag indicates try again
376 SenseDataArray - The pointer of an array of sense data
377 NumberOfSenseKeys - The pointer of the number of sense data array
378
379 Returns:
380
381 EFI_DEVICE_ERROR - Indicates that error occurs
382 EFI_SUCCESS - Successfully to test unit
383
384 --*/
385 ;
386
387 EFI_STATUS
388 DetectMediaParsingSenseKeys (
389 SCSI_DISK_DEV *ScsiDiskDevice,
390 EFI_SCSI_SENSE_DATA *SenseData,
391 UINTN NumberOfSenseKeys,
392 UINTN *Action
393 )
394 /*++
395
396 Routine Description:
397
398 Parsing Sense Keys which got from request sense command.
399
400 Arguments:
401
402 ScsiDiskDevice - The pointer of SCSI_DISK_DEV
403 SenseData - The pointer of EFI_SCSI_SENSE_DATA
404 NumberOfSenseKeys - The number of sense key
405 Action - The pointer of action which indicates what is need to do next
406
407 Returns:
408
409 EFI_DEVICE_ERROR - Indicates that error occurs
410 EFI_SUCCESS - Successfully to complete the parsing
411
412 --*/
413 ;
414
415 EFI_STATUS
416 ScsiDiskReadCapacity (
417 SCSI_DISK_DEV *ScsiDiskDevice,
418 BOOLEAN *NeedRetry,
419 EFI_SCSI_SENSE_DATA **SenseDataArray,
420 UINTN *NumberOfSenseKeys
421 )
422 /*++
423
424 Routine Description:
425
426 Send read capacity command to device and get the device parameter
427
428 Arguments:
429
430 ScsiDiskDevice - The pointer of SCSI_DISK_DEV
431 NeedRetry - The pointer of flag indicates if need a retry
432 SenseDataArray - The pointer of an array of sense data
433 NumberOfSenseKeys - The number of sense key
434
435 Returns:
436
437 EFI_DEVICE_ERROR - Indicates that error occurs
438 EFI_SUCCESS - Successfully to read capacity
439
440 --*/
441 ;
442
443 EFI_STATUS
444 CheckHostAdapterStatus (
445 UINT8 HostAdapterStatus
446 )
447 /*++
448
449 Routine Description:
450
451 Check the HostAdapter status
452
453 Arguments:
454
455 HostAdapterStatus - Host Adapter status
456
457 Returns:
458
459 EFI_SUCCESS
460 EFI_TIMEOUT
461 EFI_NOT_READY
462 EFI_DEVICE_ERROR
463
464 --*/
465 ;
466
467 EFI_STATUS
468 CheckTargetStatus (
469 UINT8 TargetStatus
470 )
471 /*++
472
473 Routine Description:
474
475 Check the target status
476
477 Arguments:
478
479 TargetStatus - Target status
480
481 Returns:
482
483 EFI_NOT_READY
484 EFI_DEVICE_ERROR
485 EFI_SUCCESS
486
487 --*/
488 ;
489
490 EFI_STATUS
491 ScsiDiskRequestSenseKeys (
492 SCSI_DISK_DEV *ScsiDiskDevice,
493 BOOLEAN *NeedRetry,
494 EFI_SCSI_SENSE_DATA **SenseDataArray,
495 UINTN *NumberOfSenseKeys,
496 BOOLEAN AskResetIfError
497 )
498 /*++
499
500 Routine Description:
501
502 Retrieve all sense keys from the device.
503 When encountering error during the process,
504 if retrieve sense keys before error encounterred,
505 return the sense keys with return status set to EFI_SUCCESS,
506 and NeedRetry set to FALSE; otherwize, return the proper return
507 status.
508
509 Arguments:
510
511 ScsiDiskDevice - The pointer of SCSI_DISK_DEV
512 NeedRetry - The pointer of flag indicates if need a retry
513 SenseDataArray - The pointer of an array of sense data
514 NumberOfSenseKeys - The number of sense key
515 AskResetIfError - The flag indicates if need reset when error occurs
516
517 Returns:
518
519 EFI_DEVICE_ERROR - Indicates that error occurs
520 EFI_SUCCESS - Successfully to request sense key
521
522 --*/
523 ;
524
525 EFI_STATUS
526 ScsiDiskInquiryDevice (
527 SCSI_DISK_DEV *ScsiDiskDevice,
528 BOOLEAN *NeedRetry
529 )
530 /*++
531
532 Routine Description:
533
534 Send out Inquiry command to Device
535
536 Arguments:
537
538 ScsiDiskDevice - The pointer of SCSI_DISK_DEV
539 NeedRetry - Indicates if needs try again when error happens
540
541 Returns:
542
543 EFI_DEVICE_ERROR - Indicates that error occurs
544 EFI_SUCCESS - Successfully to detect media
545
546 --*/
547 ;
548
549 VOID
550 ParseInquiryData (
551 SCSI_DISK_DEV *ScsiDiskDevice
552 )
553 /*++
554
555 Routine Description:
556
557 Parse Inquiry data
558
559 Arguments:
560
561 ScsiDiskDevice - The pointer of SCSI_DISK_DEV
562
563 Returns:
564
565 NONE
566
567 --*/
568 ;
569
570 EFI_STATUS
571 ScsiDiskReadSectors (
572 SCSI_DISK_DEV *ScsiDiskDevice,
573 VOID *Buffer,
574 EFI_LBA Lba,
575 UINTN NumberOfBlocks
576 )
577 /*++
578
579 Routine Description:
580
581 Read sector from SCSI Disk
582
583 Arguments:
584
585 ScsiDiskDevice - The poiniter of SCSI_DISK_DEV
586 Buffer - The buffer to fill in the read out data
587 Lba - Logic block address
588 NumberOfBlocks - The number of blocks to read
589
590 Returns:
591
592 EFI_DEVICE_ERROR
593 EFI_SUCCESS
594
595 --*/
596 ;
597
598 EFI_STATUS
599 ScsiDiskWriteSectors (
600 SCSI_DISK_DEV *ScsiDiskDevice,
601 VOID *Buffer,
602 EFI_LBA Lba,
603 UINTN NumberOfBlocks
604 )
605 /*++
606
607 Routine Description:
608
609 Write SCSI Disk sectors
610
611 Arguments:
612
613 ScsiDiskDevice - The pointer of SCSI_DISK_DEV
614 Buffer - The data buffer to write sector
615 Lba - Logic block address
616 NumberOfBlocks - The number of blocks to write
617
618 Returns:
619
620 EFI_DEVICE_ERROR
621 EFI_SUCCESS
622
623 --*/
624 ;
625
626 EFI_STATUS
627 ScsiDiskRead10 (
628 SCSI_DISK_DEV *ScsiDiskDevice,
629 BOOLEAN *NeedRetry,
630 EFI_SCSI_SENSE_DATA **SenseDataArray,
631 UINTN *NumberOfSenseKeys,
632 UINT64 Timeout,
633 UINT8 *DataBuffer,
634 UINT32 *DataLength,
635 UINT32 StartLba,
636 UINT32 SectorSize
637 )
638 /*++
639
640 Routine Description:
641
642 Sumbmit Read command
643
644 Arguments:
645
646 ScsiDiskDevice - The pointer of ScsiDiskDevice
647 NeedRetry - The pointer of flag indicates if needs retry if error happens
648 SenseDataArray - The pointer of an array of sense data
649 NumberOfSenseKeys - The number of sense key
650 Timeout - The time to complete the command
651 DataBuffer - The buffer to fill with the read out data
652 DataLength - The length of buffer
653 StartLba - The start logic block address
654 SectorSize - The size of sector
655
656 Returns:
657
658 EFI_STATUS
659
660 --*/
661 ;
662
663 EFI_STATUS
664 ScsiDiskWrite10 (
665 SCSI_DISK_DEV *ScsiDiskDevice,
666 BOOLEAN *NeedRetry,
667 EFI_SCSI_SENSE_DATA **SenseDataArray,
668 UINTN *NumberOfSenseKeys,
669 UINT64 Timeout,
670 UINT8 *DataBuffer,
671 UINT32 *DataLength,
672 UINT32 StartLba,
673 UINT32 SectorSize
674 )
675 /*++
676
677 Routine Description:
678
679 Submit Write Command
680
681 Arguments:
682
683 ScsiDiskDevice - The pointer of ScsiDiskDevice
684 NeedRetry - The pointer of flag indicates if needs retry if error happens
685 SenseDataArray - The pointer of an array of sense data
686 NumberOfSenseKeys - The number of sense key
687 Timeout - The time to complete the command
688 DataBuffer - The buffer to fill with the read out data
689 DataLength - The length of buffer
690 StartLba - The start logic block address
691 SectorSize - The size of sector
692
693 Returns:
694
695 EFI_STATUS
696
697 --*/
698 ;
699
700 VOID
701 GetMediaInfo (
702 SCSI_DISK_DEV *ScsiDiskDevice,
703 EFI_SCSI_DISK_CAPACITY_DATA *Capacity
704 )
705 /*++
706
707 Routine Description:
708
709 Get information from media read capacity command
710
711 Arguments:
712
713 ScsiDiskDevice - The pointer of SCSI_DISK_DEV
714 Capacity - The pointer of EFI_SCSI_DISK_CAPACITY_DATA
715
716 Returns:
717
718 NONE
719
720 --*/
721 ;
722
723 BOOLEAN
724 ScsiDiskIsNoMedia (
725 IN EFI_SCSI_SENSE_DATA *SenseData,
726 IN UINTN SenseCounts
727 )
728 /*++
729
730 Routine Description:
731
732 Check sense key to find if media presents
733
734 Arguments:
735
736 SenseData - The pointer of EFI_SCSI_SENSE_DATA
737 SenseCounts - The number of sense key
738
739 Returns:
740
741 BOOLEAN
742
743 --*/
744 ;
745
746 BOOLEAN
747 ScsiDiskIsMediaError (
748 IN EFI_SCSI_SENSE_DATA *SenseData,
749 IN UINTN SenseCounts
750 )
751 /*++
752
753 Routine Description:
754
755 Parse sense key
756
757 Arguments:
758
759 SenseData - The pointer of EFI_SCSI_SENSE_DATA
760 SenseCounts - The number of sense key
761
762 Returns:
763
764 BOOLEAN
765
766 --*/
767 ;
768
769 BOOLEAN
770 ScsiDiskIsHardwareError (
771 IN EFI_SCSI_SENSE_DATA *SenseData,
772 IN UINTN SenseCounts
773 )
774 /*++
775
776 Routine Description:
777
778 Check sense key to find if hardware error happens
779
780 Arguments:
781
782 SenseData - The pointer of EFI_SCSI_SENSE_DATA
783 SenseCounts - The number of sense key
784
785 Returns:
786
787 BOOLEAN
788
789 --*/
790 ;
791
792 BOOLEAN
793 ScsiDiskIsMediaChange (
794 IN EFI_SCSI_SENSE_DATA *SenseData,
795 IN UINTN SenseCounts
796 )
797 /*++
798
799 Routine Description:
800
801 Routine Description:
802
803 Check sense key to find if media has changed
804
805 Arguments:
806
807 SenseData - The pointer of EFI_SCSI_SENSE_DATA
808 SenseCounts - The number of sense key
809
810 Returns:
811
812 BOOLEAN
813
814 --*/
815 ;
816
817 BOOLEAN
818 ScsiDiskIsResetBefore (
819 IN EFI_SCSI_SENSE_DATA *SenseData,
820 IN UINTN SenseCounts
821 )
822 /*++
823
824 Routine Description:
825
826 Check sense key to find if reset happens
827
828 Arguments:
829
830 SenseData - The pointer of EFI_SCSI_SENSE_DATA
831 SenseCounts - The number of sense key
832
833 Returns:
834
835 BOOLEAN
836
837 --*/
838 ;
839
840 BOOLEAN
841 ScsiDiskIsDriveReady (
842 IN EFI_SCSI_SENSE_DATA *SenseData,
843 IN UINTN SenseCounts,
844 OUT BOOLEAN *NeedRetry
845 )
846 /*++
847
848 Routine Description:
849
850 Check sense key to find if the drive is ready
851
852 Arguments:
853
854 SenseData - The pointer of EFI_SCSI_SENSE_DATA
855 SenseCounts - The number of sense key
856 RetryLater - The flag means if need a retry
857
858 Returns:
859
860 BOOLEAN
861
862 --*/
863 ;
864
865 BOOLEAN
866 ScsiDiskHaveSenseKey (
867 IN EFI_SCSI_SENSE_DATA *SenseData,
868 IN UINTN SenseCounts
869 )
870 /*++
871
872 Routine Description:
873
874 Check sense key to find if it has sense key
875
876 Arguments:
877
878 SenseData - The pointer of EFI_SCSI_SENSE_DATA
879 SenseCounts - The number of sense key
880
881 Returns:
882
883 BOOLEAN
884
885 --*/
886 ;
887
888 VOID
889 ReleaseScsiDiskDeviceResources (
890 IN SCSI_DISK_DEV *ScsiDiskDevice
891 )
892 /*++
893
894 Routine Description:
895
896 Release resource about disk device
897
898 Arguments:
899
900 ScsiDiskDevice - The pointer of SCSI_DISK_DEV
901
902 Returns:
903
904 NONE
905
906 --*/
907 ;
908
909 #endif