Revision: 14797
http://sourceforge.net/p/edk2/code/14797
Author: erictian
Date: 2013-10-23 05:35:07 +0000 (Wed, 23 Oct 2013)
Log Message:
-----------
MdeModulePkg/XhciDxe: Dynamically calculate the interval value of interrupt
endpoint context of low/full speed device behind low/full speed hub.
Signed-off-by: Tian, Feng <[email protected]>
reviewed-by: Li, Elvin <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
Modified: trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c 2013-10-22 08:49:50 UTC
(rev 14796)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c 2013-10-23 05:35:07 UTC
(rev 14797)
@@ -2633,9 +2633,10 @@
if ((DeviceSpeed == EFI_USB_SPEED_FULL) || (DeviceSpeed ==
EFI_USB_SPEED_LOW)) {
Interval = EpDesc->Interval;
//
- // Hard code the interval to MAX first, need calculate through the
bInterval field of Endpoint descriptor.
+ // Calculate through the bInterval field of Endpoint descriptor.
//
- InputContext->EP[Dci-1].Interval = 6;
+ ASSERT (Interval != 0);
+ InputContext->EP[Dci-1].Interval =
(UINT32)HighBitSet32((UINT32)Interval) + 3;
} else if ((DeviceSpeed == EFI_USB_SPEED_HIGH) || (DeviceSpeed ==
EFI_USB_SPEED_SUPER)) {
Interval = EpDesc->Interval;
ASSERT (Interval >= 1 && Interval <= 16);
@@ -2830,9 +2831,10 @@
if ((DeviceSpeed == EFI_USB_SPEED_FULL) || (DeviceSpeed ==
EFI_USB_SPEED_LOW)) {
Interval = EpDesc->Interval;
//
- // Hard code the interval to MAX first, need calculate through the
bInterval field of Endpoint descriptor.
+ // Calculate through the bInterval field of Endpoint descriptor.
//
- InputContext->EP[Dci-1].Interval = 6;
+ ASSERT (Interval != 0);
+ InputContext->EP[Dci-1].Interval =
(UINT32)HighBitSet32((UINT32)Interval) + 3;
} else if ((DeviceSpeed == EFI_USB_SPEED_HIGH) || (DeviceSpeed ==
EFI_USB_SPEED_SUPER)) {
Interval = EpDesc->Interval;
ASSERT (Interval >= 1 && Interval <= 16);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits