]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.h
Make EdkModulePkg pass Intel IPF compiler with /W4 /WX switches, solving warning...
[mirror_edk2.git] / EdkModulePkg / Bus / Usb / UsbMassStorage / Dxe / UsbMassStorage.h
1 /*++
2 Copyright (c) 2006, Intel Corporation
3 All rights reserved. This program and the accompanying materials
4 are licensed and made available under the terms and conditions of the BSD License
5 which accompanies this distribution. The full text of the license may be found at
6 http://opensource.org/licenses/bsd-license.php
7
8 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
9 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
10
11 Module Name:
12
13 UsbMassStorage.h
14
15 Abstract:
16
17 Header file for USB Mass Storage Driver's Data Structures
18
19 Revision History
20 --*/
21
22 #ifndef _USB_FLP_H
23 #define _USB_FLP_H
24
25
26 #include <IndustryStandard/Usb.h>
27 #include "UsbMassStorageData.h"
28
29 #define CLASS_MASSTORAGE 8
30 #define SUBCLASS_UFI 4
31 #define SUBCLASS_8070 5
32 #define PROTOCOL_BOT 0x50
33 #define PROTOCOL_CBI0 0
34 #define PROTOCOL_CBI1 1
35
36 #define USBFLOPPY 1 // for those that use ReadCapacity(0x25) command to retrieve media capacity
37 #define USBFLOPPY2 2 // for those that use ReadFormatCapacity(0x23) command to retrieve media capacity
38 #define USBCDROM 3
39
40 #define BLOCK_UNIT 128
41
42 #define USB_FLOPPY_DEV_SIGNATURE EFI_SIGNATURE_32 ('u', 'f', 'l', 'p')
43
44 typedef struct {
45 UINTN Signature;
46
47 EFI_HANDLE Handle;
48 EFI_BLOCK_IO_PROTOCOL BlkIo;
49 EFI_BLOCK_IO_MEDIA BlkMedia;
50 EFI_USB_ATAPI_PROTOCOL *AtapiProtocol;
51
52 REQUEST_SENSE_DATA *SenseData;
53 UINT8 SenseDataNumber;
54 UINT8 DeviceType;
55 } USB_FLOPPY_DEV;
56
57 #define USB_FLOPPY_DEV_FROM_THIS(a) \
58 CR(a, USB_FLOPPY_DEV, BlkIo, USB_FLOPPY_DEV_SIGNATURE)
59
60 extern EFI_COMPONENT_NAME_PROTOCOL gUsbMassStorageComponentName;
61
62 //
63 // Prototypes
64 // Driver model protocol interface
65 //
66 EFI_STATUS
67 EFIAPI
68 USBFloppyDriverBindingSupported (
69 IN EFI_DRIVER_BINDING_PROTOCOL *This,
70 IN EFI_HANDLE Controller,
71 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
72 );
73
74 EFI_STATUS
75 EFIAPI
76 USBFloppyDriverBindingStart (
77 IN EFI_DRIVER_BINDING_PROTOCOL *This,
78 IN EFI_HANDLE Controller,
79 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
80 );
81
82 EFI_STATUS
83 EFIAPI
84 USBFloppyDriverBindingStop (
85 IN EFI_DRIVER_BINDING_PROTOCOL *This,
86 IN EFI_HANDLE Controller,
87 IN UINTN NumberOfChildren,
88 IN EFI_HANDLE *ChildHandleBuffer
89 );
90
91 //
92 // EFI Component Name Functions
93 //
94 EFI_STATUS
95 EFIAPI
96 UsbMassStorageComponentNameGetDriverName (
97 IN EFI_COMPONENT_NAME_PROTOCOL *This,
98 IN CHAR8 *Language,
99 OUT CHAR16 **DriverName
100 );
101
102 EFI_STATUS
103 EFIAPI
104 UsbMassStorageComponentNameGetControllerName (
105 IN EFI_COMPONENT_NAME_PROTOCOL *This,
106 IN EFI_HANDLE ControllerHandle,
107 IN EFI_HANDLE ChildHandle OPTIONAL,
108 IN CHAR8 *Language,
109 OUT CHAR16 **ControllerName
110 );
111
112 #endif