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