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

Classes | |
| struct | ReconfigureWaiter |
Static Public Member Functions | |
| static XhciUsbDevice * | FromUcx (_In_ UCXUSBDEVICE UsbDevice) |
Public Attributes | |
| _In_ ULONG | StreamId |
| _In_ _In_ NTSTATUS | Status |
| _In_ _In_ NTSTATUS _In_ PVOID | Context |
| _In_ UCXUSBDEVICE | UsbDevice |
| _In_ UCXUSBDEVICE _In_ const UCXUSBDEVICE_INFO * | Info |
Private Types | |
| enum class | PendingKind : ULONG { None , Enable , Address , Update , Configure , Disable , Reset } |
| enum class | AfterDisable : ULONG { CompleteSuccess , CompleteFailure , EnableSlot } |
| typedef VOID(NTAPI * | PFN_RECONFIGURE_DONE) (_In_ PVOID Context, _In_ NTSTATUS Status) |
Static Private Member Functions | |
| static VOID NTAPI | CommandDone (_In_ XhciCommand *Command) |
| static VOID NTAPI | ReconfigureCommandDone (_In_ XhciCommand *Command) |
Static Private Attributes | |
| static EVT_WDF_WORKITEM | TunnelDsmWorker |
One USB device and its xHCI slot. Lives in the UCXUSBDEVICE context.
|
strongprivate |
What a successful Disable Slot does next.
| Enumerator | |
|---|---|
| CompleteSuccess | |
| CompleteFailure | |
| EnableSlot | |
Definition at line 165 of file slotdev.h.
|
strongprivate |
| XhciUsbDevice::_IRQL_requires_ | ( | PASSIVE_LEVEL | ) |
| XhciUsbDevice::_IRQL_requires_ | ( | PASSIVE_LEVEL | ) |
|
private |
| XhciUsbDevice::_IRQL_requires_max_ | ( | DISPATCH_LEVEL | ) |
| XhciUsbDevice::_IRQL_requires_max_ | ( | DISPATCH_LEVEL | ) |
Configure Endpoint for one endpoint (drop and add) on its own command block and input context, serialized per device, for static streams enable and disable. Done runs once with the result.
| XhciUsbDevice::_IRQL_requires_max_ | ( | DISPATCH_LEVEL | ) |
| XhciUsbDevice::_IRQL_requires_max_ | ( | DISPATCH_LEVEL | ) |
| XhciUsbDevice::_IRQL_requires_max_ | ( | DISPATCH_LEVEL | ) |
The slot was lost without a Disable Slot: drop it and finish any pending request.
| XhciUsbDevice::_IRQL_requires_max_ | ( | DISPATCH_LEVEL | ) | const |
| VOID XhciUsbDevice::Address | ( | _In_ WDFREQUEST | Request, |
| _Inout_ PUSBDEVICE_ADDRESS | Payload | ||
| ) |
Definition at line 839 of file slotdev.cpp.
Referenced by XhciEvtUsbDeviceAddress().
|
private |
Definition at line 918 of file slotdev.cpp.
Referenced by OnEvaluateContextDone(), and Update().
|
private |
Definition at line 651 of file slotdev.cpp.
Referenced by SubmitAddressDevice().
| VOID XhciUsbDevice::BuildSlotContext | ( | _Out_writes_bytes_(ContextSize) PVOID | SlotContext, |
| _In_ ULONG | ContextSize | ||
| ) | const |
Fills the hub fields of an input slot context and applies the multi TT errata rule.
Definition at line 1159 of file slotdev.cpp.
Referenced by EndpointsConfigure(), StartReconfigure(), and SubmitSecondConfigure().
Definition at line 221 of file slotdev.cpp.
|
staticprivate |
Definition at line 568 of file slotdev.cpp.
Referenced by PrepareCommand(), and Reset().
Definition at line 541 of file slotdev.cpp.
Referenced by Address(), EndpointsConfigure(), OnAddressDeviceDone(), OnConfigureEndpointDone(), OnDisableSlotDone(), OnEnableSlotDone(), OnEvaluateContextDone(), and OnResetDeviceDone().
| ULONG XhciUsbDevice::ContextEntries | ( | ) | const |
Highest DCI the HCD considers configured (Context Entries).
Definition at line 321 of file slotdev.cpp.
Referenced by XhciEndpoint::BuildEndpointConfigure(), EndpointsConfigure(), and StartReconfigure().
| ULONG XhciUsbDevice::ContextSize | ( | ) | const |
Definition at line 377 of file slotdev.cpp.
Referenced by BuildSlotContext().
| XhciController * XhciUsbDevice::Controller | ( | ) | const |
Definition at line 353 of file slotdev.cpp.
Referenced by _IRQL_requires_().
| VOID XhciUsbDevice::ControllerResetStarting | ( | ) |
Definition at line 1746 of file slotdev.cpp.
| const USB_DEVICE_DESCRIPTOR * XhciUsbDevice::DeviceDescriptor | ( | ) | const |
Definition at line 365 of file slotdev.cpp.
Referenced by XhciEndpoint::BuildContext().
Definition at line 1421 of file slotdev.cpp.
Referenced by XhciEvtUsbDeviceDisable().
Definition at line 463 of file slotdev.cpp.
Referenced by Disable(), OnDisableSlotDone(), OnResetDeviceDone(), and Reset().
|
private |
Definition at line 456 of file slotdev.cpp.
Referenced by Disable(), Enable(), OnDisableSlotDone(), and OnEnableSlotDone().
|
private |
Definition at line 480 of file slotdev.cpp.
Referenced by EndpointsConfigure(), OnConfigureEndpointDone(), and SubmitSecondConfigure().
| VOID XhciUsbDevice::Enable | ( | _In_ WDFREQUEST | Request, |
| _Inout_ PUSBDEVICE_ENABLE | Payload | ||
| ) |
Definition at line 731 of file slotdev.cpp.
Referenced by XhciEvtUsbDeviceEnable().
| VOID XhciUsbDevice::EndpointsConfigure | ( | _In_ WDFREQUEST | Request, |
| _Inout_ PENDPOINTS_CONFIGURE | Payload | ||
| ) |
Definition at line 1194 of file slotdev.cpp.
Referenced by XhciEvtUsbDeviceEndpointsConfigure().
Definition at line 307 of file slotdev.cpp.
Referenced by OnResetDeviceDone().
Definition at line 1671 of file slotdev.cpp.
Referenced by StartReconfigure().
|
private |
Definition at line 614 of file slotdev.cpp.
Referenced by OnDisableSlotDone().
|
static |
Definition at line 178 of file slotdev.cpp.
Referenced by XhciEndpoint::Initialize(), TtHub(), XhciEvtControllerUsbDeviceAdd(), XhciEvtUsbDeviceAddress(), XhciEvtUsbDeviceDisable(), XhciEvtUsbDeviceEnable(), XhciEvtUsbDeviceEndpointsConfigure(), XhciEvtUsbDeviceHubInfo(), XhciEvtUsbDeviceReset(), and XhciEvtUsbDeviceUpdate().
| UCXUSBDEVICE XhciUsbDevice::Handle | ( | ) | const |
Definition at line 347 of file slotdev.cpp.
Definition at line 314 of file slotdev.cpp.
| VOID XhciUsbDevice::HubInfo | ( | _In_ WDFREQUEST | Request, |
| _In_ const USBDEVICE_HUB_INFO * | Payload | ||
| ) |
Definition at line 1142 of file slotdev.cpp.
Referenced by XhciEvtUsbDeviceHubInfo().
Definition at line 261 of file slotdev.cpp.
Referenced by BuildAddressContext(), EndpointsConfigure(), InputControl(), and InputSlot().
| ULONG64 XhciUsbDevice::InputContextAddress | ( | ) | const |
Definition at line 277 of file slotdev.cpp.
Referenced by EndpointsConfigure(), SubmitAddressDevice(), SubmitSecondConfigure(), and Update().
|
private |
Definition at line 289 of file slotdev.cpp.
Referenced by BuildAddressContext(), EndpointsConfigure(), SubmitSecondConfigure(), and Update().
|
private |
Definition at line 295 of file slotdev.cpp.
Referenced by BuildAddressContext(), EndpointsConfigure(), SubmitSecondConfigure(), and Update().
| BOOLEAN XhciUsbDevice::IsSlotEnabled | ( | ) | const |
Definition at line 359 of file slotdev.cpp.
|
private |
Definition at line 551 of file slotdev.cpp.
Referenced by OnAddressDeviceDone(), and OnEnableSlotDone().
|
private |
Definition at line 870 of file slotdev.cpp.
|
private |
Definition at line 1324 of file slotdev.cpp.
Definition at line 1728 of file slotdev.cpp.
Referenced by XhciSlotTable::OnDeviceNotificationEvent().
|
private |
Definition at line 1453 of file slotdev.cpp.
|
private |
Definition at line 765 of file slotdev.cpp.
|
private |
Definition at line 1108 of file slotdev.cpp.
| VOID XhciUsbDevice::OnHostLost | ( | ) |
Definition at line 1773 of file slotdev.cpp.
Referenced by XhciSlotTable::OnHostLost().
|
private |
Definition at line 1541 of file slotdev.cpp.
Definition at line 1707 of file slotdev.cpp.
Definition at line 269 of file slotdev.cpp.
Referenced by XhciEndpoint::BuildEndpointConfigure(), EndpointState(), HardwareDequeuePointer(), XhciEndpoint::OutputEndpointState(), OutputSlot(), XhciEndpointMachine::ReconfigureAfterStop(), and XhciEndpointMachine::ReconfigureForReset().
|
private |
Definition at line 301 of file slotdev.cpp.
Referenced by OnAddressDeviceDone(), and Reset().
| const USB_DEVICE_PORT_PATH * XhciUsbDevice::PortPath | ( | ) | const |
Definition at line 371 of file slotdev.cpp.
Referenced by XhciEndpoint::BuildContext().
Definition at line 557 of file slotdev.cpp.
Referenced by EndpointsConfigure(), SubmitAddressDevice(), SubmitDisableSlot(), SubmitEnableSlot(), SubmitSecondConfigure(), and Update().
|
private |
FALSE when the work item could not be created; the caller then completes the request itself.
Definition at line 963 of file slotdev.cpp.
Referenced by OnEvaluateContextDone(), and Update().
|
staticprivate |
Definition at line 1653 of file slotdev.cpp.
Referenced by StartReconfigure().
|
private |
Definition at line 491 of file slotdev.cpp.
Referenced by OnConfigureEndpointDone().
Definition at line 1493 of file slotdev.cpp.
Referenced by XhciEvtUsbDeviceReset().
|
private |
Definition at line 519 of file slotdev.cpp.
Referenced by Address(), Disable(), Enable(), EndpointsConfigure(), Reset(), and Update().
| ULONG XhciUsbDevice::SlotId | ( | ) | const |
Definition at line 335 of file slotdev.cpp.
Referenced by _IRQL_requires_max_(), XhciEndpoint::BuildEndpointConfigure(), XhciEndpoint::BuildSetDequeue(), OnEnableSlotDone(), XhciControlRing::OnEventDataEvent(), XhciEndpointMachine::ResetDefaultPipe(), XhciEndpointMachine::ResetEndpoint(), and XhciEndpointMachine::SendStopCommand().
| USB_DEVICE_SPEED XhciUsbDevice::Speed | ( | ) | const |
Definition at line 341 of file slotdev.cpp.
Referenced by BuildAddressContext(), XhciEndpoint::BuildContext(), XhciEndpoint::Initialize(), and XhciEndpoint::MaxBurst().
|
private |
Definition at line 1600 of file slotdev.cpp.
Referenced by FinishReconfigure().
Definition at line 710 of file slotdev.cpp.
Referenced by Address(), and OnEnableSlotDone().
|
private |
Definition at line 1412 of file slotdev.cpp.
Referenced by Disable(), OnAddressDeviceDone(), and OnEnableSlotDone().
|
private |
Definition at line 641 of file slotdev.cpp.
Referenced by Enable(), and OnDisableSlotDone().
|
private |
Definition at line 1294 of file slotdev.cpp.
Referenced by OnConfigureEndpointDone().
|
private |
Definition at line 535 of file slotdev.cpp.
Referenced by CompletePending(), OnHostLost(), and Update().
|
private |
Definition at line 383 of file slotdev.cpp.
Referenced by BuildAddressContext(), and BuildSlotContext().
| VOID XhciUsbDevice::Update | ( | _In_ WDFREQUEST | Request, |
| _Inout_ PUSBDEVICE_UPDATE | Payload | ||
| ) |
Definition at line 1059 of file slotdev.cpp.
Referenced by XhciEvtUsbDeviceUpdate().
|
private |
Definition at line 955 of file slotdev.cpp.
Referenced by OnEvaluateContextDone(), and Update().
| VOID XhciUsbDevice::ZeroInputContext | ( | ) |
Definition at line 283 of file slotdev.cpp.
Referenced by BuildAddressContext(), EndpointsConfigure(), SubmitSecondConfigure(), and Update().
| _In_ UCXUSBDEVICE _In_ const UCXUSBDEVICE_INFO* XhciUsbDevice::Info |
|
private |
Definition at line 306 of file slotdev.h.
Referenced by OnDisableSlotDone(), Reset(), and SubmitDisableSlot().
|
private |
Definition at line 301 of file slotdev.h.
Referenced by EndpointsConfigure(), OnEnableSlotDone(), PrepareCommand(), Reset(), SubmitAddressDevice(), SubmitDisableSlot(), SubmitEnableSlot(), SubmitSecondConfigure(), and Update().
|
private |
Bit n set when DCI n is configured as far as this driver knows; bit 0 is the slot.
Definition at line 295 of file slotdev.h.
Referenced by BuildAddressContext(), ContextEntries(), EndpointsConfigure(), OnResetDeviceDone(), and Reset().
|
private |
Definition at line 280 of file slotdev.h.
Referenced by _IRQL_requires_(), BuildAddressContext(), ContextSize(), EndpointsConfigure(), InputContext(), OnEnableSlotDone(), OutputContext(), StartReconfigure(), SubmitSecondConfigure(), and ZeroInputContext().
|
private |
Definition at line 278 of file slotdev.h.
Referenced by _IRQL_requires_(), _IRQL_requires_max_(), Address(), ApplyUpdate(), BuildSlotContext(), Cleanup(), Controller(), Disable(), Enable(), EndpointsConfigure(), ForgetSlot(), OnAddressDeviceDone(), OnConfigureEndpointDone(), OnDisableSlotDone(), OnEnableSlotDone(), OnResetDeviceDone(), QueueTunnelStateDsm(), Reset(), StartReconfigure(), SubmitAddressDevice(), SubmitDisableSlot(), SubmitEnableSlot(), SubmitSecondConfigure(), Update(), and WantsTunnelStateDsm().
|
private |
Definition at line 284 of file slotdev.h.
Referenced by ApplyUpdate(), and DeviceDescriptor().
|
private |
Definition at line 297 of file slotdev.h.
Referenced by BuildAddressContext(), ControllerResetStarting(), DisableConfiguredEndpoints(), DisableDefaultEndpoint(), Enable(), OnHostLost(), and RecordEnabledEndpoints().
|
private |
Definition at line 277 of file slotdev.h.
Referenced by _IRQL_requires_(), Cleanup(), Handle(), OnDeviceNotificationEvent(), and QueueTunnelStateDsm().
|
private |
Definition at line 279 of file slotdev.h.
Referenced by _IRQL_requires_(), ApplyUpdate(), BuildAddressContext(), BuildSlotContext(), Disable(), PortPath(), QueueTunnelStateDsm(), Speed(), and TtHub().
|
private |
Definition at line 282 of file slotdev.h.
Referenced by _IRQL_requires_(), Cleanup(), InputContext(), InputContextAddress(), and ZeroInputContext().
|
private |
Definition at line 287 of file slotdev.h.
Referenced by ApplyUpdate(), and BuildSlotContext().
|
private |
Definition at line 291 of file slotdev.h.
Referenced by ApplyUpdate(), and Disable().
|
private |
Definition at line 305 of file slotdev.h.
Referenced by LostSlotStatus(), OnAddressDeviceDone(), OnEnableSlotDone(), OnHostLost(), and SetPending().
|
private |
Definition at line 288 of file slotdev.h.
Referenced by BuildSlotContext(), and HubInfo().
|
private |
Definition at line 289 of file slotdev.h.
Referenced by BuildSlotContext(), and HubInfo().
|
private |
Definition at line 281 of file slotdev.h.
Referenced by _IRQL_requires_(), Cleanup(), OnEnableSlotDone(), and OutputContext().
|
private |
Definition at line 304 of file slotdev.h.
Referenced by OnAddressDeviceDone(), OnEnableSlotDone(), and SetPending().
|
private |
Definition at line 303 of file slotdev.h.
Referenced by OnAddressDeviceDone(), OnConfigureEndpointDone(), OnEnableSlotDone(), OnEvaluateContextDone(), SetPending(), and SubmitSecondConfigure().
|
private |
Definition at line 302 of file slotdev.h.
Referenced by OnConfigureEndpointDone(), SetPending(), SubmitSecondConfigure(), and TakePending().
|
private |
Definition at line 310 of file slotdev.h.
Referenced by FinishReconfigure().
|
private |
Definition at line 314 of file slotdev.h.
Referenced by StartReconfigure().
|
private |
Definition at line 313 of file slotdev.h.
Referenced by FinishReconfigure(), and StartReconfigure().
|
private |
Definition at line 315 of file slotdev.h.
Referenced by Cleanup(), and StartReconfigure().
|
private |
Definition at line 309 of file slotdev.h.
Referenced by _IRQL_requires_(), and FinishReconfigure().
|
private |
Definition at line 311 of file slotdev.h.
Referenced by FinishReconfigure().
|
private |
Definition at line 312 of file slotdev.h.
Referenced by FinishReconfigure().
|
private |
Definition at line 292 of file slotdev.h.
Referenced by ApplyUpdate(), and Disable().
|
private |
Definition at line 285 of file slotdev.h.
Referenced by Address(), Disable(), EndpointsConfigure(), ForgetSlot(), IsSlotEnabled(), OnEnableSlotDone(), and Reset().
|
private |
Definition at line 286 of file slotdev.h.
Referenced by _IRQL_requires_max_(), Address(), ApplyUpdate(), Cleanup(), Disable(), ForgetSlot(), OnAddressDeviceDone(), OnConfigureEndpointDone(), OnDeviceNotificationEvent(), OnDisableSlotDone(), OnEnableSlotDone(), OnEvaluateContextDone(), OnResetDeviceDone(), OnTransferEvent(), PrepareCommand(), Reset(), SlotId(), StartReconfigure(), and SubmitEnableSlot().
|
private |
Definition at line 290 of file slotdev.h.
Referenced by BuildSlotContext(), and HubInfo().
Definition at line 77 of file slotdev.h.
Referenced by Address(), Enable(), EndpointsConfigure(), OnEnableSlotDone(), OnEvaluateContextDone(), QueueTunnelStateDsm(), and SubmitAddressDevice().
Definition at line 51 of file slotdev.h.
Referenced by _IRQL_requires_max_().
Definition at line 239 of file slotdev.h.
Referenced by QueueTunnelStateDsm().
| _In_ UCXUSBDEVICE XhciUsbDevice::UsbDevice |
Definition at line 117 of file slotdev.h.
Referenced by _IRQL_requires_().