mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
[USBHUB]
- Handle errors returned from the HCD correctly [USBEHCI] - Discard any changes on ports that were given to the companion controller svn path=/trunk/; revision=55851
This commit is contained in:
@@ -1446,6 +1446,15 @@ EhciDefferedRoutine(
|
||||
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
|
||||
//
|
||||
|
||||
@@ -300,6 +300,7 @@ DeviceStatusChangeThread(
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Failed to clear connection change for port %d\n", PortId);
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -313,6 +314,7 @@ DeviceStatusChangeThread(
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Failed to delete child device object after disconnect\n");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -328,6 +330,7 @@ DeviceStatusChangeThread(
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Failed to reset port %d\n", PortId);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -340,6 +343,7 @@ DeviceStatusChangeThread(
|
||||
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 @@ DeviceStatusChangeThread(
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Failed to clear reset change on port %d\n", PortId);
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -373,6 +378,7 @@ DeviceStatusChangeThread(
|
||||
if(PortStatus.Change & USB_PORT_STATUS_RESET)
|
||||
{
|
||||
DPRINT1("Port did not clear reset! Possible Hardware problem!\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user