TianoCore EDK2 master
Loading...
Searching...
No Matches
UsbMassDiskInfo.c
Go to the documentation of this file.
1
9#include "UsbMass.h"
10
11EFI_DISK_INFO_PROTOCOL gUsbDiskInfoProtocolTemplate = {
17};
18
28VOID
30 IN USB_MASS_DEVICE *UsbMass
31 )
32{
33 CopyMem (&UsbMass->DiskInfo, &gUsbDiskInfoProtocolTemplate, sizeof (gUsbDiskInfoProtocolTemplate));
34}
35
53EFIAPI
56 IN OUT VOID *InquiryData,
57 IN OUT UINT32 *InquiryDataSize
58 )
59{
60 EFI_STATUS Status;
61 USB_MASS_DEVICE *UsbMass;
62
63 UsbMass = USB_MASS_DEVICE_FROM_DISK_INFO (This);
64
65 Status = EFI_BUFFER_TOO_SMALL;
66 if (*InquiryDataSize >= sizeof (UsbMass->InquiryData)) {
67 Status = EFI_SUCCESS;
68 CopyMem (InquiryData, &UsbMass->InquiryData, sizeof (UsbMass->InquiryData));
69 }
70
71 *InquiryDataSize = sizeof (UsbMass->InquiryData);
72 return Status;
73}
74
94EFIAPI
97 IN OUT VOID *IdentifyData,
98 IN OUT UINT32 *IdentifyDataSize
99 )
100{
101 return EFI_NOT_FOUND;
102}
103
122EFIAPI
125 IN OUT VOID *SenseData,
126 IN OUT UINT32 *SenseDataSize,
127 OUT UINT8 *SenseDataNumber
128 )
129{
130 return EFI_NOT_FOUND;
131}
132
145EFIAPI
148 OUT UINT32 *IdeChannel,
149 OUT UINT32 *IdeDevice
150 )
151{
152 return EFI_UNSUPPORTED;
153}
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
#define EFI_DISK_INFO_USB_INTERFACE_GUID
Definition: DiskInfo.h:49
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_STATUS EFIAPI UsbDiskInfoWhichIde(IN EFI_DISK_INFO_PROTOCOL *This, OUT UINT32 *IdeChannel, OUT UINT32 *IdeDevice)
EFI_STATUS EFIAPI UsbDiskInfoInquiry(IN EFI_DISK_INFO_PROTOCOL *This, IN OUT VOID *InquiryData, IN OUT UINT32 *InquiryDataSize)
EFI_STATUS EFIAPI UsbDiskInfoIdentify(IN EFI_DISK_INFO_PROTOCOL *This, IN OUT VOID *IdentifyData, IN OUT UINT32 *IdentifyDataSize)
EFI_STATUS EFIAPI UsbDiskInfoSenseData(IN EFI_DISK_INFO_PROTOCOL *This, IN OUT VOID *SenseData, IN OUT UINT32 *SenseDataSize, OUT UINT8 *SenseDataNumber)
VOID InitializeDiskInfo(IN USB_MASS_DEVICE *UsbMass)