|
ReactOS 0.4.17-dev-1281-g065abb3
|
#include <rootports.h>

Classes | |
| struct | Port |
Public Member Functions | |
| NTSTATUS | Create (_In_ XhciController *Controller) |
| NTSTATUS | Prepare () |
| VOID | Release () |
| VOID | D0Entry () |
| VOID | PostInterruptsEntry () |
| VOID | D0Exit () |
| VOID | PostReset () |
| VOID | OnHostLost () |
| ULONG | PortCount () const |
| USHORT | HighestUsbVersion () const |
| VOID | OnPortStatusChangeEvent (_In_ const XHCI_TRB *Event) |
| VOID | SetWakeEnables (_In_ BOOLEAN Arm) |
| VOID | SignalPortChange () |
| VOID | Update20HardwareLpm (_In_ ULONG PortNumber, _In_ ULONG SlotId, _In_ const USBDEVICE_UPDATE_20_HARDWARE_LPM_PARAMETERS *Parameters) |
| VOID | DisableLpmForSlot (_In_ ULONG PortNumber, _In_ ULONG SlotId) |
| VOID | ArmPortResumeTimer (_In_ ULONG PortNumber, _In_ ULONG Milliseconds) |
| VOID | DisarmPortResumeTimer (_In_ ULONG PortNumber) |
| BOOLEAN | IsUsb20Port (_In_ ULONG PortNumber) const |
| UCHAR | QueryTunnelState (_In_ ULONG PortNumber) const |
Private Types | |
| enum class | Outcome : ULONG { Ok , Stall , Gone , Halted , OperationPending } |
Static Private Member Functions | |
| static XhciRootHub * | FromUcx (_In_ UCXROOTHUB UcxRootHub) |
| static VOID | CompleteHubRequest (_In_ WDFREQUEST Request, _In_ PURB Urb, _In_ Outcome Result) |
Static Private Attributes | |
| static EVT_UCX_ROOTHUB_CONTROL_URB | EvtClearHubFeature |
| static EVT_UCX_ROOTHUB_CONTROL_URB | EvtClearPortFeature |
| static EVT_UCX_ROOTHUB_CONTROL_URB | EvtGetHubStatus |
| static EVT_UCX_ROOTHUB_CONTROL_URB | EvtGetPortStatus |
| static EVT_UCX_ROOTHUB_CONTROL_URB | EvtSetHubFeature |
| static EVT_UCX_ROOTHUB_CONTROL_URB | EvtSetPortFeature |
| static EVT_UCX_ROOTHUB_CONTROL_URB | EvtGetPortErrorCount |
| static EVT_UCX_ROOTHUB_INTERRUPT_TX | EvtInterruptTransfer |
| static EVT_UCX_ROOTHUB_GET_INFO | EvtGetInfo |
| static EVT_UCX_ROOTHUB_GET_20PORT_INFO | EvtGet20PortInfo |
| static EVT_UCX_ROOTHUB_GET_30PORT_INFO | EvtGet30PortInfo |
| static KDEFERRED_ROUTINE | ResumeTimerDpc |
Root hub.
Definition at line 13 of file rootports.h.
|
strongprivate |
How a hub class request completes.
| Enumerator | |
|---|---|
| Ok | |
| Stall | |
| Gone | |
| Halted | |
| OperationPending | |
Definition at line 104 of file rootports.h.
Acknowledges a device or power up resume (xHCI 4.15.2.1). TRUE means the change stays hidden from the hub until the link is back in U0.
Definition at line 582 of file rootports.cpp.
Referenced by OnPortStatusChangeEvent(), and PostInterruptsEntry().
Definition at line 1140 of file rootports.cpp.
Referenced by XhciUsbDevice::ApplyUpdate().
|
private |
PORTSC writes need a running controller (xHCI 5.4.8).
Definition at line 1215 of file rootports.cpp.
Referenced by ClearPortFeature(), and SetPortFeature().
|
private |
Definition at line 1236 of file rootports.cpp.
|
private |
Definition at line 1421 of file rootports.cpp.
Definition at line 486 of file rootports.cpp.
Referenced by DisableLpmForSlot(), and SetUsb20PortFeature().
|
private |
Definition at line 1462 of file rootports.cpp.
Referenced by ClearPortFeature().
|
private |
Definition at line 1546 of file rootports.cpp.
Referenced by ClearPortFeature().
|
staticprivate |
Definition at line 1172 of file rootports.cpp.
| NTSTATUS XhciRootHub::Create | ( | _In_ XhciController * | Controller | ) |
Creates the UCXROOTHUB with every callback.
Definition at line 186 of file rootports.cpp.
Referenced by XhciController::Initialize().
| VOID XhciRootHub::D0Entry | ( | ) |
Definition at line 844 of file rootports.cpp.
Referenced by XhciController::D0Entry(), and PostReset().
| VOID XhciRootHub::D0Exit | ( | ) |
Definition at line 877 of file rootports.cpp.
Referenced by XhciController::D0Exit().
Definition at line 1118 of file rootports.cpp.
Referenced by XhciUsbDevice::Disable().
Definition at line 1156 of file rootports.cpp.
Referenced by XhciUsbDevice::Disable().
|
private |
Sublink speed list of a 3.x port from its PSI table. Entries past the caller's capacity are counted but not written.
Definition at line 1991 of file rootports.cpp.
|
staticprivate |
Definition at line 179 of file rootports.cpp.
|
private |
Definition at line 1255 of file rootports.cpp.
|
private |
Definition at line 1826 of file rootports.cpp.
|
private |
Definition at line 1284 of file rootports.cpp.
| USHORT XhciRootHub::HighestUsbVersion | ( | ) | const |
BCD major in the high byte, minor in the low byte.
Definition at line 972 of file rootports.cpp.
|
private |
Answers at once with the change bitmap; UCX holds the next transfer until a port changes.
Definition at line 1870 of file rootports.cpp.
The kernel debugger owns this 3.x port through the Debug Capability.
Definition at line 503 of file rootports.cpp.
Referenced by GetPortStatus(), InterruptTransfer(), and OnPortStatusChangeEvent().
TRUE for a USB 2.x port; everything else counts as 3.x for crash dump.
Definition at line 995 of file rootports.cpp.
| VOID XhciRootHub::OnHostLost | ( | ) |
Definition at line 921 of file rootports.cpp.
Referenced by XhciController::RunRecovery().
Definition at line 1044 of file rootports.cpp.
Applies one Supported Protocol Capability; Usable is set for a USB 2.x or 3.x one.
Definition at line 235 of file rootports.cpp.
Referenced by Prepare().
|
private |
Definition at line 430 of file rootports.cpp.
Referenced by ArmPortResumeTimer(), ClearPortFeature(), DisableLpmForSlot(), DisarmPortResumeTimer(), GetPortErrorCount(), GetPortStatus(), IsUsb20Port(), OnPortStatusChangeEvent(), QueryTunnelState(), SetPortFeature(), and Update20HardwareLpm().
| ULONG XhciRootHub::PortCount | ( | ) | const |
Definition at line 965 of file rootports.cpp.
| VOID XhciRootHub::PostInterruptsEntry | ( | ) |
Definition at line 867 of file rootports.cpp.
Referenced by XhciController::D0EntryPostInterruptsEnabled().
| VOID XhciRootHub::PostReset | ( | ) |
Definition at line 914 of file rootports.cpp.
Referenced by XhciController::InternalReset().
| NTSTATUS XhciRootHub::Prepare | ( | ) |
Walks the supported protocol capabilities; needs the registers prepared.
Definition at line 314 of file rootports.cpp.
Referenced by XhciController::PrepareHardware().
USB4 tunnel state of a root port, one of the UCXHUB_TUNNEL_STATE values.
Definition at line 1005 of file rootports.cpp.
Referenced by XhciUsbDevice::ApplyUpdate().
Definition at line 440 of file rootports.cpp.
Referenced by AcknowledgeResume(), GetPortStatus(), InterruptTransfer(), IsPortConnected(), QueryTunnelState(), ResuspendResumedPorts(), UpdatePortScLocked(), WaitForU3(), and WaitU0().
| VOID XhciRootHub::Release | ( | ) |
Definition at line 404 of file rootports.cpp.
Referenced by XhciController::ReleaseHardware().
|
private |
Puts every active, not suspended port back in U3 before power down.
Definition at line 775 of file rootports.cpp.
Referenced by D0Exit().
|
private |
Definition at line 1603 of file rootports.cpp.
|
private |
Definition at line 1644 of file rootports.cpp.
Referenced by SetPortFeature().
|
private |
Definition at line 1783 of file rootports.cpp.
Referenced by SetUsb30PortFeature().
|
private |
Definition at line 1710 of file rootports.cpp.
Referenced by SetPortFeature().
Wake arm or disarm of every port for the controller.
Definition at line 936 of file rootports.cpp.
Referenced by XhciController::SetPortWake().
| VOID XhciRootHub::SignalPortChange | ( | ) |
Tells UCX a root port changed, for the controller's wake from S0 path.
Definition at line 956 of file rootports.cpp.
Referenced by XhciEvtDeviceWakeFromS0Triggered().
Definition at line 536 of file rootports.cpp.
Referenced by AcknowledgeResume(), and ClearUsb20PortFeature().
Requests U3 (USB 2.x suspend); the transition is not waited for.
Definition at line 760 of file rootports.cpp.
Referenced by ResuspendResumedPorts(), and SetUsb20PortFeature().
| VOID XhciRootHub::Update20HardwareLpm | ( | _In_ ULONG | PortNumber, |
| _In_ ULONG | SlotId, | ||
| _In_ const USBDEVICE_UPDATE_20_HARDWARE_LPM_PARAMETERS * | Parameters | ||
| ) |
Definition at line 1075 of file rootports.cpp.
Referenced by XhciUsbDevice::ApplyUpdate().
|
private |
Plain field replace for PORTPMSC and PORTHLPMC.
Definition at line 472 of file rootports.cpp.
Referenced by AcknowledgeResume(), ClearUsb20LpmLocked(), ClearUsb30PortFeature(), SetUsb20PortFeature(), SetUsb30PortFeature(), Update20HardwareLpm(), and WaitU0().
Definition at line 460 of file rootports.cpp.
Referenced by ClearUsb20PortFeature(), ClearUsb30PortFeature(), D0Entry(), D0Exit(), OnPortStatusChangeEvent(), SetUsb20PortFeature(), SetUsb30PortFeature(), SetWakeEnables(), and WaitForU3().
PORTSC read and write back keeping only the Keep bits, plus Set. Caller holds the port lock.
Definition at line 448 of file rootports.cpp.
Referenced by AcknowledgeResume(), ClearUsb20PortFeature(), SetUsb20PortFeature(), SetUsb30LinkState(), SuspendPort(), UpdatePortSc(), and WaitU0().
Waits up to 24 ms for a requested U3 to land.
Definition at line 650 of file rootports.cpp.
Referenced by ClearUsb20PortFeature(), D0Exit(), and SetUsb30LinkState().
Brings the link to U0 first for controllers that cannot go to U3 from a low power state.
Definition at line 701 of file rootports.cpp.
Referenced by ResuspendResumedPorts(), SetUsb20PortFeature(), and SetUsb30LinkState().
Definition at line 113 of file rootports.h.
Referenced by Create().
Definition at line 114 of file rootports.h.
Referenced by Create().
Definition at line 122 of file rootports.h.
Referenced by Create().
Definition at line 123 of file rootports.h.
Referenced by Create().
Definition at line 115 of file rootports.h.
Referenced by Create().
Definition at line 121 of file rootports.h.
Referenced by Create().
Definition at line 119 of file rootports.h.
Referenced by Create().
Definition at line 116 of file rootports.h.
Referenced by Create().
Definition at line 120 of file rootports.h.
Referenced by Create().
Definition at line 117 of file rootports.h.
Referenced by Create().
Definition at line 118 of file rootports.h.
Referenced by Create().
|
private |
No interrupt transfer seen since D0 entry
Definition at line 252 of file rootports.h.
Referenced by Create(), D0Entry(), and InterruptTransfer().
|
private |
Definition at line 243 of file rootports.h.
Referenced by AcknowledgeResume(), CheckRunning(), ClearPortFeature(), ClearUsb20PortFeature(), Create(), D0Entry(), D0Exit(), DisableLpmForSlot(), FillSpeeds(), GetPortErrorCount(), GetPortStatus(), InterruptTransfer(), IsHiddenDebugPort(), ParseProtocol(), Prepare(), QueryTunnelState(), ReadPortSc(), ResuspendResumedPorts(), SetPortFeature(), SetUsb20PortFeature(), SetUsb30LinkState(), SetWakeEnables(), UpdatePortReg(), and UpdatePortScLocked().
|
private |
Extended capability offset, 0 when absent
Definition at line 247 of file rootports.h.
Referenced by Create(), IsHiddenDebugPort(), and Prepare().
|
private |
Compatible Port Offset of the last USB 3 protocol capability
Definition at line 254 of file rootports.h.
Referenced by ParseProtocol(), Prepare(), and QueryTunnelState().
|
private |
Definition at line 246 of file rootports.h.
Referenced by Create(), D0Entry(), D0Exit(), HighestUsbVersion(), InterruptTransfer(), OnHostLost(), OnPortStatusChangeEvent(), ParseProtocol(), PortAt(), PortCount(), PostInterruptsEntry(), Prepare(), Release(), ResuspendResumedPorts(), and SetWakeEnables().
|
private |
Definition at line 245 of file rootports.h.
Referenced by Create(), D0Entry(), D0Exit(), HighestUsbVersion(), InterruptTransfer(), OnHostLost(), ParseProtocol(), PortAt(), PostInterruptsEntry(), Prepare(), Release(), ResuspendResumedPorts(), and SetWakeEnables().
|
private |
PORTSC bit 2 reports USB4 tunneling
Definition at line 253 of file rootports.h.
Referenced by Prepare(), and QueryTunnelState().
|
private |
Definition at line 250 of file rootports.h.
Referenced by Prepare().
|
private |
Definition at line 251 of file rootports.h.
Referenced by Prepare().
|
private |
Definition at line 244 of file rootports.h.
Referenced by Create(), D0Exit(), OnPortStatusChangeEvent(), and SignalPortChange().
|
private |
Definition at line 248 of file rootports.h.
Referenced by Create(), ParseProtocol(), Prepare(), and Release().
|
private |
Definition at line 249 of file rootports.h.
Referenced by Create(), ParseProtocol(), Prepare(), and Release().
Ends USB 2.x resume signaling once TDRSMDN has passed.
Definition at line 124 of file rootports.h.
Referenced by Prepare().