13#define NDEBUG_EHCI_ROOT_HUB
34 PortBit = 1 << (
Port - 1);
66 DPRINT_RH(
"EHCI_RH_ChirpRootPort: Companion HC port - %x\n",
Port);
70 DPRINT(
"EHCI_RH_ChirpRootPort: EhciExtension - %p, Port - %x\n",
91 for (ix = 0; ix <= 500; ix += 20)
118 DPRINT_RH(
"EHCI_RH_ChirpRootPort: Disable port - %x\n",
Port);
124 DPRINT_RH(
"EHCI_RH_ChirpRootPort: Companion HC port - %x\n",
Port);
139 DPRINT_RH(
"EHCI_RH_GetRootHubData: EhciExtension - %p, rootHubData - %p\n",
143 RootHubData = rootHubData;
204 DPRINT_RH(
"EHCI_RH_GetPortStatus: Port - %x, PortSC.AsULONG - %X\n",
216 DPRINT(
"EHCI_RH_GetPortStatus: LowSpeed device detected\n");
236 PortMaskBits = 1 << (
Port - 1);
238 if (
status.PortStatus.Usb20PortStatus.CurrentConnectStatus)
239 status.PortStatus.Usb20PortStatus.LowSpeedDeviceAttached = 0;
241 status.PortStatus.Usb20PortStatus.HighSpeedDeviceAttached = 1;
247 status.PortChange.Usb20PortChange.ResetChange = 1;
250 status.PortChange.Usb20PortChange.ConnectStatusChange = 1;
253 status.PortChange.Usb20PortChange.SuspendChange = 1;
257 if (
status.PortStatus.Usb20PortStatus.CurrentConnectStatus)
259 DPRINT_RH(
"EHCI_RH_GetPortStatus: Port - %x, status.AsULONG - %X\n",
272 DPRINT_RH(
"EHCI_RH_GetHubStatus: ... \n");
273 HubStatus->AsUlong32 = 0;
287 DPRINT(
"EHCI_RH_FinishReset: *Port - %x\n", *
Port);
295 DPRINT(
"EHCI_RH_FinishReset: PortSC.AsULONG - %X\n", PortSC.
AsULONG);
327 DPRINT(
"EHCI_RH_PortResetComplete: *Port - %x\n", *
Port);
342 for (ix = 0; ix <= 500; ix += 20)
347 DPRINT(
"EHCI_RH_PortResetComplete: Reset port - %x\n",
Port);
371 DPRINT(
"EHCI_RH_SetFeaturePortReset: Port - %x\n",
Port);
428 DPRINT_RH(
"EHCI_RH_SetFeaturePortEnable: Not supported\n");
442 DPRINT(
"EHCI_RH_SetFeaturePortSuspend: Port - %x\n",
Port);
469 DPRINT(
"EHCI_RH_ClearFeaturePortEnable: Port - %x\n",
Port);
495 DPRINT(
"EHCI_RH_ClearFeaturePortPower: Port - %x\n",
Port);
517 DPRINT(
"EHCI_RH_PortResumeComplete: *Port - %x\n", *
Port);
545 DPRINT(
"EHCI_RH_ClearFeaturePortSuspend: Port - %x\n",
Port);
573 DPRINT(
"EHCI_RH_ClearFeaturePortEnableChange: Port - %p\n",
Port);
598 DPRINT_RH(
"EHCI_RH_ClearFeaturePortConnectChange: Port - %x\n",
Port);
626 DPRINT(
"EHCI_RH_ClearFeaturePortConnectChange: Port - %x\n",
Port);
640 DPRINT(
"EHCI_RH_ClearFeaturePortSuspendChange: Port - %x\n",
Port);
656 DPRINT_RH(
"EHCI_RH_ClearFeaturePortOvercurrentChange: Port - %x\n",
Port);
#define WRITE_REGISTER_ULONG(r, v)
#define READ_REGISTER_ULONG(r)
#define EHCI_PORT_OWNER_COMPANION_CONTROLLER
#define EHCI_LINE_STATUS_K_STATE_LOW_SPEED
_Outptr_ PUSB_DEVICE_HANDLE _In_ PUSB_DEVICE_HANDLE _In_ USHORT PortStatus
#define KeStallExecutionProcessor(MicroSeconds)
ULONG FinishResetPortBits
EHCI_INTERRUPT_ENABLE InterruptMask
PEHCI_HW_REGISTERS OperationalRegs
EHCI_INTERRUPT_ENABLE HcInterruptEnable
EHCI_PORT_STATUS_CONTROL PortControl[15]
PUSBPORT_REQUEST_ASYNC_CALLBACK UsbPortRequestAsyncCallback
PUSBPORT_INVALIDATE_ROOT_HUB UsbPortInvalidateRootHub
PUSBPORT_WAIT UsbPortWait
USBPORT_HUB_CHARACTERISTICS HubCharacteristics
ULONG PortChangeInterrupt
ULONG CurrentConnectStatus
ULONG PortEnableDisableChange
ULONG ConnectStatusChange
ULONG PortEnabledDisabled
USHORT PartOfCompoundDevice
USHORT OverCurrentProtectionMode
USBPORT_HUB_20_CHARACTERISTICS Usb20HubCharacteristics
#define USB_GETSTATUS_SELF_POWERED
MPSTATUS NTAPI EHCI_RH_ClearFeaturePortConnectChange(IN PVOID ehciExtension, IN USHORT Port)
MPSTATUS NTAPI EHCI_RH_GetPortStatus(IN PVOID ehciExtension, IN USHORT Port, IN PUSB_PORT_STATUS_AND_CHANGE PortStatus)
MPSTATUS NTAPI EHCI_RH_ClearFeaturePortOvercurrentChange(IN PVOID ehciExtension, IN USHORT Port)
MPSTATUS NTAPI EHCI_RH_ClearFeaturePortSuspendChange(IN PVOID ehciExtension, IN USHORT Port)
VOID NTAPI EHCI_RH_GetRootHubData(IN PVOID ehciExtension, IN PVOID rootHubData)
VOID NTAPI EHCI_RH_DisableIrq(IN PVOID ehciExtension)
MPSTATUS NTAPI EHCI_RH_ClearFeaturePortResetChange(IN PVOID ehciExtension, IN USHORT Port)
MPSTATUS NTAPI EHCI_RH_SetFeaturePortPower(IN PVOID ehciExtension, IN USHORT Port)
MPSTATUS NTAPI EHCI_RH_SetFeaturePortSuspend(IN PVOID ehciExtension, IN USHORT Port)
VOID NTAPI EHCI_RH_FinishReset(IN PVOID ehciExtension, IN PVOID Context)
MPSTATUS NTAPI EHCI_RH_GetHubStatus(IN PVOID ehciExtension, IN PUSB_HUB_STATUS_AND_CHANGE HubStatus)
MPSTATUS NTAPI EHCI_RH_SetFeaturePortReset(IN PVOID ehciExtension, IN USHORT Port)
MPSTATUS NTAPI EHCI_RH_SetFeaturePortEnable(IN PVOID ehciExtension, IN USHORT Port)
MPSTATUS NTAPI EHCI_RH_ClearFeaturePortSuspend(IN PVOID ehciExtension, IN USHORT Port)
VOID NTAPI EHCI_RH_EnableIrq(IN PVOID ehciExtension)
MPSTATUS NTAPI EHCI_RH_ChirpRootPort(IN PVOID ehciExtension, IN USHORT Port)
VOID NTAPI EHCI_RH_PortResumeComplete(IN PVOID ehciExtension, IN PVOID Context)
MPSTATUS NTAPI EHCI_RH_ClearFeaturePortPower(IN PVOID ehciExtension, IN USHORT Port)
MPSTATUS NTAPI EHCI_RH_ClearFeaturePortEnable(IN PVOID ehciExtension, IN USHORT Port)
VOID NTAPI EHCI_RH_PortResetComplete(IN PVOID ehciExtension, IN PVOID Context)
MPSTATUS NTAPI EHCI_RH_ClearFeaturePortEnableChange(IN PVOID ehciExtension, IN USHORT Port)
MPSTATUS NTAPI EHCI_RH_GetStatus(IN PVOID ehciExtension, IN PUSHORT Status)
USBPORT_REGISTRATION_PACKET RegPacket
#define USB20_PORT_STATUS_RESERVED1_OWNED_BY_COMPANION
#define MP_STATUS_SUCCESS