Author: cgutman
Date: Mon Feb 20 09:23:33 2012
New Revision: 55742
URL:
http://svn.reactos.org/svn/reactos?rev=55742&view=rev
Log:
[USBEHCI]
- When releasing a low or full speed device, set the EHCI_PRT_RELEASEOWNERSHIP bit with
the current port status so that any change bits are acknowledged
- Fixes detecting new devices after a companion controller handoff
Modified:
trunk/reactos/drivers/usb/usbehci/hardware.cpp
Modified: trunk/reactos/drivers/usb/usbehci/hardware.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbehci/hardwa…
==============================================================================
--- trunk/reactos/drivers/usb/usbehci/hardware.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbehci/hardware.cpp [iso-8859-1] Mon Feb 20 09:23:33 2012
@@ -963,7 +963,7 @@
if (PortStatus & EHCI_PRT_SLOWSPEEDLINE)
{
DPRINT1("Non HighSpeed device. Releasing Ownership\n");
- EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * PortIndex),
EHCI_PRT_RELEASEOWNERSHIP);
+ EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * PortIndex), PortStatus |
EHCI_PRT_RELEASEOWNERSHIP);
return STATUS_DEVICE_NOT_CONNECTED;
}
@@ -1132,7 +1132,7 @@
if (Value & EHCI_PRT_SLOWSPEEDLINE)
{
DPRINT1("Non HighSpeed device. Releasing Ownership\n");
- EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * PortId),
EHCI_PRT_RELEASEOWNERSHIP);
+ EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * PortId), Value |
EHCI_PRT_RELEASEOWNERSHIP);
return STATUS_DEVICE_NOT_CONNECTED;
}
@@ -1478,9 +1478,6 @@
{
DPRINT1("Device connected on port %d\n", i);
- //
- //FIXME: Determine device speed
- //
if (This->m_Capabilities.HCSParams.CHCCount)
{
if (PortStatus & EHCI_PRT_ENABLED)
@@ -1491,7 +1488,7 @@
if (PortStatus & EHCI_PRT_SLOWSPEEDLINE)
{
DPRINT1("Non HighSpeed device connected. Release
ownership\n");
- This->EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * i),
EHCI_PRT_RELEASEOWNERSHIP);
+ This->EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * i),
PortStatus | EHCI_PRT_RELEASEOWNERSHIP);
continue;
}
}