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