From ca243131657ba03f58206a417b938aa14cff585c Mon Sep 17 00:00:00 2001 From: Feng Tian Date: Mon, 24 Jun 2013 03:03:55 +0000 Subject: MdeModulePkg/Usb: Boost the r/w performance by reducing stall time on polling cmd execution status Signed-off-by: Feng Tian Reviewed-by: Star Zeng Reviewed-by: Elvin Li git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14442 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h | 6 +++++- MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'MdeModulePkg/Bus/Pci/XhciDxe') diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h index ae56b1e6fe..ada961f611 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h +++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h @@ -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.
+Copyright (c) 2011 - 2013, 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 which accompanies this distribution. The full text of the license may be found at @@ -41,6 +41,10 @@ typedef struct _USB_DEV_CONTEXT USB_DEV_CONTEXT; #include "XhciSched.h" #include "ComponentName.h" +// +// The unit is microsecond, setting it as 1us. +// +#define XHC_1_MICROSECOND (1) // // Convert millisecond to microsecond. // diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c index e6c0d15642..f80ef81834 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c @@ -2,7 +2,7 @@ XHCI transfer scheduling routines. -Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2013, 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 which accompanies this distribution. The full text of the license may be found at @@ -1101,7 +1101,7 @@ XhcExecTransfer ( } 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 @@ XhcExecTransfer ( if (Urb->Finished) { break; } - gBS->Stall (XHC_POLL_DELAY); + gBS->Stall (XHC_1_MICROSECOND); } if (Index == Loop) { -- cgit v1.2.3