]> git.proxmox.com Git - mirror_edk2.git/blobdiff - 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
index 39bc87ca9eb18414fcbf6ea7ed8484ec90cf4501..95395f7e1cdf6557cdd46708780d8cefcf2a2362 100644 (file)
@@ -1,6 +1,8 @@
 /** @file\r
 \r
-Copyright (c) 2007, Intel Corporation\r
+  The implementation of USB mass storage class device driver.\r
+\r
+Copyright (c) 2007 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -9,17 +11,6 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-  UsbMassImpl.h\r
-\r
-Abstract:\r
-\r
-  The implementation of USB mass storage class device driver.\r
-\r
-Revision History\r
-\r
-\r
 **/\r
 \r
 #ifndef _EFI_USBMASS_IMPL_H_\r
@@ -32,26 +23,34 @@ typedef struct _USB_MASS_DEVICE USB_MASS_DEVICE;
 #include "UsbMassCbi.h"\r
 #include "UsbMassBoot.h"\r
 \r
-enum {\r
-  USB_MASS_SIGNATURE= EFI_SIGNATURE_32 ('U', 's', 'b', 'K'),\r
-};\r
 \r
-typedef struct _USB_MASS_DEVICE {\r
-  UINT32                Signature;\r
-  EFI_HANDLE            Controller;\r
-  EFI_USB_IO_PROTOCOL   *UsbIo;\r
-  EFI_BLOCK_IO_PROTOCOL BlockIo;\r
-  EFI_BLOCK_IO_MEDIA    BlockIoMedia;\r
-  BOOLEAN               OpticalStorage;\r
-  UINT8                 Lun;          // Logical Unit Number\r
-  UINT8                 Pdt;          // Peripheral Device Type\r
-  USB_MASS_TRANSPORT    *Transport;   // USB mass storage transport protocol\r
-  VOID                  *Context;     // Opaque storage for mass transport\r
+//\r
+// MassStorage raises TPL to TPL_NOTIFY to serialize all its operations\r
+// to protect shared data structures.\r
+//\r
+#define  USB_MASS_TPL          TPL_NOTIFY\r
+\r
+#define  USB_MASS_SIGNATURE    SIGNATURE_32 ('U', 's', 'b', 'M')\r
+\r
+\r
+struct _USB_MASS_DEVICE {\r
+  UINT32                    Signature;\r
+  EFI_HANDLE                Controller;\r
+  EFI_USB_IO_PROTOCOL       *UsbIo;\r
+  EFI_DEVICE_PATH_PROTOCOL  *DevicePath;\r
+  EFI_BLOCK_IO_PROTOCOL     BlockIo;\r
+  EFI_BLOCK_IO_MEDIA        BlockIoMedia;\r
+  BOOLEAN                   OpticalStorage;\r
+  UINT8                     Lun;          // Logical Unit Number\r
+  UINT8                     Pdt;          // Peripheral Device Type\r
+  USB_MASS_TRANSPORT        *Transport;   // USB mass storage transport protocol\r
+  VOID                      *Context;     // Opaque storage for mass transport\r
 };\r
 \r
 #define USB_MASS_DEVICE_FROM_BLOCKIO(a) \\r
         CR (a, USB_MASS_DEVICE, BlockIo, USB_MASS_SIGNATURE)\r
 \r
-extern EFI_COMPONENT_NAME_PROTOCOL  gUsbMassStorageComponentName;\r
+extern EFI_COMPONENT_NAME_PROTOCOL   gUsbMassStorageComponentName;\r
+extern EFI_COMPONENT_NAME2_PROTOCOL  gUsbMassStorageComponentName2;\r
 \r
 #endif\r