mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
[USBEHCI]
- Wait 20 milliseconds for port reset svn path=/branches/usb-bringup-trunk/; revision=55366
This commit is contained in:
parent
6c5ad5e239
commit
33c1f6019d
1 changed files with 16 additions and 1 deletions
|
@ -735,6 +735,7 @@ CUSBHardwareDevice::ResetPort(
|
|||
IN ULONG PortIndex)
|
||||
{
|
||||
ULONG PortStatus;
|
||||
LARGE_INTEGER Timeout;
|
||||
|
||||
if (PortIndex > m_Capabilities.HCSParams.PortCount)
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
|
@ -759,7 +760,21 @@ CUSBHardwareDevice::ResetPort(
|
|||
PortStatus &= ~EHCI_PRT_ENABLED;
|
||||
EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * PortIndex), PortStatus);
|
||||
|
||||
KeStallExecutionProcessor(100);
|
||||
//
|
||||
// delay is 20 ms for port reset as per USB 2.0 spec
|
||||
//
|
||||
Timeout.QuadPart = 20;
|
||||
DPRINT1("Waiting %d milliseconds for port reset\n", Timeout.LowPart);
|
||||
|
||||
//
|
||||
// convert to 100 ns units (absolute)
|
||||
//
|
||||
Timeout.QuadPart *= -10000;
|
||||
|
||||
//
|
||||
// perform the wait
|
||||
//
|
||||
KeDelayExecutionThread(KernelMode, FALSE, &Timeout);
|
||||
|
||||
//
|
||||
// Clear reset
|
||||
|
|
Loading…
Reference in a new issue