/** @file
Definition for the USB mass storage Bulk-Only Transport protocol,
based on the "Universal Serial Bus Mass Storage Class Bulk-Only
Transport" Revision 1.0, September 31, 1999.
Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _EFI_USBMASS_BOT_H_
#define _EFI_USBMASS_BOT_H_
extern USB_MASS_TRANSPORT mUsbBotTransport;
//
// Usb Bulk-Only class specfic request
//
//
// Usb BOT command block status values
//
//
// Usb Bot retry to get CSW, refers to specification[BOT10-5.3, it says 2 times]
//
//
// Usb Bot wait device reset complete, set by experience
//
//
// Usb Bot transport timeout, set by experience
//
#pragma pack(1)
///
/// The CBW (Command Block Wrapper) structures used by the USB BOT protocol.
///
typedef struct {
} USB_BOT_CBW;
///
/// The and CSW (Command Status Wrapper) structures used by the USB BOT protocol.
///
typedef struct {
} USB_BOT_CSW;
#pragma pack()
typedef struct {
//
//
/**
Initializes USB BOT protocol.
This function initializes the USB mass storage class BOT protocol.
It will save its context which is a USB_BOT_PROTOCOL structure
in the Context if Context isn't NULL.
@param UsbIo The USB I/O Protocol instance
@param Context The buffer to save the context to
@retval EFI_SUCCESS The device is successfully initialized.
@retval EFI_UNSUPPORTED The transport protocol doesn't support the device.
@retval Other The USB BOT initialization fails.
**/
);
/**
Call the USB Mass Storage Class BOT protocol to issue
@param Context The context of the BOT protocol, that is,
USB_BOT_PROTOCOL
@param Cmd The high level command
@param CmdLen The command length
@param DataDir The direction of the data transfer
@param Data The buffer to hold data
@param DataLen The length of the data
@param Lun The number of logic unit
@param Timeout The time to wait command
@param CmdStatus The result of high level command execution
@retval EFI_SUCCESS The command is executed successfully.
@retval Other Failed to excute command
**/
);
/**
Reset the USB mass storage device by BOT protocol.
@param Context The context of the BOT protocol, that is,
USB_BOT_PROTOCOL.
@param ExtendedVerification If FALSE, just issue Bulk-Only Mass Storage Reset request.
If TRUE, additionally reset parent hub port.
@retval EFI_SUCCESS The device is reset.
@retval Others Failed to reset the device..
**/
);
/**
Get the max LUN (Logical Unit Number) of USB mass storage device.
@param Context The context of the BOT protocol, that is, USB_BOT_PROTOCOL
@param MaxLun Return pointer to the max number of LUN. (e.g. MaxLun=1 means LUN0 and
LUN1 in all.)
@retval EFI_SUCCESS Max LUN is got successfully.
@retval Others Fail to execute this request.
**/
);
/**
Clean up the resource used by this BOT protocol.
@param Context The context of the BOT protocol, that is, USB_BOT_PROTOCOL.
@retval EFI_SUCCESS The resource is cleaned up.
**/
);
#endif