]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassDiskInfo.h
MdeModulePkg/UsbBusDxe: Add UsbControlTransfer() error check
[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
4Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
125887e7 15#ifndef _EFI_USBMASS_DISKINFO_H_\r
16#define _EFI_USBMASS_DISKINFO_H_\r
17\r
39840c50 18/**\r
19 Initialize the installation of DiskInfo protocol.\r
20\r
21 This function prepares for the installation of DiskInfo protocol on the child handle.\r
22 By default, it installs DiskInfo protocol with USB interface GUID. \r
23\r
24 @param UsbMass The pointer of USB_MASS_DEVICE.\r
25\r
26**/\r
27VOID\r
28InitializeDiskInfo (\r
29 IN USB_MASS_DEVICE *UsbMass\r
30 );\r
31\r
32\r
33/**\r
34 Provides inquiry information for the controller type.\r
35 \r
36 This function is used to get inquiry data. Data format\r
37 of Identify data is defined by the Interface GUID.\r
38\r
39 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.\r
40 @param[in, out] InquiryData Pointer to a buffer for the inquiry data.\r
41 @param[in, out] InquiryDataSize Pointer to the value for the inquiry data size.\r
42\r
43 @retval EFI_SUCCESS The command was accepted without any errors.\r
44 @retval EFI_NOT_FOUND Device does not support this data class \r
45 @retval EFI_DEVICE_ERROR Error reading InquiryData from device \r
46 @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough \r
47\r
48**/\r
49EFI_STATUS\r
50EFIAPI\r
51UsbDiskInfoInquiry (\r
52 IN EFI_DISK_INFO_PROTOCOL *This,\r
53 IN OUT VOID *InquiryData,\r
54 IN OUT UINT32 *InquiryDataSize\r
55 );\r
56\r
57/**\r
58 Provides identify information for the controller type.\r
59\r
60 This function is used to get identify data. Data format\r
61 of Identify data is defined by the Interface GUID.\r
62\r
63 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL \r
64 instance.\r
65 @param[in, out] IdentifyData Pointer to a buffer for the identify data.\r
66 @param[in, out] IdentifyDataSize Pointer to the value for the identify data\r
67 size.\r
68\r
69 @retval EFI_SUCCESS The command was accepted without any errors.\r
70 @retval EFI_NOT_FOUND Device does not support this data class \r
71 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device \r
72 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough \r
73\r
74**/\r
75EFI_STATUS\r
76EFIAPI\r
77UsbDiskInfoIdentify (\r
78 IN EFI_DISK_INFO_PROTOCOL *This,\r
79 IN OUT VOID *IdentifyData,\r
80 IN OUT UINT32 *IdentifyDataSize\r
81 );\r
82\r
83/**\r
84 Provides sense data information for the controller type.\r
85 \r
86 This function is used to get sense data. \r
87 Data format of Sense data is defined by the Interface GUID.\r
88\r
89 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.\r
90 @param[in, out] SenseData Pointer to the SenseData.\r
91 @param[in, out] SenseDataSize Size of SenseData in bytes.\r
92 @param[out] SenseDataNumber Pointer to the value for the sense data size.\r
93\r
94 @retval EFI_SUCCESS The command was accepted without any errors.\r
95 @retval EFI_NOT_FOUND Device does not support this data class.\r
96 @retval EFI_DEVICE_ERROR Error reading SenseData from device.\r
97 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough.\r
98\r
99**/\r
100EFI_STATUS\r
101EFIAPI\r
102UsbDiskInfoSenseData (\r
103 IN EFI_DISK_INFO_PROTOCOL *This,\r
104 IN OUT VOID *SenseData,\r
105 IN OUT UINT32 *SenseDataSize,\r
106 OUT UINT8 *SenseDataNumber\r
107 );\r
108\r
109\r
110/**\r
111 This function is used to get controller information.\r
112\r
113 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. \r
114 @param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary.\r
115 @param[out] IdeDevice Pointer to the Ide Device number. Master or slave.\r
116\r
117 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid.\r
118 @retval EFI_UNSUPPORTED This is not an IDE device.\r
119\r
120**/\r
121EFI_STATUS\r
122EFIAPI\r
123UsbDiskInfoWhichIde (\r
124 IN EFI_DISK_INFO_PROTOCOL *This,\r
125 OUT UINT32 *IdeChannel,\r
126 OUT UINT32 *IdeDevice\r
127 );\r
128\r
125887e7 129#endif\r