X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EdkModulePkg%2FBus%2FUsb%2FUsbBus%2FDxe%2Fusbbus.c;h=7bbb6f7a06060d07aabde1066adcd20cb3327260;hp=1d1f44d63874e30f8cba948cb31ad857be97f808;hb=bd518502259f6ab7dba504fde834e1ac73b14dfd;hpb=562d28495df348923812281161e64bc9514e15e6 diff --git a/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c b/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c index 1d1f44d638..7bbb6f7a06 100644 --- a/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c +++ b/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c @@ -23,8 +23,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "usbbus.h" -UINTN gUSBDebugLevel = EFI_D_INFO; -UINTN gUSBErrorLevel = EFI_D_ERROR; + +GLOBAL_REMOVE_IF_UNREFERENCED UINTN gUSBDebugLevel = EFI_D_INFO; +GLOBAL_REMOVE_IF_UNREFERENCED UINTN gUSBErrorLevel = EFI_D_ERROR; // // The UsbBusProtocol is just used to locate USB_BUS_CONTROLLER @@ -1000,7 +1001,9 @@ UsbDeviceConfiguration ( // UsbIo = &FirstController->UsbIo; - ParentPortReset (FirstController, FALSE, 0); + if (UsbIoDevice->DeviceSpeed != EFI_USB_SPEED_HIGH) { + ParentPortReset (FirstController, FALSE, 0); + } // // First retrieve the 1st 8 bytes of @@ -2328,17 +2331,18 @@ UsbPortReset ( --*/ { USB_IO_CONTROLLER_DEVICE *UsbIoController; - EFI_STATUS Status; UsbIoController = USB_IO_CONTROLLER_DEVICE_FROM_USB_IO_THIS (This); + if (IsHub (UsbIoController)) { + return EFI_INVALID_PARAMETER; + } + // // Since at this time, this device has already been configured, // it needs to be re-configured. // - Status = ParentPortReset (UsbIoController, TRUE, 0); - - return Status; + return ParentPortReset (UsbIoController, TRUE, 0); } EFI_STATUS