3 Copyright (c) 2007 - 2008, 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
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.
18 The implementation of USB mass storage class device driver.
25 #ifndef _EFI_USBMASS_IMPL_H_
26 #define _EFI_USBMASS_IMPL_H_
28 typedef struct _USB_MASS_DEVICE USB_MASS_DEVICE
;
31 #include "UsbMassBot.h"
32 #include "UsbMassCbi.h"
33 #include "UsbMassBoot.h"
37 // MassStorage raises TPL to TPL_NOTIFY to serialize all its operations
38 // to protect shared data structures.
40 USB_MASS_TPL
= TPL_NOTIFY
,
42 USB_MASS_SIGNATURE
= EFI_SIGNATURE_32 ('U', 's', 'b', 'M')
45 struct _USB_MASS_DEVICE
{
47 EFI_HANDLE Controller
;
48 EFI_USB_IO_PROTOCOL
*UsbIo
;
49 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
50 EFI_BLOCK_IO_PROTOCOL BlockIo
;
51 EFI_BLOCK_IO_MEDIA BlockIoMedia
;
52 BOOLEAN OpticalStorage
;
53 UINT8 Lun
; // Logical Unit Number
54 UINT8 Pdt
; // Peripheral Device Type
55 USB_MASS_TRANSPORT
*Transport
; // USB mass storage transport protocol
56 VOID
*Context
; // Opaque storage for mass transport
59 #define USB_MASS_DEVICE_FROM_BLOCKIO(a) \
60 CR (a, USB_MASS_DEVICE, BlockIo, USB_MASS_SIGNATURE)
62 extern EFI_COMPONENT_NAME_PROTOCOL gUsbMassStorageComponentName
;
63 extern EFI_COMPONENT_NAME2_PROTOCOL gUsbMassStorageComponentName2
;