]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.h
MdeModulePkg UsbBusPei: Fix wrong buffer length used to read hub desc
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbBusPei / HubPeim.h
index 273a26c1aeb452714878c8e52128c6caf7a832d2..341f6f32e3d0530dfa7a6870cc226f132dd442c9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Constants definitions for Usb Hub Peim\r
 \r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
   \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -80,6 +80,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define USB_RT_HUB        (USB_TYPE_CLASS | USB_RECIP_DEVICE)\r
 #define USB_RT_PORT       (USB_TYPE_CLASS | USB_RECIP_OTHER)\r
 \r
+#define USB_HUB_REQ_SET_DEPTH               12\r
+\r
 #define MAXBYTES  8\r
 #pragma pack(1)\r
 //\r
@@ -225,6 +227,7 @@ PeiHubClearHubFeature (
   Get a given hub descriptor.\r
 \r
   @param  PeiServices    General-purpose services that are available to every PEIM.\r
+  @param  PeiUsbDevice   Indicates the hub controller device.\r
   @param  UsbIoPpi       Indicates the PEI_USB_IO_PPI instance.\r
   @param  DescriptorSize The length of Hub Descriptor buffer.\r
   @param  HubDescriptor  Caller allocated buffer to store the hub descriptor if\r
@@ -238,6 +241,7 @@ PeiHubClearHubFeature (
 EFI_STATUS\r
 PeiGetHubDescriptor (\r
   IN EFI_PEI_SERVICES         **PeiServices,\r
+  IN PEI_USB_DEVICE           *PeiUsbDevice,\r
   IN PEI_USB_IO_PPI           *UsbIoPpi,\r
   IN UINTN                    DescriptorSize,\r
   OUT EFI_USB_HUB_DESCRIPTOR  *HubDescriptor\r