Author: cgutman
Date: Sat Feb 25 04:45:30 2012
New Revision: 55851
URL:
http://svn.reactos.org/svn/reactos?rev=55851&view=rev
Log:
[USBHUB]
- Handle errors returned from the HCD correctly
[USBEHCI]
- Discard any changes on ports that were given to the companion controller
Modified:
trunk/reactos/drivers/usb/usbehci/hardware.cpp
trunk/reactos/drivers/usb/usbhub/fdo.c
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] Sat Feb 25 04:45:30 2012
@@ -1446,6 +1446,15 @@
for (i = 0; i < PortCount; i++)
{
PortStatus = This->EHCI_READ_REGISTER_ULONG(EHCI_PORTSC + (4 * i));
+
+ // Check if we actually own the port
+ if (PortStatus & EHCI_PRT_RELEASEOWNERSHIP)
+ {
+ //Discard anything on this port but ack any status changes
+ This->EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * i), PortStatus);
+ continue;
+ }
+
//
// Device connected or removed
//
Modified: trunk/reactos/drivers/usb/usbhub/fdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbhub/fdo.c?r…
==============================================================================
--- trunk/reactos/drivers/usb/usbhub/fdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbhub/fdo.c [iso-8859-1] Sat Feb 25 04:45:30 2012
@@ -300,6 +300,7 @@
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to clear connection change for port %d\n",
PortId);
+ continue;
}
//
@@ -313,6 +314,7 @@
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to delete child device object after
disconnect\n");
+ continue;
}
}
else
@@ -328,6 +330,7 @@
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to reset port %d\n", PortId);
+ continue;
}
}
}
@@ -340,6 +343,7 @@
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to clear enable change on port %d\n", PortId);
+ continue;
}
}
else if (PortStatus.Change & USB_PORT_STATUS_RESET)
@@ -351,6 +355,7 @@
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to clear reset change on port %d\n", PortId);
+ continue;
}
//
@@ -373,6 +378,7 @@
if(PortStatus.Change & USB_PORT_STATUS_RESET)
{
DPRINT1("Port did not clear reset! Possible Hardware
problem!\n");
+ continue;
}
//