Revision: 14442
          http://sourceforge.net/p/edk2/code/14442
Author:   erictian
Date:     2013-06-24 03:03:55 +0000 (Mon, 24 Jun 2013)
Log Message:
-----------
MdeModulePkg/Usb: Boost the r/w performance by reducing stall time on polling 
cmd execution status

Signed-off-by: Feng Tian <[email protected]>
Reviewed-by: Star Zeng <[email protected]>
Reviewed-by: Elvin Li <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c
    trunk/edk2/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c
    trunk/edk2/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c
    trunk/edk2/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c
    trunk/edk2/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c
    trunk/edk2/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.h
    trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h
    trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
    trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusPei/UsbIoPeim.c
    trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h
    trunk/edk2/MdeModulePkg/Include/Ppi/Usb2HostController.h
    trunk/edk2/MdeModulePkg/Include/Ppi/UsbHostController.h
    trunk/edk2/MdeModulePkg/Include/Ppi/UsbIo.h

Modified: trunk/edk2/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c 2013-06-21 21:20:03 UTC 
(rev 14441)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c 2013-06-24 03:03:55 UTC 
(rev 14442)
@@ -2,7 +2,7 @@
 
   EHCI transfer scheduling routines.
 
-Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2013, 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
@@ -694,7 +694,7 @@
   BOOLEAN                 InfiniteLoop;
 
   Status       = EFI_SUCCESS;
-  Loop         = (TimeOut * EHC_1_MILLISECOND / EHC_SYNC_POLL_INTERVAL) + 1;
+  Loop         = TimeOut * EHC_1_MILLISECOND;
   Finished     = FALSE;
   InfiniteLoop = FALSE;
 
@@ -714,7 +714,7 @@
       break;
     }
 
-    gBS->Stall (EHC_SYNC_POLL_INTERVAL);
+    gBS->Stall (EHC_1_MICROSECOND);
   }
 
   if (!Finished) {

Modified: trunk/edk2/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c   2013-06-21 21:20:03 UTC 
(rev 14441)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c   2013-06-24 03:03:55 UTC 
(rev 14442)
@@ -2,7 +2,7 @@
 PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid
 which is used to enable recovery function from USB Drivers.
 
-Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>
   
 This program and the accompanying materials
 are licensed and made available under the terms and conditions
@@ -532,6 +532,8 @@
                                 the subsequent bulk transfer.
   @param  TimeOut               Indicates the maximum time, in millisecond, 
which the
                                 transfer is allowed to complete.
+                                If Timeout is 0, then the caller must wait for 
the function
+                                to be completed until EFI_SUCCESS or 
EFI_DEVICE_ERROR is returned.
   @param  Translator            A pointr to the transaction translator data.   
                             
   @param  TransferResult        A pointer to the detailed result information 
of the
                                 bulk transfer.
@@ -995,6 +997,8 @@
   @param  Data                   Data buffer to be transmitted or received 
from USB device.
   @param  DataLength             The size (in bytes) of the data buffer.
   @param  TimeOut                Indicates the maximum timeout, in millisecond.
+                                 If Timeout is 0, then the caller must wait 
for the function
+                                 to be completed until EFI_SUCCESS or 
EFI_DEVICE_ERROR is returned.
   @param  Translator             Transaction translator to be used by this 
device.
   @param  TransferResult         Return the result of this control transfer.
 

Modified: trunk/edk2/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c 2013-06-21 21:20:03 UTC 
(rev 14441)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c 2013-06-24 03:03:55 UTC 
(rev 14442)
@@ -2,7 +2,7 @@
 PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid
 which is used to enable recovery function from USB Drivers.
 
-Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>
   
 This program and the accompanying materials
 are licensed and made available under the terms and conditions
@@ -425,19 +425,29 @@
   UINTN                   Index;
   UINTN                   Loop;
   BOOLEAN                 Finished;
+  BOOLEAN                 InfiniteLoop;
 
   Status    = EFI_SUCCESS;
-  Loop      = (TimeOut * EHC_1_MILLISECOND / EHC_SYNC_POLL_INTERVAL) + 1;
-  Finished  = FALSE;
+  Loop      = TimeOut * EHC_1_MILLISECOND;
+  Finished     = FALSE;
+  InfiniteLoop = FALSE;
 
-  for (Index = 0; Index < Loop; Index++) {
+  //
+  // If Timeout is 0, then the caller must wait for the function to be 
completed
+  // until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.
+  //
+  if (TimeOut == 0) {
+    InfiniteLoop = TRUE;
+  }
+
+  for (Index = 0; InfiniteLoop || (Index < Loop); Index++) {
     Finished = EhcCheckUrbResult (Ehc, Urb);
 
     if (Finished) {
       break;
     }
 
-    MicroSecondDelay (EHC_SYNC_POLL_INTERVAL);
+    MicroSecondDelay (EHC_1_MICROSECOND);
   }
 
   if (!Finished) {

Modified: trunk/edk2/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c 2013-06-21 21:20:03 UTC 
(rev 14441)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c 2013-06-24 03:03:55 UTC 
(rev 14442)
@@ -2,7 +2,7 @@
 
   The EHCI register operation routines.
 
-Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2013, 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
@@ -580,7 +580,7 @@
 
   Finished     = FALSE;
   Status       = EFI_SUCCESS;
-  Delay        = (TimeOut * UHC_1_MILLISECOND / UHC_SYNC_POLL_INTERVAL) + 1;
+  Delay        = TimeOut * UHC_1_MILLISECOND;
   InfiniteLoop = FALSE;
 
   //
@@ -602,7 +602,7 @@
       break;
     }
 
-    gBS->Stall (UHC_SYNC_POLL_INTERVAL);
+    gBS->Stall (UHC_1_MICROSECOND);
   }
 
   if (!Finished) {

Modified: trunk/edk2/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c   2013-06-21 21:20:03 UTC 
(rev 14441)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c   2013-06-24 03:03:55 UTC 
(rev 14442)
@@ -2,7 +2,7 @@
 PEIM to produce gPeiUsbHostControllerPpiGuid based on gPeiUsbControllerPpiGuid
 which is used to enable recovery function from USB Drivers.
 
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. <BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved. <BR>
   
 This program and the accompanying materials
 are licensed and made available under the terms and conditions
@@ -153,6 +153,8 @@
   @param  Data                   Data buffer to be transmitted or received 
from USB device.
   @param  DataLength             The size (in bytes) of the data buffer.
   @param  TimeOut                Indicates the maximum timeout, in millisecond.
+                                 If Timeout is 0, then the caller must wait 
for the function
+                                 to be completed until EFI_SUCCESS or 
EFI_DEVICE_ERROR is returned.
   @param  TransferResult         Return the result of this control transfer.
 
   @retval EFI_SUCCESS            Transfer was completed successfully.
@@ -391,6 +393,8 @@
                                 the subsequent bulk transfer.
   @param  TimeOut               Indicates the maximum time, in millisecond, 
which the
                                 transfer is allowed to complete.
+                                If Timeout is 0, then the caller must wait for 
the function
+                                to be completed until EFI_SUCCESS or 
EFI_DEVICE_ERROR is returned.
   @param  TransferResult        A pointer to the detailed result information 
of the
                                 bulk transfer.
 
@@ -2508,12 +2512,21 @@
 {
   UINTN   ErrTDPos;
   UINTN   Delay;
+  BOOLEAN InfiniteLoop;
 
   ErrTDPos          = 0;
   *TransferResult   = EFI_USB_NOERROR;
   *ActualLen        = 0;
+  InfiniteLoop      = FALSE;
 
-  Delay = (TimeOut * STALL_1_MILLI_SECOND / 200) + 1;
+  Delay = TimeOut * STALL_1_MILLI_SECOND;
+  //
+  // If Timeout is 0, then the caller must wait for the function to be 
completed
+  // until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.
+  //
+  if (TimeOut == 0) {
+    InfiniteLoop = TRUE;
+  }
 
   do {
 
@@ -2525,12 +2538,11 @@
     if ((*TransferResult & EFI_USB_ERR_NOTEXECUTE) != EFI_USB_ERR_NOTEXECUTE) {
       break;
     }
-    MicroSecondDelay (200);
+    MicroSecondDelay (STALL_1_MICRO_SECOND);
     Delay--;
 
-  } while (Delay != 0);
+  } while (InfiniteLoop || (Delay != 0));
 
-
   if (*TransferResult != EFI_USB_NOERROR) {
     return EFI_DEVICE_ERROR;
   }
@@ -2566,12 +2578,21 @@
   UINTN   ErrTDPos;
   UINTN   ScrollNum;
   UINTN   Delay;
+  BOOLEAN InfiniteLoop;
 
   ErrTDPos          = 0;
   *TransferResult   = EFI_USB_NOERROR;
   *ActualLen        = 0;
+  InfiniteLoop      = FALSE;
 
-  Delay = (TimeOut * STALL_1_MILLI_SECOND / 200) + 1;
+  Delay = TimeOut * STALL_1_MILLI_SECOND;
+  //
+  // If Timeout is 0, then the caller must wait for the function to be 
completed
+  // until EFI_SUCCESS or EFI_DEVICE_ERROR is returned.
+  //
+  if (TimeOut == 0) {
+    InfiniteLoop = TRUE;
+  }
 
   do {
 
@@ -2582,10 +2603,10 @@
     if ((*TransferResult & EFI_USB_ERR_NOTEXECUTE) != EFI_USB_ERR_NOTEXECUTE) {
       break;
     }
-    MicroSecondDelay (200);
+    MicroSecondDelay (STALL_1_MICRO_SECOND);
     Delay--;
 
-  } while (Delay != 0);
+  } while (InfiniteLoop || (Delay != 0));
 
   //
   // has error

Modified: trunk/edk2/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.h
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.h   2013-06-21 21:20:03 UTC 
(rev 14441)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.h   2013-06-24 03:03:55 UTC 
(rev 14442)
@@ -1,7 +1,7 @@
 /** @file
 Private Header file for Usb Host Controller PEIM
 
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
   
 This program and the accompanying materials
 are licensed and made available under the terms and conditions
@@ -94,6 +94,7 @@
 #define OUTPUT_PACKET_ID      0xE1
 #define ERROR_PACKET_ID       0x55
 
+#define STALL_1_MICRO_SECOND  1
 #define STALL_1_MILLI_SECOND  1000
 
 

Modified: trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h      2013-06-21 21:20:03 UTC 
(rev 14441)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h      2013-06-24 03:03:55 UTC 
(rev 14442)
@@ -2,7 +2,7 @@
 
   Provides some data structure definitions used by the XHCI host controller 
driver.
 
-Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2013, 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
@@ -42,6 +42,10 @@
 #include "ComponentName.h"
 
 //
+// The unit is microsecond, setting it as 1us.
+//
+#define XHC_1_MICROSECOND            (1)
+//
 // Convert millisecond to microsecond.
 //
 #define XHC_1_MILLISECOND            (1000)

Modified: trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c 2013-06-21 21:20:03 UTC 
(rev 14441)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c 2013-06-24 03:03:55 UTC 
(rev 14442)
@@ -2,7 +2,7 @@
 
   XHCI transfer scheduling routines.
 
-Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2013, 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
@@ -1101,7 +1101,7 @@
   }
 
   Status = EFI_SUCCESS;
-  Loop   = (Timeout * XHC_1_MILLISECOND / XHC_POLL_DELAY) + 1;
+  Loop   = Timeout * XHC_1_MILLISECOND;
   if (Timeout == 0) {
     Loop = 0xFFFFFFFF;
   }
@@ -1113,7 +1113,7 @@
     if (Urb->Finished) {
       break;
     }
-    gBS->Stall (XHC_POLL_DELAY);
+    gBS->Stall (XHC_1_MICROSECOND);
   }
 
   if (Index == Loop) {

Modified: trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusPei/UsbIoPeim.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusPei/UsbIoPeim.c       2013-06-21 
21:20:03 UTC (rev 14441)
+++ trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusPei/UsbIoPeim.c       2013-06-24 
03:03:55 UTC (rev 14442)
@@ -1,7 +1,7 @@
 /** @file
 The module is used to implement Usb Io PPI interfaces.
 
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. <BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved. <BR>
   
 This program and the accompanying materials
 are licensed and made available under the terms and conditions
@@ -24,7 +24,9 @@
   @param  This                   The pointer of PEI_USB_IO_PPI.
   @param  Request                USB device request to send.
   @param  Direction              Specifies the data direction for the data 
stage.
-  @param  Timeout                Indicates the maximum timeout, in millisecond.
+  @param  Timeout                Indicates the maximum timeout, in 
millisecond. If Timeout
+                                 is 0, then the caller must wait for the 
function to be
+                                 completed until EFI_SUCCESS or 
EFI_DEVICE_ERROR is returned.
   @param  Data                   Data buffer to be transmitted or received 
from USB device.
   @param  DataLength             The size (in bytes) of the data buffer.
 
@@ -96,7 +98,9 @@
                                 from or receive into.
   @param  DataLength            The lenght of the data buffer.
   @param  Timeout               Indicates the maximum time, in millisecond, 
which the
-                                transfer is allowed to complete.
+                                transfer is allowed to complete. If Timeout is 
0, then
+                                the caller must wait for the function to be 
completed
+                                until EFI_SUCCESS or EFI_DEVICE_ERROR is 
returned.
 
   @retval EFI_SUCCESS           The transfer was completed successfully.
   @retval EFI_OUT_OF_RESOURCES  The transfer failed due to lack of resource.

Modified: trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h 2013-06-21 21:20:03 UTC 
(rev 14441)
+++ trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h 2013-06-24 03:03:55 UTC 
(rev 14442)
@@ -1,7 +1,7 @@
 /** @file
 Usb Peim definition.
 
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. <BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved. <BR>
   
 This program and the accompanying materials
 are licensed and made available under the terms and conditions
@@ -71,7 +71,9 @@
   @param  This                   The pointer of PEI_USB_IO_PPI.
   @param  Request                USB device request to send.
   @param  Direction              Specifies the data direction for the data 
stage.
-  @param  Timeout                Indicates the maximum timeout, in millisecond.
+  @param  Timeout                Indicates the maximum timeout, in 
millisecond. If Timeout
+                                 is 0, then the caller must wait for the 
function to be
+                                 completed until EFI_SUCCESS or 
EFI_DEVICE_ERROR is returned.
   @param  Data                   Data buffer to be transmitted or received 
from USB device.
   @param  DataLength             The size (in bytes) of the data buffer.
 
@@ -104,7 +106,9 @@
                                 from or receive into.
   @param  DataLength            The lenght of the data buffer.
   @param  Timeout               Indicates the maximum time, in millisecond, 
which the
-                                transfer is allowed to complete.
+                                transfer is allowed to complete. If Timeout is 
0, then
+                                the caller must wait for the function to be 
completed
+                                until EFI_SUCCESS or EFI_DEVICE_ERROR is 
returned.
 
   @retval EFI_SUCCESS           The transfer was completed successfully.
   @retval EFI_OUT_OF_RESOURCES  The transfer failed due to lack of resource.

Modified: trunk/edk2/MdeModulePkg/Include/Ppi/Usb2HostController.h
===================================================================
--- trunk/edk2/MdeModulePkg/Include/Ppi/Usb2HostController.h    2013-06-21 
21:20:03 UTC (rev 14441)
+++ trunk/edk2/MdeModulePkg/Include/Ppi/Usb2HostController.h    2013-06-24 
03:03:55 UTC (rev 14442)
@@ -5,7 +5,7 @@
   Refer to section 16.1 of the UEFI 2.3 Specification for more information on 
   these interfaces.
  
-Copyright (c) 2010, Intel Corporation. All rights reserved. <BR>
+Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved. <BR>
 
 This program and the accompanying materials
 are licensed and made available under the terms and conditions
@@ -62,6 +62,9 @@
                                        actually transferred.
   @param[in]     TimeOut               Indicates the maximum time, in 
milliseconds, 
                                        that the transfer is allowed to 
complete.
+                                       If Timeout is 0, then the caller must 
wait for
+                                       the function to be completed until 
EFI_SUCCESS
+                                       or EFI_DEVICE_ERROR is returned.
   @param[in]     Translator            A pointer to the transaction translator 
data.
   @param[out]    TransferResult        A pointer to the detailed result 
information 
                                        generated by this control transfer.
@@ -114,6 +117,9 @@
   @param[in,out] DataToggle            A pointer to the data toggle value.
   @param[in]     TimeOut               Indicates the maximum time, in 
milliseconds,
                                        in which the transfer is allowed to 
complete.
+                                       If Timeout is 0, then the caller must 
wait for
+                                       the function to be completed until 
EFI_SUCCESS
+                                       or EFI_DEVICE_ERROR is returned.
   @param[in]     Translator            A pointer to the transaction translator 
data.
   @param[out]    TransferResult        A pointer to the detailed result 
information 
                                        of the bulk transfer.

Modified: trunk/edk2/MdeModulePkg/Include/Ppi/UsbHostController.h
===================================================================
--- trunk/edk2/MdeModulePkg/Include/Ppi/UsbHostController.h     2013-06-21 
21:20:03 UTC (rev 14441)
+++ trunk/edk2/MdeModulePkg/Include/Ppi/UsbHostController.h     2013-06-24 
03:03:55 UTC (rev 14442)
@@ -5,7 +5,7 @@
   Refer to section 16.1 of the UEFI 2.3 Specification for more information on 
   these interfaces.
  
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
 
 This program and the accompanying materials
 are licensed and made available under the terms and conditions
@@ -61,7 +61,10 @@
                                        On output, indicates the amount of data 
                                        actually transferred.
   @param[in]     TimeOut               Indicates the maximum time, in 
milliseconds, 
-                                       that the transfer is allowed to 
complete.
+                                       that the transfer is allowed to 
complete. 
+                                       If Timeout is 0, then the caller must 
wait for
+                                       the function to be completed until 
EFI_SUCCESS
+                                       or EFI_DEVICE_ERROR is returned.
   @param[out]    TransferResult        A pointer to the detailed result 
information 
                                        generated by this control transfer.
 
@@ -107,6 +110,9 @@
   @param[in,out] DataToggle            A pointer to the data toggle value.
   @param[in]     TimeOut               Indicates the maximum time, in 
milliseconds,
                                        in which the transfer is allowed to 
complete.
+                                       If Timeout is 0, then the caller must 
wait for
+                                       the function to be completed until 
EFI_SUCCESS
+                                       or EFI_DEVICE_ERROR is returned.
   @param[out]    TransferResult        A pointer to the detailed result 
information 
                                        of the bulk transfer.
 

Modified: trunk/edk2/MdeModulePkg/Include/Ppi/UsbIo.h
===================================================================
--- trunk/edk2/MdeModulePkg/Include/Ppi/UsbIo.h 2013-06-21 21:20:03 UTC (rev 
14441)
+++ trunk/edk2/MdeModulePkg/Include/Ppi/UsbIo.h 2013-06-24 03:03:55 UTC (rev 
14442)
@@ -6,7 +6,7 @@
   Refer to section 16.2.4 of the UEFI 2.3 Specification for more information 
on 
   these interfaces.
 
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
 
 This program and the accompanying materials
 are licensed and made available under the terms and conditions
@@ -47,8 +47,11 @@
   @param[in]     Direction     Specifies the data direction for the transfer. 
There 
                                are three values available: 
                                EfiUsbDataIn, EfiUsbDataOut and EfiUsbNoData.
-  @param[in]     TimeOut       Indicates the maximum time, in milliseconds, 
that 
+  @param[in]     Timeout       Indicates the maximum time, in milliseconds, 
that 
                                the transfer is allowed to complete.
+                               If Timeout is 0, then the caller must wait for 
the
+                               function to be completed until EFI_SUCCESS or
+                               EFI_DEVICE_ERROR is returned.
   @param[in,out] Data          A pointer to the buffer of data that will be 
                                transmitted to or received from the USB device.
   @param[in]     DataLength    On input, indicates the size, in bytes, of the 
data 
@@ -82,10 +85,13 @@
 
   @param[in] PeiServices       The pointer to the PEI Services Table.
   @param[in] This              The pointer to this instance of the 
PEI_USB_IO_PPI.
-  @param[in] EndPointAddress   The endpoint address.
+  @param[in] DeviceEndpoint    The endpoint address.
   @param[in] Data              The data buffer to be transfered.
   @param[in] DataLength        The length of data buffer.
-  @param[in] TimeOut           The timeout for the transfer, in milliseconds.
+  @param[in] Timeout           The timeout for the transfer, in milliseconds.
+                               If Timeout is 0, then the caller must wait for 
the
+                               function to be completed until EFI_SUCCESS or
+                               EFI_DEVICE_ERROR is returned.
 
   @retval EFI_SUCCESS             The bulk transfer completed successfully.
   @retval EFI_INVALID_PARAMETER   Some parameters are invalid.

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to