]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/Usb: Boost the r/w performance by reducing stall time on polling cmd...
authorFeng Tian <feng.tian@intel.com>
Mon, 24 Jun 2013 03:03:55 +0000 (03:03 +0000)
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 24 Jun 2013 03:03:55 +0000 (03:03 +0000)
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Elvin Li <elvin.li@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14442 6f19259b-4bc3-4df7-8a09-765794883524

13 files changed:
MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c
MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c
MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c
MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c
MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c
MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.h
MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h
MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
MdeModulePkg/Bus/Usb/UsbBusPei/UsbIoPeim.c
MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h
MdeModulePkg/Include/Ppi/Usb2HostController.h
MdeModulePkg/Include/Ppi/UsbHostController.h
MdeModulePkg/Include/Ppi/UsbIo.h

index 4dc8e1abf10c4c25910967f9ad46061b129eaeae..366ab84dcf63b868dde8638fd33e635165a56192 100644 (file)
@@ -2,7 +2,7 @@
 \r
   EHCI transfer scheduling routines.\r
 \r
-Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r
 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
@@ -694,7 +694,7 @@ EhcExecTransfer (
   BOOLEAN                 InfiniteLoop;\r
 \r
   Status       = EFI_SUCCESS;\r
-  Loop         = (TimeOut * EHC_1_MILLISECOND / EHC_SYNC_POLL_INTERVAL) + 1;\r
+  Loop         = TimeOut * EHC_1_MILLISECOND;\r
   Finished     = FALSE;\r
   InfiniteLoop = FALSE;\r
 \r
@@ -714,7 +714,7 @@ EhcExecTransfer (
       break;\r
     }\r
 \r
-    gBS->Stall (EHC_SYNC_POLL_INTERVAL);\r
+    gBS->Stall (EHC_1_MICROSECOND);\r
   }\r
 \r
   if (!Finished) {\r
index cefdf099159bd57f6ecf683ef4ca5fd29dfab8a7..09769eaf243aa23d3fa7f616328f7ca7985ef268 100644 (file)
@@ -2,7 +2,7 @@
 PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid\r
 which is used to enable recovery function from USB Drivers.\r
 \r
-Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>\r
   \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -532,6 +532,8 @@ EhcInitHC (
                                 the subsequent bulk transfer.\r
   @param  TimeOut               Indicates the maximum time, in millisecond, which the\r
                                 transfer is allowed to complete.\r
+                                If Timeout is 0, then the caller must wait for the function\r
+                                to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
   @param  Translator            A pointr to the transaction translator data.                                \r
   @param  TransferResult        A pointer to the detailed result information of the\r
                                 bulk transfer.\r
@@ -995,6 +997,8 @@ ON_EXIT:
   @param  Data                   Data buffer to be transmitted or received from USB device.\r
   @param  DataLength             The size (in bytes) of the data buffer.\r
   @param  TimeOut                Indicates the maximum timeout, in millisecond.\r
+                                 If Timeout is 0, then the caller must wait for the function\r
+                                 to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
   @param  Translator             Transaction translator to be used by this device.\r
   @param  TransferResult         Return the result of this control transfer.\r
 \r
index 1821a278da748225656db232a88e4d60b1598a9a..e992d4f287978fe5cb3af410d1782d0a43c610e6 100644 (file)
@@ -2,7 +2,7 @@
 PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid\r
 which is used to enable recovery function from USB Drivers.\r
 \r
-Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>\r
   \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -425,19 +425,29 @@ EhcExecTransfer (
   UINTN                   Index;\r
   UINTN                   Loop;\r
   BOOLEAN                 Finished;\r
+  BOOLEAN                 InfiniteLoop;\r
 \r
   Status    = EFI_SUCCESS;\r
-  Loop      = (TimeOut * EHC_1_MILLISECOND / EHC_SYNC_POLL_INTERVAL) + 1;\r
-  Finished  = FALSE;\r
+  Loop      = TimeOut * EHC_1_MILLISECOND;\r
+  Finished     = FALSE;\r
+  InfiniteLoop = FALSE;\r
 \r
-  for (Index = 0; Index < Loop; Index++) {\r
+  //\r
+  // If Timeout is 0, then the caller must wait for the function to be completed\r
+  // until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
+  //\r
+  if (TimeOut == 0) {\r
+    InfiniteLoop = TRUE;\r
+  }\r
+\r
+  for (Index = 0; InfiniteLoop || (Index < Loop); Index++) {\r
     Finished = EhcCheckUrbResult (Ehc, Urb);\r
 \r
     if (Finished) {\r
       break;\r
     }\r
 \r
-    MicroSecondDelay (EHC_SYNC_POLL_INTERVAL);\r
+    MicroSecondDelay (EHC_1_MICROSECOND);\r
   }\r
 \r
   if (!Finished) {\r
index 0d97bccabadd52c6b84da016a8d48210a9416348..af3f4e5ecd611c1b6c4b9feae8157e6f219daff1 100644 (file)
@@ -2,7 +2,7 @@
 \r
   The EHCI register operation routines.\r
 \r
-Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r
 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
@@ -580,7 +580,7 @@ UhciExecuteTransfer (
 \r
   Finished     = FALSE;\r
   Status       = EFI_SUCCESS;\r
-  Delay        = (TimeOut * UHC_1_MILLISECOND / UHC_SYNC_POLL_INTERVAL) + 1;\r
+  Delay        = TimeOut * UHC_1_MILLISECOND;\r
   InfiniteLoop = FALSE;\r
 \r
   //\r
@@ -602,7 +602,7 @@ UhciExecuteTransfer (
       break;\r
     }\r
 \r
-    gBS->Stall (UHC_SYNC_POLL_INTERVAL);\r
+    gBS->Stall (UHC_1_MICROSECOND);\r
   }\r
 \r
   if (!Finished) {\r
index f58b6943f2c5893c04a332d0f8db164d94ec874c..33f8c45d810724583d5d4911314cbdb414652f4b 100644 (file)
@@ -2,7 +2,7 @@
 PEIM to produce gPeiUsbHostControllerPpiGuid based on gPeiUsbControllerPpiGuid\r
 which is used to enable recovery function from USB Drivers.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved. <BR>\r
   \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -153,6 +153,8 @@ UhcPeimEntry (
   @param  Data                   Data buffer to be transmitted or received from USB device.\r
   @param  DataLength             The size (in bytes) of the data buffer.\r
   @param  TimeOut                Indicates the maximum timeout, in millisecond.\r
+                                 If Timeout is 0, then the caller must wait for the function\r
+                                 to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
   @param  TransferResult         Return the result of this control transfer.\r
 \r
   @retval EFI_SUCCESS            Transfer was completed successfully.\r
@@ -391,6 +393,8 @@ UhcControlTransfer (
                                 the subsequent bulk transfer.\r
   @param  TimeOut               Indicates the maximum time, in millisecond, which the\r
                                 transfer is allowed to complete.\r
+                                If Timeout is 0, then the caller must wait for the function\r
+                                to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
   @param  TransferResult        A pointer to the detailed result information of the\r
                                 bulk transfer.\r
 \r
@@ -2508,12 +2512,21 @@ ExecuteControlTransfer (
 {\r
   UINTN   ErrTDPos;\r
   UINTN   Delay;\r
+  BOOLEAN InfiniteLoop;\r
 \r
   ErrTDPos          = 0;\r
   *TransferResult   = EFI_USB_NOERROR;\r
   *ActualLen        = 0;\r
+  InfiniteLoop      = FALSE;\r
 \r
-  Delay = (TimeOut * STALL_1_MILLI_SECOND / 200) + 1;\r
+  Delay = TimeOut * STALL_1_MILLI_SECOND;\r
+  //\r
+  // If Timeout is 0, then the caller must wait for the function to be completed\r
+  // until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
+  //\r
+  if (TimeOut == 0) {\r
+    InfiniteLoop = TRUE;\r
+  }\r
 \r
   do {\r
 \r
@@ -2525,11 +2538,10 @@ ExecuteControlTransfer (
     if ((*TransferResult & EFI_USB_ERR_NOTEXECUTE) != EFI_USB_ERR_NOTEXECUTE) {\r
       break;\r
     }\r
-    MicroSecondDelay (200);\r
+    MicroSecondDelay (STALL_1_MICRO_SECOND);\r
     Delay--;\r
 \r
-  } while (Delay != 0);\r
-\r
+  } while (InfiniteLoop || (Delay != 0));\r
 \r
   if (*TransferResult != EFI_USB_NOERROR) {\r
     return EFI_DEVICE_ERROR;\r
@@ -2566,12 +2578,21 @@ ExecBulkTransfer (
   UINTN   ErrTDPos;\r
   UINTN   ScrollNum;\r
   UINTN   Delay;\r
+  BOOLEAN InfiniteLoop;\r
 \r
   ErrTDPos          = 0;\r
   *TransferResult   = EFI_USB_NOERROR;\r
   *ActualLen        = 0;\r
+  InfiniteLoop      = FALSE;\r
 \r
-  Delay = (TimeOut * STALL_1_MILLI_SECOND / 200) + 1;\r
+  Delay = TimeOut * STALL_1_MILLI_SECOND;\r
+  //\r
+  // If Timeout is 0, then the caller must wait for the function to be completed\r
+  // until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
+  //\r
+  if (TimeOut == 0) {\r
+    InfiniteLoop = TRUE;\r
+  }\r
 \r
   do {\r
 \r
@@ -2582,10 +2603,10 @@ ExecBulkTransfer (
     if ((*TransferResult & EFI_USB_ERR_NOTEXECUTE) != EFI_USB_ERR_NOTEXECUTE) {\r
       break;\r
     }\r
-    MicroSecondDelay (200);\r
+    MicroSecondDelay (STALL_1_MICRO_SECOND);\r
     Delay--;\r
 \r
-  } while (Delay != 0);\r
+  } while (InfiniteLoop || (Delay != 0));\r
 \r
   //\r
   // has error\r
index dc697ce105edbf0be3bd19715564ced52e4da4ae..460db7eab9c6a121b74f7a84061cf24aa382fc92 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Private Header file for Usb Host Controller PEIM\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
   \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -94,6 +94,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define OUTPUT_PACKET_ID      0xE1\r
 #define ERROR_PACKET_ID       0x55\r
 \r
+#define STALL_1_MICRO_SECOND  1\r
 #define STALL_1_MILLI_SECOND  1000\r
 \r
 \r
index ae56b1e6fe49c06ff2ab5d7cd8bd99f20eb6bd97..ada961f61133150cce265023275d4fdf0d1526e5 100644 (file)
@@ -2,7 +2,7 @@
 \r
   Provides some data structure definitions used by the XHCI host controller driver.\r
 \r
-Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>\r
 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
@@ -41,6 +41,10 @@ typedef struct _USB_DEV_CONTEXT      USB_DEV_CONTEXT;
 #include "XhciSched.h"\r
 #include "ComponentName.h"\r
 \r
+//\r
+// The unit is microsecond, setting it as 1us.\r
+//\r
+#define XHC_1_MICROSECOND            (1)\r
 //\r
 // Convert millisecond to microsecond.\r
 //\r
index e6c0d1564241ac99a6e7f3d7bf7fdc86ac40a55c..f80ef8183411f439011a7b550a0121b7318a7ec7 100644 (file)
@@ -2,7 +2,7 @@
 \r
   XHCI transfer scheduling routines.\r
 \r
-Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>\r
 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
@@ -1101,7 +1101,7 @@ XhcExecTransfer (
   }\r
 \r
   Status = EFI_SUCCESS;\r
-  Loop   = (Timeout * XHC_1_MILLISECOND / XHC_POLL_DELAY) + 1;\r
+  Loop   = Timeout * XHC_1_MILLISECOND;\r
   if (Timeout == 0) {\r
     Loop = 0xFFFFFFFF;\r
   }\r
@@ -1113,7 +1113,7 @@ XhcExecTransfer (
     if (Urb->Finished) {\r
       break;\r
     }\r
-    gBS->Stall (XHC_POLL_DELAY);\r
+    gBS->Stall (XHC_1_MICROSECOND);\r
   }\r
 \r
   if (Index == Loop) {\r
index 897b22896a2bc5d9a706df58ccfcc70697d354d4..e647cc46df8760376ec0decb90bffd6ae151dca5 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 The module is used to implement Usb Io PPI interfaces.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved. <BR>\r
   \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -24,7 +24,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   @param  This                   The pointer of PEI_USB_IO_PPI.\r
   @param  Request                USB device request to send.\r
   @param  Direction              Specifies the data direction for the data stage.\r
-  @param  Timeout                Indicates the maximum timeout, in millisecond.\r
+  @param  Timeout                Indicates the maximum timeout, in millisecond. If Timeout\r
+                                 is 0, then the caller must wait for the function to be\r
+                                 completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
   @param  Data                   Data buffer to be transmitted or received from USB device.\r
   @param  DataLength             The size (in bytes) of the data buffer.\r
 \r
@@ -96,7 +98,9 @@ PeiUsbControlTransfer (
                                 from or receive into.\r
   @param  DataLength            The lenght of the data buffer.\r
   @param  Timeout               Indicates the maximum time, in millisecond, which the\r
-                                transfer is allowed to complete.\r
+                                transfer is allowed to complete. If Timeout is 0, then\r
+                                the caller must wait for the function to be completed\r
+                                until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
 \r
   @retval EFI_SUCCESS           The transfer was completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  The transfer failed due to lack of resource.\r
index c9e75bad53df9cc9eef75e7c933ed400feb8b5a6..336a6373ae679ecabe58fc063f4728c6b2ffc392 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Usb Peim definition.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved. <BR>\r
   \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -71,7 +71,9 @@ typedef struct {
   @param  This                   The pointer of PEI_USB_IO_PPI.\r
   @param  Request                USB device request to send.\r
   @param  Direction              Specifies the data direction for the data stage.\r
-  @param  Timeout                Indicates the maximum timeout, in millisecond.\r
+  @param  Timeout                Indicates the maximum timeout, in millisecond. If Timeout\r
+                                 is 0, then the caller must wait for the function to be\r
+                                 completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
   @param  Data                   Data buffer to be transmitted or received from USB device.\r
   @param  DataLength             The size (in bytes) of the data buffer.\r
 \r
@@ -104,7 +106,9 @@ PeiUsbControlTransfer (
                                 from or receive into.\r
   @param  DataLength            The lenght of the data buffer.\r
   @param  Timeout               Indicates the maximum time, in millisecond, which the\r
-                                transfer is allowed to complete.\r
+                                transfer is allowed to complete. If Timeout is 0, then\r
+                                the caller must wait for the function to be completed\r
+                                until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
 \r
   @retval EFI_SUCCESS           The transfer was completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  The transfer failed due to lack of resource.\r
index e6d00ee92ea615a01c22b5dfce0881569fa53ed7..7bcb341a943c0413351a7187298f76ebc34862bc 100644 (file)
@@ -5,7 +5,7 @@
   Refer to section 16.1 of the UEFI 2.3 Specification for more information on \r
   these interfaces.\r
  \r
-Copyright (c) 2010, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved. <BR>\r
 \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -62,6 +62,9 @@ typedef struct _PEI_USB2_HOST_CONTROLLER_PPI PEI_USB2_HOST_CONTROLLER_PPI;
                                        actually transferred.\r
   @param[in]     TimeOut               Indicates the maximum time, in milliseconds, \r
                                        that the transfer is allowed to complete.\r
+                                       If Timeout is 0, then the caller must wait for\r
+                                       the function to be completed until EFI_SUCCESS\r
+                                       or EFI_DEVICE_ERROR is returned.\r
   @param[in]     Translator            A pointer to the transaction translator data.\r
   @param[out]    TransferResult        A pointer to the detailed result information \r
                                        generated by this control transfer.\r
@@ -114,6 +117,9 @@ EFI_STATUS
   @param[in,out] DataToggle            A pointer to the data toggle value.\r
   @param[in]     TimeOut               Indicates the maximum time, in milliseconds,\r
                                        in which the transfer is allowed to complete.\r
+                                       If Timeout is 0, then the caller must wait for\r
+                                       the function to be completed until EFI_SUCCESS\r
+                                       or EFI_DEVICE_ERROR is returned.\r
   @param[in]     Translator            A pointer to the transaction translator data.\r
   @param[out]    TransferResult        A pointer to the detailed result information \r
                                        of the bulk transfer.\r
index 107b7997d29311bdca8bb68f060d3c434034c38a..232a6667348b3ff9c97d840cfaaec585dfd7d26f 100644 (file)
@@ -5,7 +5,7 @@
   Refer to section 16.1 of the UEFI 2.3 Specification for more information on \r
   these interfaces.\r
  \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -61,7 +61,10 @@ typedef struct _PEI_USB_HOST_CONTROLLER_PPI PEI_USB_HOST_CONTROLLER_PPI;
                                        On output, indicates the amount of data \r
                                        actually transferred.\r
   @param[in]     TimeOut               Indicates the maximum time, in milliseconds, \r
-                                       that the transfer is allowed to complete.\r
+                                       that the transfer is allowed to complete. \r
+                                       If Timeout is 0, then the caller must wait for\r
+                                       the function to be completed until EFI_SUCCESS\r
+                                       or EFI_DEVICE_ERROR is returned.\r
   @param[out]    TransferResult        A pointer to the detailed result information \r
                                        generated by this control transfer.\r
 \r
@@ -107,6 +110,9 @@ EFI_STATUS
   @param[in,out] DataToggle            A pointer to the data toggle value.\r
   @param[in]     TimeOut               Indicates the maximum time, in milliseconds,\r
                                        in which the transfer is allowed to complete.\r
+                                       If Timeout is 0, then the caller must wait for\r
+                                       the function to be completed until EFI_SUCCESS\r
+                                       or EFI_DEVICE_ERROR is returned.\r
   @param[out]    TransferResult        A pointer to the detailed result information \r
                                        of the bulk transfer.\r
 \r
index 16660f88aed605c661bae33ff47e2592a73cd454..b024d4640a090cfe80089a6f1e4270a7db33ade6 100644 (file)
@@ -6,7 +6,7 @@
   Refer to section 16.2.4 of the UEFI 2.3 Specification for more information on \r
   these interfaces.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -47,8 +47,11 @@ typedef struct _PEI_USB_IO_PPI  PEI_USB_IO_PPI;
   @param[in]     Direction     Specifies the data direction for the transfer. There \r
                                are three values available: \r
                                EfiUsbDataIn, EfiUsbDataOut and EfiUsbNoData.\r
-  @param[in]     TimeOut       Indicates the maximum time, in milliseconds, that \r
+  @param[in]     Timeout       Indicates the maximum time, in milliseconds, that \r
                                the transfer is allowed to complete.\r
+                               If Timeout is 0, then the caller must wait for the\r
+                               function to be completed until EFI_SUCCESS or\r
+                               EFI_DEVICE_ERROR is returned.\r
   @param[in,out] Data          A pointer to the buffer of data that will be \r
                                transmitted to or received from the USB device.\r
   @param[in]     DataLength    On input, indicates the size, in bytes, of the data \r
@@ -82,10 +85,13 @@ EFI_STATUS
 \r
   @param[in] PeiServices       The pointer to the PEI Services Table.\r
   @param[in] This              The pointer to this instance of the PEI_USB_IO_PPI.\r
-  @param[in] EndPointAddress   The endpoint address.\r
+  @param[in] DeviceEndpoint    The endpoint address.\r
   @param[in] Data              The data buffer to be transfered.\r
   @param[in] DataLength        The length of data buffer.\r
-  @param[in] TimeOut           The timeout for the transfer, in milliseconds.\r
+  @param[in] Timeout           The timeout for the transfer, in milliseconds.\r
+                               If Timeout is 0, then the caller must wait for the\r
+                               function to be completed until EFI_SUCCESS or\r
+                               EFI_DEVICE_ERROR is returned.\r
 \r
   @retval EFI_SUCCESS             The bulk transfer completed successfully.\r
   @retval EFI_INVALID_PARAMETER   Some parameters are invalid.\r