summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c47
1 files changed, 22 insertions, 25 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c
index 151b59e397..00c3c54a0d 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c
@@ -1,5 +1,9 @@
/** @file
+ Implementation of the USB mass storage Control/Bulk/Interrupt transpor.
+ Notice: it is being obseleted by the standard body in favor of the BOT
+ (Bulk-Only Transport).
+
Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -9,25 +13,24 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-Module Name:
-
- UsbMassCbi.c
+**/
-Abstract:
+#include "UsbMass.h"
+#include "UsbMassCbi.h"
- Implementation of the USB mass storage Control/Bulk/Interrupt transpor.
- Notice: it is being obseleted by the standard body in favor of the BOT
- (Bulk-Only Transport).
+/**
+ Call the Usb mass storage class transport protocol to
+ reset the device. The reset is defined as a Non-Data
+ command. Don't use UsbCbiExecCommand to send the command
+ to device because that may introduce recursive loop.
-Revision History
+ @param Context The USB CBI device protocol
+ @param ExtendedVerification The flag controlling the rule of reset
+ @retval EFI_SUCCESS the device is reset
+ @retval Others Failed to reset the device
**/
-
-#include "UsbMass.h"
-#include "UsbMassCbi.h"
-
-STATIC
EFI_STATUS
UsbCbiResetDevice (
IN VOID *Context,
@@ -45,9 +48,9 @@ UsbCbiResetDevice (
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory
@retval EFI_UNSUPPORTED The device isn't supported
@retval EFI_SUCCESS The CBI protocol is initialized.
+ @retval Other The Usb cbi init failed.
**/
-STATIC
EFI_STATUS
UsbCbiInit (
IN EFI_USB_IO_PROTOCOL *UsbIo,
@@ -150,7 +153,6 @@ ON_ERROR:
}
-
/**
Send the command to the device using class specific control transfer.
@@ -163,7 +165,6 @@ ON_ERROR:
@retval Others The command failed to transfer to device
**/
-STATIC
EFI_STATUS
UsbCbiSendCommand (
IN USB_CBI_PROTOCOL *UsbCbi,
@@ -238,7 +239,6 @@ UsbCbiSendCommand (
@retval Others Failed to transfer all the data
**/
-STATIC
EFI_STATUS
UsbCbiDataTransfer (
IN USB_CBI_PROTOCOL *UsbCbi,
@@ -355,7 +355,6 @@ ON_EXIT:
@retval Others Failed to retrieve the result.
**/
-STATIC
EFI_STATUS
UsbCbiGetStatus (
IN USB_CBI_PROTOCOL *UsbCbi,
@@ -403,7 +402,7 @@ UsbCbiGetStatus (
/**
- Execute USB mass storage command through the CBI0/CBI1 transport protocol
+ Execute USB mass storage command through the CBI0/CBI1 transport protocol.
@param Context The USB CBI device
@param Cmd The command to transfer to device
@@ -416,10 +415,9 @@ UsbCbiGetStatus (
@param CmdStatus The result of the command execution
@retval EFI_SUCCESS The command is executed OK and result in CmdStatus.
- @retval EFI_DEVICE_ERROR Failed to execute the command
+ @retval Other Failed to execute the command
**/
-STATIC
EFI_STATUS
UsbCbiExecCommand (
IN VOID *Context,
@@ -525,12 +523,12 @@ UsbCbiExecCommand (
to device because that may introduce recursive loop.
@param Context The USB CBI device protocol
+ @param ExtendedVerification The flag controlling the rule of reset
@retval EFI_SUCCESS the device is reset
@retval Others Failed to reset the device
**/
-STATIC
EFI_STATUS
UsbCbiResetDevice (
IN VOID *Context,
@@ -580,14 +578,13 @@ UsbCbiResetDevice (
/**
- Clean up the CBI protocol's resource
+ Clean up the CBI protocol's resource.
- @param Context The CBI protocol
+ @param Context The instance of CBI protocol.
@retval EFI_SUCCESS The resource is cleaned up.
**/
-STATIC
EFI_STATUS
UsbCbiFini (
IN VOID *Context