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