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 <feng.tian@intel.com>
reviewed-by: Li, Elvin <elvin.li@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14797 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Tian, Feng 2013-10-23 05:35:07 +00:00 committed by erictian
parent 6cbbfa06d7
commit d62f9aa6e6
1 changed files with 6 additions and 4 deletions

View File

@ -2633,9 +2633,10 @@ XhcSetConfigCmd (
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 @@ XhcSetConfigCmd64 (
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);