]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
MdeMdeModulePkg/Usb: two tunings for better device identification behind hub
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbBusDxe / UsbHub.c
index 2d24bb4b8a23484a2f6fea429a28d727af4c5df6..9e5299c0ef81ec6003bec64db0bae0f0a8dfdae3 100644 (file)
@@ -975,13 +975,13 @@ UsbHubResetPort (
   }\r
 \r
   //\r
-  // Drive the reset signal for at least 10ms. Check USB 2.0 Spec\r
+  // Drive the reset signal for worst 20ms. Check USB 2.0 Spec\r
   // section 7.1.7.5 for timing requirements.\r
   //\r
   gBS->Stall (USB_SET_PORT_RESET_STALL);\r
 \r
   //\r
-  // USB hub will clear RESET bit if reset is actually finished.\r
+  // Check USB_PORT_STAT_C_RESET bit to see if the resetting state is done.\r
   //\r
   ZeroMem (&PortState, sizeof (EFI_USB_PORT_STATUS));\r
 \r
@@ -989,8 +989,8 @@ UsbHubResetPort (
     Status = UsbHubGetPortStatus (HubIf, Port, &PortState);\r
 \r
     if (!EFI_ERROR (Status) &&\r
-        !USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_RESET)) {\r
-\r
+        USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_RESET)) {\r
+      gBS->Stall (USB_SET_PORT_RECOVERY_STALL);\r
       return EFI_SUCCESS;\r
     }\r
 \r