]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassDiskInfo.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbMassStorageDxe / UsbMassDiskInfo.h
1 /** @file
2 Header file for EFI_DISK_INFO_PROTOCOL interface.
3
4 Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef _EFI_USBMASS_DISKINFO_H_
10 #define _EFI_USBMASS_DISKINFO_H_
11
12 /**
13 Initialize the installation of DiskInfo protocol.
14
15 This function prepares for the installation of DiskInfo protocol on the child handle.
16 By default, it installs DiskInfo protocol with USB interface GUID.
17
18 @param UsbMass The pointer of USB_MASS_DEVICE.
19
20 **/
21 VOID
22 InitializeDiskInfo (
23 IN USB_MASS_DEVICE *UsbMass
24 );
25
26
27 /**
28 Provides inquiry information for the controller type.
29
30 This function is used to get inquiry data. Data format
31 of Identify data is defined by the Interface GUID.
32
33 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
34 @param[in, out] InquiryData Pointer to a buffer for the inquiry data.
35 @param[in, out] InquiryDataSize Pointer to the value for the inquiry data size.
36
37 @retval EFI_SUCCESS The command was accepted without any errors.
38 @retval EFI_NOT_FOUND Device does not support this data class
39 @retval EFI_DEVICE_ERROR Error reading InquiryData from device
40 @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough
41
42 **/
43 EFI_STATUS
44 EFIAPI
45 UsbDiskInfoInquiry (
46 IN EFI_DISK_INFO_PROTOCOL *This,
47 IN OUT VOID *InquiryData,
48 IN OUT UINT32 *InquiryDataSize
49 );
50
51 /**
52 Provides identify information for the controller type.
53
54 This function is used to get identify data. Data format
55 of Identify data is defined by the Interface GUID.
56
57 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL
58 instance.
59 @param[in, out] IdentifyData Pointer to a buffer for the identify data.
60 @param[in, out] IdentifyDataSize Pointer to the value for the identify data
61 size.
62
63 @retval EFI_SUCCESS The command was accepted without any errors.
64 @retval EFI_NOT_FOUND Device does not support this data class
65 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device
66 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough
67
68 **/
69 EFI_STATUS
70 EFIAPI
71 UsbDiskInfoIdentify (
72 IN EFI_DISK_INFO_PROTOCOL *This,
73 IN OUT VOID *IdentifyData,
74 IN OUT UINT32 *IdentifyDataSize
75 );
76
77 /**
78 Provides sense data information for the controller type.
79
80 This function is used to get sense data.
81 Data format of Sense data is defined by the Interface GUID.
82
83 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
84 @param[in, out] SenseData Pointer to the SenseData.
85 @param[in, out] SenseDataSize Size of SenseData in bytes.
86 @param[out] SenseDataNumber Pointer to the value for the sense data size.
87
88 @retval EFI_SUCCESS The command was accepted without any errors.
89 @retval EFI_NOT_FOUND Device does not support this data class.
90 @retval EFI_DEVICE_ERROR Error reading SenseData from device.
91 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough.
92
93 **/
94 EFI_STATUS
95 EFIAPI
96 UsbDiskInfoSenseData (
97 IN EFI_DISK_INFO_PROTOCOL *This,
98 IN OUT VOID *SenseData,
99 IN OUT UINT32 *SenseDataSize,
100 OUT UINT8 *SenseDataNumber
101 );
102
103
104 /**
105 This function is used to get controller information.
106
107 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
108 @param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary.
109 @param[out] IdeDevice Pointer to the Ide Device number. Master or slave.
110
111 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid.
112 @retval EFI_UNSUPPORTED This is not an IDE device.
113
114 **/
115 EFI_STATUS
116 EFIAPI
117 UsbDiskInfoWhichIde (
118 IN EFI_DISK_INFO_PROTOCOL *This,
119 OUT UINT32 *IdeChannel,
120 OUT UINT32 *IdeDevice
121 );
122
123 #endif