\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
UsbBusControllerDriverSupported,\r
UsbBusControllerDriverStart,\r
UsbBusControllerDriverStop,\r
- 0x10,\r
+ 0xa,\r
NULL,\r
NULL\r
};\r
//\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
USB_IO_DEVICE *ChildDevice;\r
UINT8 Index;\r
EFI_USB_IO_PROTOCOL *UsbIo;\r
+ EFI_STATUS Status;\r
\r
//\r
// Double check UsbIoDevice exists\r
// Uninstall EFI_USB_IO_PROTOCOL & DEVICE_PATH_PROTOCOL\r
// installed on this handle\r
//\r
- gBS->UninstallMultipleProtocolInterfaces (\r
- UsbController->Handle,\r
- &gEfiDevicePathProtocolGuid,\r
- UsbController->DevicePath,\r
- &gEfiUsbIoProtocolGuid,\r
- &UsbController->UsbIo,\r
- NULL\r
- );\r
+ Status = gBS->UninstallMultipleProtocolInterfaces (\r
+ UsbController->Handle,\r
+ &gEfiDevicePathProtocolGuid,\r
+ UsbController->DevicePath,\r
+ &gEfiUsbIoProtocolGuid,\r
+ &UsbController->UsbIo,\r
+ NULL\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ return Status;\r
+ }\r
\r
if (UsbController->DevicePath != NULL) {\r
gBS->FreePool (UsbController->DevicePath);\r
--*/\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