42 "EventInfo must have one entry per EpEvent");
62 { &Retired,
"AwaitingDestroy", 0,
NULL,
NULL };
98 {
NULL,
"OperationHeld", 0,
129 if (
Event == EpEvent::ClientAbortUrb)
153 case EpEvent::HubStartRequest:
154 case EpEvent::HubPurge:
155 case EpEvent::HubAbort:
156 case EpEvent::HubDeviceReset:
160 case EpEvent::HubTreePurge:
164 case EpEvent::HubDisconnect:
167 case EpEvent::ControllerResetStarting:
170 case EpEvent::ControllerResetDone:
184 case EpEvent::Delete:
187 case EpEvent::ConfigureDone:
195 case EpEvent::DeviceResetDone:
210 case EpEvent::Delete:
213 case EpEvent::HubDisable:
214 case EpEvent::HubDeviceReset:
219 case EpEvent::ConfigureDone:
220 case EpEvent::DeviceResetDone:
224 case EpEvent::HubStartRequest:
227 case EpEvent::ClientStreamsEnable:
230 case EpEvent::ClientStreamsDisable:
233 case EpEvent::HubEndpointReset:
245 if (
Event == EpEvent::ControllerResetStarting)
258 if (
Event == EpEvent::StaleReplaced)
273 case EpEvent::ClientStreamsEnable:
276 case EpEvent::ClientStreamsDisable:
279 case EpEvent::HubEndpointReset:
282 case EpEvent::ClientAbortUrb:
286 case EpEvent::HubAbort:
290 case EpEvent::HubDisable:
291 case EpEvent::HubDeviceReset:
295 case EpEvent::HubPurge:
298 case EpEvent::HubTreePurge:
301 case EpEvent::HubDisconnect:
304 case EpEvent::ControllerResetStarting:
319 case EpEvent::ControllerResetStarting:
322 case EpEvent::ControllerResetDone:
348 if (
Event != EpEvent::PurgeDone)
363 if (
Event != EpEvent::ControllerResetStarting)
378 if (
Event == EpEvent::AbortUrbParked)
395 if (
Event != EpEvent::AbortDone)
427 if (
Event != EpEvent::StreamsOpened)
450 if (
Event != EpEvent::StreamsClosed)
472 if (
Event != EpEvent::EndpointResetDone)
489 if (
Event == EpEvent::ControllerResetDone)
503 if (
Event == EpEvent::ControllerResetStarting)
509 if (
Event != EpEvent::AbortDone)
518 case EpEvent::AbortUrbParked:
519 case EpEvent::AbortDone:
523 case EpEvent::StreamsOpened:
527 case EpEvent::StreamsClosed:
531 case EpEvent::EndpointResetDone:
static const State Inactive
static const State ResettingPipe
VOID AckControllerReset()
VOID FinishStreamsOpenRequest(_In_ BOOLEAN ForceFailure)
SM_RESULT OnOperation(_In_ EpEvent Event)
static const State AwaitingDestroy
SM_RESULT OnBusy(_In_ EpEvent Event)
static const State Purging
VOID FinishStreamsCloseRequest()
BOOLEAN DeviceAllowsStart()
SM_RESULT OnAborting(_In_ EpEvent Event)
SM_RESULT EnterDisablingStreams()
SM_RESULT OnAwaitingAbortUrb(_In_ EpEvent Event)
SM_RESULT EnterAborting()
VOID ForwardResetRequest()
SM_RESULT StartPurge(_In_ PURGE_FOLLOW_UP FollowUp)
static const State EnablingStreams
SM_RESULT BeginOperation(_In_ const State *Target, _In_ const State *ReturnTo)
VOID ParkStreamsDisableRequest()
BOOLEAN m_PauseAfterPurge
BOOLEAN DeviceDisconnected()
SM_RESULT OnEnabled(_In_ EpEvent Event)
const State * m_HeldOperation
SM_RESULT OnOperationUnwinding(_In_ EpEvent Event)
Reset under an outstanding operation: finish it, then purge.
SM_RESULT OnResettingPipe(_In_ EpEvent Event)
SM_RESULT OnEnablingStreams(_In_ EpEvent Event)
VOID ForwardStreamsDisableRequest()
VOID FinishEndpointResetRequest()
VOID RejectStreamsEnableRequest()
static const State Enabled
@ PurgeFollowUpHubOperation
SM_RESULT Retire()
An endpoint the client still has a handle to stays around as stale.
static const State OperationUnwinding
BOOLEAN DeviceDeprogrammed()
UcxEndpoint * Endpoint() const
PURGE_FOLLOW_UP m_AfterPurge
SM_RESULT EnterOperationHeld()
static const State Retired
VOID DereferenceEndpoint()
VOID ForwardStreamsEnableRequest()
SM_RESULT OnCreated(_In_ EpEvent Event)
VOID DeleteStaleEndpoint()
static const State AwaitingAbortUrb
SM_RESULT OnOperationHeld(_In_ EpEvent Event)
BOOLEAN ClientHoldsHandle()
VOID CompleteHubOperation()
static const State Aborting
SM_RESULT OnPurging(_In_ EpEvent Event)
SM_RESULT OnDisabled(_In_ EpEvent Event)
SM_RESULT OnDisablingStreams(_In_ EpEvent Event)
static const State DisablingStreams
SM_RESULT OnInactive(_In_ EpEvent Event)
static const State OperationHeld
static const State Created
SM_RESULT EnterEnablingStreams()
SM_RESULT PauseForControllerReset()
Pause before the ack; nothing may touch the machine after it.
SM_RESULT OnRetired(_In_ EpEvent Event)
SM_RESULT OnStale(_In_ EpEvent Event)
VOID Initialize(_In_ UcxEndpoint *Endpoint)
static const State Operation
SM_RESULT EnterResettingPipe()
static const State Disabled
static const SM_EVENT_INFO EventInfo[]
BOOLEAN SmAccepts(_In_ EpEvent Event)
Abort URB is only taken while running; the caller fails the URB on FALSE.
const State * SmCurrent() const
VOID SmInitialize(_In_ const State *Initial)
static SM_RESULT SmTransition(_In_ const State *Target)
static SM_RESULT SmPaused()
static SM_RESULT SmHandled()
static SM_RESULT SmUnhandled()
_Check_return_ _In_ DXGK_EVENT_TYPE _In_ ULONG Event
_In_ UCXHUB_DEVICE_CONTEXT _In_ UCXENDPOINT Endpoint
#define SM_STATE_TAKES_REQUESTS
One state. Handler gets every event the state sees.