if ((DeviceSpeed == EFI_USB_SPEED_FULL) || (DeviceSpeed == EFI_USB_SPEED_LOW)) {\r
Interval = EpDesc->Interval;\r
//\r
- // Hard code the interval to MAX first, need calculate through the bInterval field of Endpoint descriptor.\r
+ // Calculate through the bInterval field of Endpoint descriptor.\r
//\r
- InputContext->EP[Dci-1].Interval = 6;\r
+ ASSERT (Interval != 0);\r
+ InputContext->EP[Dci-1].Interval = (UINT32)HighBitSet32((UINT32)Interval) + 3;\r
} else if ((DeviceSpeed == EFI_USB_SPEED_HIGH) || (DeviceSpeed == EFI_USB_SPEED_SUPER)) {\r
Interval = EpDesc->Interval;\r
ASSERT (Interval >= 1 && Interval <= 16);\r
if ((DeviceSpeed == EFI_USB_SPEED_FULL) || (DeviceSpeed == EFI_USB_SPEED_LOW)) {\r
Interval = EpDesc->Interval;\r
//\r
- // Hard code the interval to MAX first, need calculate through the bInterval field of Endpoint descriptor.\r
+ // Calculate through the bInterval field of Endpoint descriptor.\r
//\r
- InputContext->EP[Dci-1].Interval = 6;\r
+ ASSERT (Interval != 0);\r
+ InputContext->EP[Dci-1].Interval = (UINT32)HighBitSet32((UINT32)Interval) + 3;\r
} else if ((DeviceSpeed == EFI_USB_SPEED_HIGH) || (DeviceSpeed == EFI_USB_SPEED_SUPER)) {\r
Interval = EpDesc->Interval;\r
ASSERT (Interval >= 1 && Interval <= 16);\r