]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.h
Clean up to update the reference of the these macros:
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbMassStorageDxe / UsbMassImpl.h
1 /** @file
2
3 The implementation of USB mass storage class device driver.
4
5 Copyright (c) 2007 - 2008, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef _EFI_USBMASS_IMPL_H_
17 #define _EFI_USBMASS_IMPL_H_
18
19 typedef struct _USB_MASS_DEVICE USB_MASS_DEVICE;
20
21 #include "UsbMass.h"
22 #include "UsbMassBot.h"
23 #include "UsbMassCbi.h"
24 #include "UsbMassBoot.h"
25
26
27 //
28 // MassStorage raises TPL to TPL_NOTIFY to serialize all its operations
29 // to protect shared data structures.
30 //
31 #define USB_MASS_TPL TPL_NOTIFY
32
33 #define USB_MASS_SIGNATURE SIGNATURE_32 ('U', 's', 'b', 'M')
34
35
36 struct _USB_MASS_DEVICE {
37 UINT32 Signature;
38 EFI_HANDLE Controller;
39 EFI_USB_IO_PROTOCOL *UsbIo;
40 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
41 EFI_BLOCK_IO_PROTOCOL BlockIo;
42 EFI_BLOCK_IO_MEDIA BlockIoMedia;
43 BOOLEAN OpticalStorage;
44 UINT8 Lun; // Logical Unit Number
45 UINT8 Pdt; // Peripheral Device Type
46 USB_MASS_TRANSPORT *Transport; // USB mass storage transport protocol
47 VOID *Context; // Opaque storage for mass transport
48 };
49
50 #define USB_MASS_DEVICE_FROM_BLOCKIO(a) \
51 CR (a, USB_MASS_DEVICE, BlockIo, USB_MASS_SIGNATURE)
52
53 extern EFI_COMPONENT_NAME_PROTOCOL gUsbMassStorageComponentName;
54 extern EFI_COMPONENT_NAME2_PROTOCOL gUsbMassStorageComponentName2;
55
56 #endif