Author: cgutman
Date: Sat Feb 25 05:46:19 2012
New Revision: 55852
URL: http://svn.reactos.org/svn/reactos?rev=55852&view=rev
Log:
[USBHUB]
- Fix reset event handling in cases where reset does not end up in a new device created
- My MacBook Pro completes USB initialization free of hangs now (usbstor disabled)
Modified:
trunk/reactos/drivers/usb/usbhub/fdo.c
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 05:46:19 2012
@@ -330,6 +330,7 @@
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to reset port %d\n", PortId);
+ SignalResetComplete = TRUE;
continue;
}
}
@@ -348,6 +349,11 @@
}
else if (PortStatus.Change & USB_PORT_STATUS_RESET)
{
+ //
+ // Request event signalling later
+ //
+ SignalResetComplete = TRUE;
+
//
// Clear Reset
//
@@ -411,11 +417,6 @@
// This is a new device
//
Status = CreateUsbChildDeviceObject(DeviceObject, PortId, NULL, PortStatus.Status);
-
- //
- // Request event signalling later
- //
- SignalResetComplete = TRUE;
}
}
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;
}
//