83 "EventInfo must have one entry per DsmEvent");
326 if (
Event != DsmEvent::ControllerIoctlDone)
411 return EndWith(DsmEvent::Failed);
417 return EndWith(DsmEvent::PortDetached);
433 case DsmEvent::PortDetached:
434 case DsmEvent::HubStopping:
435 case DsmEvent::HubSuspending:
450 case DsmEvent::PortDetached:
451 return EndWith(DsmEvent::PortDetached);
453 case DsmEvent::PortResetDone:
454 case DsmEvent::PortResetTimeout:
455 case DsmEvent::PortResetAbortedForSuspend:
456 case DsmEvent::PortFault:
469 if (
Event == DsmEvent::PortDetached)
472 return EndWith(DsmEvent::PortDetached);
488 if (
Event != DsmEvent::TimerFired)
491 return EndWith(DsmEvent::PortDetached);
500 case DsmEvent::PortDetached:
503 case DsmEvent::TimerFired:
607 if ((
Event != DsmEvent::TransferDone) && (
Event != DsmEvent::TransferFailed))
663 if (
Event != DsmEvent::ControllerRequestDone)
static _Out_opt_ PULONGLONG Start
SM_RESULT EnterSettingPdCharging()
BOOLEAN m_EndpointsConfigured
SM_RESULT EndWithHubEvent()
VOID DeleteDefaultEndpoint()
SM_RESULT EnterPassiveStep()
static const State Requesting
static const State AwaitingPort
BOOLEAN m_ReenumForceReset
SM_RESULT EndDetachedOnTimer(_In_ DsmEvent Event)
static const State Starting
SM_RESULT CallWait(_In_ const State *Target, _In_ DSM_NEXT Next)
VOID DisableDeviceInController()
BOOLEAN m_DetachEndsReset
static const State ResumingPort
VOID Initialize(_In_ HubChild *Device)
SM_RESULT EnterSuspendingPort()
VOID StartSuperSpeedPostResetTimer()
SM_RESULT Wait(_In_ const State *Target, _In_ DSM_NEXT Next)
VOID RequestPortDisable()
static const State DisablingEndpoints
static const State SettingPdCharging
SM_RESULT Then(_In_ DSM_THEN Next)
static const State WaitingForController
VOID StartPostResetTimer()
VOID DeleteDeviceInController()
SM_RESULT EnterNotifyingReset()
static const State IoctlAfterDetach
SM_RESULT DeleteDeviceThen()
VOID ArmPostAddressTimer()
static const State TimerAfterDetach
static const State RequestingYielding
VOID RequestPortSuspend()
SM_RESULT EnterEnablingDevice()
VOID StartLongPostResetTimer()
SM_RESULT DisableAndDelete(_In_ DSM_THEN After)
VOID ReadFirstDescriptor()
static const State SuspendingPort
SM_RESULT EnterRequesting()
BOOLEAN KindWithin(_In_ ULONG Allowed)
A device with no version or speed known yet passes for any version or speed.
static const State AwaitingAttach
SM_RESULT EndWith(_In_ DsmEvent Result)
VOID SetPdChargingPolicy()
SM_RESULT EndAfterTimer(_In_ DsmEvent Event)
SM_RESULT EnterReadingFirstDescriptor()
SM_RESULT CancelTransferAndEnd(_In_ DsmEvent Event)
SM_RESULT Request(_In_ const State *Target, _In_ DSM_ACTION Start, _In_ DSM_NEXT Next)
static const State DisablingDevice
SM_RESULT CallStep(_In_ DSM_THEN Then)
SM_RESULT CallAtPassive(_In_ DSM_THEN Then)
static const State IgnoringHub
static const State Delaying
HubChild * Device() const
BOOLEAN m_FailedPoweredUp
static const State CancelingTransfer
static const State DisablingPort
static const State ForwardingStreams
static const State EnablingDevice
SM_RESULT EnterCancelingTransfer()
SM_RESULT OnForwardingStreams(_In_ DsmEvent Event)
BOOLEAN m_ConfigFullLength
static const State NotifyingReset
static const State ReadingFirstDescriptor
SM_RESULT EndOnHubOrDetach(_In_ DsmEvent Event)
SM_RESULT EnterStarting()
SM_RESULT EnterDisablingEndpoints()
static const State ResettingPort
static const State Ending
static const State RequestingCriticalPassive
SM_RESULT ForwardStreams(_In_ const State *ReturnTo)
SM_RESULT EnterResumingPort()
SM_RESULT EnterForwardingStreams()
SM_RESULT EndOnResetForHub(_In_ DsmEvent Event)
SM_RESULT OnShared(_In_ DsmEvent Event)
SM_RESULT EnterDisablingPort()
static const SM_EVENT_INFO EventInfo[]
static const State AwaitingPortYielding
SM_RESULT EnterResettingPort()
static const State PassiveStep
SM_RESULT AtPassive(_In_ DSM_THEN Then)
VOID DisableAllEndpoints()
SM_RESULT EnterDelaying()
SM_RESULT CallRequest(_In_ const State *Target, _In_ DSM_ACTION Start, _In_ DSM_NEXT Next)
static const State RequestingCritical
SM_RESULT Delay(_In_ DSM_DELAY Kind, _In_ DSM_NEXT Next)
SM_RESULT EndForHubOnTimer(_In_ DsmEvent Event)
SM_RESULT EndOnTransferCanceled(_In_ DsmEvent Event)
VOID EnableDeviceInController()
BOOLEAN CancelStateTimer()
SM_RESULT DeleteThen(_In_ DSM_THEN After)
VOID ArmDuplicateDeviceTimer()
VOID ForwardToController()
DSM_NEXT m_AfterConfigure
SM_RESULT DeleteOnceDisabled(_In_ DsmEvent Event)
SM_RESULT EnterDisablingDevice()
VOID SmInitialize(_In_ const State *Initial)
static SM_RESULT SmTransition(_In_ const State *Target)
static SM_RESULT SmReturn(_In_ DsmEvent Ev)
static SM_RESULT SmCall(_In_ const State *Start)
static SM_RESULT SmHandled()
static SM_RESULT SmUnhandled()
static const DsmEvent HubEventDiscards[]
enum _DSM_DELAY DSM_DELAY
@ DsmDelayPostResetSuperSpeed
_Check_return_ _In_ DXGK_EVENT_TYPE _In_ ULONG Event
_Must_inspect_result_ _In_ PUCXHUB_DEVICE_CREATE_INFO _Out_ UCXUSBDEVICE * Device
macro TEXTAREA section xr p2align endm macro DATAAREA section dw endm macro RODATAAREA section dr endm macro XDATAAREA section dr p2align endm macro PDATAAREA section dr p2align endm macro DCRVA Symbol rva Symbol endm macro EXPORT Attribute global Name endm macro IMPORT Kind
PACPI_METHOD_ARGUMENT Next
#define SM_STATE_YIELDS_TO_CALLER
#define SM_STATE_NEEDS_PASSIVE
#define SM_STATE_CRITICAL_ONLY
One state. Handler gets every event the state sees.
_In_ WDFDPC _In_ BOOLEAN Wait
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO