}\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
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