X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FBus%2FPci%2FXhciPei%2FXhciSched.c;h=3dd2b8909787180ec94bc19af05c382a838d7ca1;hp=7a63dabd8c1d978d1bab5d6249ff592dfa086b86;hb=3719c2aa879bcbcf3f0ab1f710e81fe2dbc19d9a;hpb=213da0b540891ba614753673ce3ed54940434497 diff --git a/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c b/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c index 7a63dabd8c..3dd2b89097 100644 --- a/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c +++ b/MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c @@ -2,7 +2,7 @@ PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid which is used to enable recovery function from USB Drivers. -Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -1749,6 +1749,20 @@ XhcPeiSetConfigCmd ( InputContext->EP[Dci-1].CErr = 0; InputContext->EP[Dci-1].EPType = ED_ISOCH_OUT; } + // + // Get the bInterval from descriptor and init the the interval field of endpoint context. + // Refer to XHCI 1.1 spec section 6.2.3.6. + // + if (DeviceSpeed == EFI_USB_SPEED_FULL) { + Interval = EpDesc->Interval; + ASSERT (Interval >= 1 && Interval <= 16); + InputContext->EP[Dci-1].Interval = Interval + 2; + } else if ((DeviceSpeed == EFI_USB_SPEED_HIGH) || (DeviceSpeed == EFI_USB_SPEED_SUPER)) { + Interval = EpDesc->Interval; + ASSERT (Interval >= 1 && Interval <= 16); + InputContext->EP[Dci-1].Interval = Interval - 1; + } + // // Do not support isochronous transfer now. // @@ -1952,6 +1966,20 @@ XhcPeiSetConfigCmd64 ( InputContext->EP[Dci-1].CErr = 0; InputContext->EP[Dci-1].EPType = ED_ISOCH_OUT; } + // + // Get the bInterval from descriptor and init the the interval field of endpoint context. + // Refer to XHCI 1.1 spec section 6.2.3.6. + // + if (DeviceSpeed == EFI_USB_SPEED_FULL) { + Interval = EpDesc->Interval; + ASSERT (Interval >= 1 && Interval <= 16); + InputContext->EP[Dci-1].Interval = Interval + 2; + } else if ((DeviceSpeed == EFI_USB_SPEED_HIGH) || (DeviceSpeed == EFI_USB_SPEED_SUPER)) { + Interval = EpDesc->Interval; + ASSERT (Interval >= 1 && Interval <= 16); + InputContext->EP[Dci-1].Interval = Interval - 1; + } + // // Do not support isochronous transfer now. //