/** @file\r
\r
-Copyright (c) 2007, Intel Corporation\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
#ifndef _EFI_USBMASS_H_\r
#define _EFI_USBMASS_H_\r
\r
-//\r
-// The package level header files this module uses\r
-//\r
+\r
#include <PiDxe.h>\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
+\r
#include <Protocol/BlockIo.h>\r
#include <Protocol/UsbIo.h>\r
-//\r
-// The Library classes this module consumes\r
-//\r
+#include <Protocol/DevicePath.h>\r
+\r
#include <Library/DebugLib.h>\r
#include <Library/BaseMemoryLib.h>\r
#include <Library/UefiDriverEntryPoint.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
#include <Library/UefiLib.h>\r
#include <Library/MemoryAllocationLib.h>\r
+#include <Library/DevicePathLib.h>\r
\r
#define USB_IS_IN_ENDPOINT(EndPointAddr) (((EndPointAddr) & 0x80) == 0x80)\r
#define USB_IS_OUT_ENDPOINT(EndPointAddr) (((EndPointAddr) & 0x80) == 0)\r
USB_MASS_STORE_RBC = 0x01, // Reduced Block Commands\r
USB_MASS_STORE_8020I = 0x02, // SFF-8020i, typically a CD/DVD device\r
USB_MASS_STORE_QIC = 0x03, // Typically a tape device\r
- USB_MASS_STORE_UFI = 0x04, // Typically a floopy disk driver device\r
+ USB_MASS_STORE_UFI = 0x04, // Typically a floppy disk driver device\r
USB_MASS_STORE_8070I = 0x05, // SFF-8070i, typically a floppy disk driver device.\r
USB_MASS_STORE_SCSI = 0x06, // SCSI transparent command set\r
\r
USB_MASS_STORE_CBI1 = 0x01, // CBI protocol without command completion interrupt\r
USB_MASS_STORE_BOT = 0x50, // Bulk-Only Transport\r
\r
- USB_MASS_STALL_1_MS = 1000,\r
- USB_MASS_STALL_1_S = 1000 * USB_MASS_STALL_1_MS,\r
+ USB_MASS_1_MILLISECOND = 1000,\r
+ USB_MASS_1_SECOND = 1000 * USB_MASS_1_MILLISECOND,\r
\r
USB_MASS_CMD_SUCCESS = 0,\r
USB_MASS_CMD_FAIL,\r
EFI_STATUS\r
(*USB_MASS_INIT_TRANSPORT) (\r
IN EFI_USB_IO_PROTOCOL *Usb,\r
- IN EFI_HANDLE Controller,\r
OUT VOID **Context OPTIONAL\r
);\r
\r
IN EFI_USB_DATA_DIRECTION DataDir,\r
IN VOID *Data,\r
IN UINT32 DataLen,\r
+ IN UINT8 Lun,\r
IN UINT32 Timeout,\r
OUT UINT32 *CmdStatus\r
);\r
IN BOOLEAN ExtendedVerification\r
);\r
\r
+typedef\r
+EFI_STATUS\r
+(*USB_MASS_GET_MAX_LUN) (\r
+ IN VOID *Context,\r
+ IN UINT8 *MaxLun\r
+ );\r
+\r
typedef\r
EFI_STATUS\r
(*USB_MASS_FINI) (\r
USB_MASS_INIT_TRANSPORT Init; // Initialize the mass storage transport protocol\r
USB_MASS_EXEC_COMMAND ExecCommand; // Transport command to the device then get result\r
USB_MASS_RESET Reset; // Reset the device\r
+ USB_MASS_GET_MAX_LUN GetMaxLun; // Get max lun, only for bot\r
USB_MASS_FINI Fini; // Clean up the resources.\r
} USB_MASS_TRANSPORT;\r
\r
IN UINT8 EndpointAddress\r
);\r
\r
-extern UINTN mUsbMscInfo;\r
-extern UINTN mUsbMscError;\r
#endif\r