3 The implementation of USB mass storage class device driver.
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
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.
16 #ifndef _EFI_USBMASS_IMPL_H_
17 #define _EFI_USBMASS_IMPL_H_
19 typedef struct _USB_MASS_DEVICE USB_MASS_DEVICE
;
22 #include "UsbMassBot.h"
23 #include "UsbMassCbi.h"
24 #include "UsbMassBoot.h"
28 // MassStorage raises TPL to TPL_NOTIFY to serialize all its operations
29 // to protect shared data structures.
31 #define USB_MASS_TPL TPL_NOTIFY
33 #define USB_MASS_SIGNATURE SIGNATURE_32 ('U', 's', 'b', 'M')
36 struct _USB_MASS_DEVICE
{
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
50 #define USB_MASS_DEVICE_FROM_BLOCKIO(a) \
51 CR (a, USB_MASS_DEVICE, BlockIo, USB_MASS_SIGNATURE)
53 extern EFI_COMPONENT_NAME_PROTOCOL gUsbMassStorageComponentName
;
54 extern EFI_COMPONENT_NAME2_PROTOCOL gUsbMassStorageComponentName2
;