Author: cgutman
Date: Wed Feb 1 11:22:43 2012
New Revision: 55365
URL:
http://svn.reactos.org/svn/reactos?rev=55365&view=rev
Log:
[USBEHCI]
- Wait 20 milliseconds after enabling power for the port to stabilize
Modified:
branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp
Modified: branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
==============================================================================
--- branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp [iso-8859-1]
(original)
+++ branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp [iso-8859-1] Wed Feb
1 11:22:43 2012
@@ -957,11 +957,30 @@
{
if (m_Capabilities.HCSParams.PortPowerControl)
{
+ ULONG Value;
+ LARGE_INTEGER Timeout;
+
//
// enable port power
//
- ULONG Value = EHCI_READ_REGISTER_ULONG(EHCI_PORTSC + (4 * PortId)) |
EHCI_PRT_POWER;
+ Value = EHCI_READ_REGISTER_ULONG(EHCI_PORTSC + (4 * PortId)) |
EHCI_PRT_POWER;
EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC, Value);
+
+ //
+ // delay is 20 ms
+ //
+ Timeout.QuadPart = 20;
+ DPRINT1("Waiting %d milliseconds for port power up\n",
Timeout.LowPart);
+
+ //
+ // convert to 100 ns units (absolute)
+ //
+ Timeout.QuadPart *= -10000;
+
+ //
+ // perform the wait
+ //
+ KeDelayExecutionThread(KernelMode, FALSE, &Timeout);
}
}
return STATUS_SUCCESS;