]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c
After identified as a High-Speed device, the port has been reset successfully, so...
[mirror_edk2.git] / EdkModulePkg / Bus / Usb / UsbBus / Dxe / usbbus.c
index 1d1f44d63874e30f8cba948cb31ad857be97f808..7bbb6f7a06060d07aabde1066adcd20cb3327260 100644 (file)
@@ -23,8 +23,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "usbbus.h"\r
 \r
-UINTN                       gUSBDebugLevel  = EFI_D_INFO;\r
-UINTN                       gUSBErrorLevel  = EFI_D_ERROR;\r
+\r
+GLOBAL_REMOVE_IF_UNREFERENCED    UINTN    gUSBDebugLevel  = EFI_D_INFO;\r
+GLOBAL_REMOVE_IF_UNREFERENCED    UINTN    gUSBErrorLevel  = EFI_D_ERROR;\r
 \r
 //\r
 // The UsbBusProtocol is just used to locate USB_BUS_CONTROLLER\r
@@ -1000,7 +1001,9 @@ UsbDeviceConfiguration (
   //\r
   UsbIo = &FirstController->UsbIo;\r
 \r
-  ParentPortReset (FirstController, FALSE, 0);\r
+  if (UsbIoDevice->DeviceSpeed != EFI_USB_SPEED_HIGH) {\r
+    ParentPortReset (FirstController, FALSE, 0);\r
+  }\r
 \r
   //\r
   // First retrieve the 1st 8 bytes of\r
@@ -2328,17 +2331,18 @@ UsbPortReset (
 --*/\r
 {\r
   USB_IO_CONTROLLER_DEVICE  *UsbIoController;\r
-  EFI_STATUS                Status;\r
 \r
   UsbIoController = USB_IO_CONTROLLER_DEVICE_FROM_USB_IO_THIS (This);\r
 \r
+  if (IsHub (UsbIoController)) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+  \r
   //\r
   // Since at this time, this device has already been configured,\r
   // it needs to be re-configured.\r
   //\r
-  Status = ParentPortReset (UsbIoController, TRUE, 0);\r
-\r
-  return Status;\r
+  return ParentPortReset (UsbIoController, TRUE, 0);\r
 }\r
 \r
 EFI_STATUS\r