ReactOS 0.4.17-dev-1281-g065abb3
XhciEndpointMachine Class Reference

#include <epstate.h>

Inheritance diagram for XhciEndpointMachine:
Collaboration diagram for XhciEndpointMachine:

Public Member Functions

VOID Initialize (_In_ XhciEndpoint *Endpoint)
 
XhciEndpoint * Endpoint () const
 
- Public Member Functions inherited from SmMachine< XhciEndpointMachine, XepEvent >
VOID SmInitialize (_In_ const State *Initial)
 
BOOLEAN SmPost (_In_ XepEvent Ev)
 
VOID SmContinueOnPassive ()
 
const State * SmCurrent () const
 
ULONG SmDepth () const
 
const State * SmFrame (_In_ ULONG Index) const
 
BOOLEAN SmIsIn (_In_ const State *Ancestor) const
 
BOOLEAN SmIsPaused () const
 
BOOLEAN SmIsWaitingForTimer () const
 
ULONG SmUnexpectedCount () const
 

Static Public Attributes

static const SM_EVENT_INFO EventInfo []
 

Private Types

enum  MAPPING_STOP_REASON { MappingStopForCancel , MappingStopForHalt , MappingStopForReset , MappingStopForRemoval }
 
enum  RECLAIM_REASON { ReclaimAfterStop , ReclaimAfterAutoReset , ReclaimAfterHaltClear , ReclaimAfterControllerReset }
 
enum  TIMER_EXIT { TimerExitHalt , TimerExitStoppedEvent , TimerExitStopDrained , TimerExitHaltDrained }
 

Private Member Functions

VOID SmReference ()
 
VOID SmDereference ()
 
BOOLEAN SmCancelTimer ()
 
SM_RESULT OnDisabled (_In_ XepEvent Event)
 
SM_RESULT OnActive (_In_ XepEvent Event)
 
SM_RESULT OnRunning (_In_ XepEvent Event)
 
SM_RESULT OnMapping (_In_ XepEvent Event)
 
SM_RESULT OnParked (_In_ XepEvent Event)
 
SM_RESULT OnAwaitingClientReset (_In_ XepEvent Event)
 
SM_RESULT OnAwaitingControllerReset (_In_ XepEvent Event)
 
SM_RESULT OnHaltingRingFill (_In_ XepEvent Event)
 
SM_RESULT OnAwaitingCancelOk (_In_ XepEvent Event)
 
SM_RESULT OnCommanding (_In_ XepEvent Event)
 
SM_RESULT OnStoppingPipe (_In_ XepEvent Event)
 
SM_RESULT OnRebuildingContextAfterStop (_In_ XepEvent Event)
 
SM_RESULT OnUpdatingDequeue (_In_ XepEvent Event)
 
SM_RESULT OnResettingDefaultPipe (_In_ XepEvent Event)
 
SM_RESULT OnClientResetCommand (_In_ XepEvent Event)
 
SM_RESULT OnResettingPipe (_In_ XepEvent Event)
 
SM_RESULT OnRebuildingContextForReset (_In_ XepEvent Event)
 
SM_RESULT OnReclaiming (_In_ XepEvent Event)
 
SM_RESULT OnAwaitingStopRetry (_In_ XepEvent Event)
 
SM_RESULT OnAwaitingHalt (_In_ XepEvent Event)
 
SM_RESULT OnAwaitingStoppedEvent (_In_ XepEvent Event)
 
SM_RESULT OnDraining (_In_ XepEvent Event)
 
SM_RESULT EnterAwaitingControllerReset ()
 
SM_RESULT EnterRemoved ()
 
SM_RESULT EnterHaltingRingFill ()
 
SM_RESULT EnterAwaitingCancelOk ()
 
SM_RESULT EnterStoppingPipe ()
 
SM_RESULT EnterRebuildingContextAfterStop ()
 
SM_RESULT EnterUpdatingDequeue ()
 
SM_RESULT EnterResettingDefaultPipe ()
 
SM_RESULT EnterResettingPipe ()
 
SM_RESULT EnterRebuildingContextForReset ()
 
SM_RESULT EnterReclaiming ()
 
SM_RESULT EnterAwaitingStopRetry ()
 
SM_RESULT EnterAwaitingHalt ()
 
SM_RESULT EnterAwaitingStoppedEvent ()
 
SM_RESULT EnterDraining ()
 
SM_RESULT EnterLeavingTimer ()
 Runs the timer exit; the engine already stopped the timer, so it cannot fire after this.
 
SM_RESULT Remap ()
 
SM_RESULT SuspendRingFillFor (_In_ MAPPING_STOP_REASON Reason)
 
SM_RESULT ReclaimFor (_In_ RECLAIM_REASON Reason)
 
SM_RESULT RetryStopAfter (_In_ ULONG Milliseconds)
 
SM_RESULT DrainFor (_In_ BOOLEAN AfterHalt)
 
SM_RESULT LeaveTimerFor (_In_ TIMER_EXIT Exit)
 
SM_RESULT RunTimerExit (_In_ TIMER_EXIT Exit)
 
SM_RESULT BeginStop ()
 
SM_RESULT AfterStopCommand ()
 
SM_RESULT AfterStopDrained ()
 
SM_RESULT AfterHalt ()
 
SM_RESULT AfterStoppedEvent ()
 
SM_RESULT AfterHaltDrained ()
 
BOOLEAN ReclaimIgnoresCancel () const
 
VOID ReferenceEndpoint ()
 
VOID DereferenceEndpoint ()
 
BOOLEAN StopTimer ()
 
VOID StartTimer (_In_ ULONG Milliseconds)
 
VOID ReportTimeout (_In_ XEP_TIMEOUT Timeout)
 
VOID ResumeRingFill ()
 
VOID SuspendRingFill ()
 
VOID AckControllerReset ()
 
VOID CompleteResetRequest ()
 
VOID CompleteResetRequestIfAllowed ()
 
VOID ReportStoppedEvent ()
 
VOID DropStoppedEvent ()
 
VOID ResetStopAttempts ()
 
VOID CountStopAttempt ()
 
VOID SendStopCommand ()
 
VOID NotifyRingsHalted ()
 
VOID NotifyRingsClientReset ()
 
VOID NotifyRingsStoppedEvent ()
 
VOID NotifyRingsReclaimOnCancel ()
 
VOID NotifyRingsDrainEvents ()
 
VOID NotifyRingsReclaim ()
 
VOID AskUcxToCancel ()
 
VOID PurgeStreamQueues ()
 
VOID RestartStreamQueues ()
 
VOID ReconfigureForReset ()
 
VOID ReconfigureAfterStop ()
 
VOID UpdateDequeuePointers ()
 
VOID ResetDefaultPipe ()
 
VOID ResetEndpoint ()
 
VOID RequestControllerReset ()
 
BOOLEAN IsControlEndpoint ()
 
BOOLEAN OnPrimaryInterrupterOnly ()
 
BOOLEAN DelaysFirstStop ()
 
BOOLEAN IgnoresStopContextError ()
 
BOOLEAN StopAttemptsExhausted ()
 
BOOLEAN DoorbellRungSinceFill ()
 
BOOLEAN NeedsContextRebuildAfterStop ()
 
BOOLEAN ShouldReconfigureForReset ()
 
BOOLEAN CanResetAfterHalt ()
 

Private Attributes

XhciEndpoint * m_Endpoint
 
MAPPING_STOP_REASON m_AfterMapping
 
RECLAIM_REASON m_AfterReclaim
 
TIMER_EXIT m_AfterTimer
 
ULONG m_RetryDelay
 
BOOLEAN m_DrainAfterHalt
 

Static Private Attributes

static const State Disabled
 
static const State Active
 
static const State Running
 
static const State Mapping
 
static const State ResetWhileMapping
 
static const State AwaitingDisable
 
static const State Parked
 
static const State AwaitingClientReset
 
static const State AwaitingRecovery
 
static const State Fenced
 
static const State AwaitingControllerReset
 
static const State Removed
 
static const State HaltingRingFill
 
static const State AwaitingCancelOk
 
static const State Commanding
 
static const State StoppingPipe
 
static const State RebuildingContextAfterStop
 
static const State UpdatingDequeue
 
static const State ResettingDefaultPipe
 
static const State ClientResetCommand
 
static const State ResettingPipe
 
static const State RebuildingContextForReset
 
static const State Reclaiming
 
static const State Timed
 
static const State AwaitingStopRetry
 
static const State AwaitingHalt
 
static const State AwaitingStoppedEvent
 
static const State Draining
 
static const State LeavingTimer
 
static const BOOLEAN SmCompletionsFirst = FALSE
 
static const USHORT SmTimerEventId = static_cast<USHORT>(XepEvent::TimerFired)
 

Friends

class SmMachine< XhciEndpointMachine, XepEvent >
 
class XhciEndpointProbe
 

Additional Inherited Members

- Public Types inherited from SmMachine< XhciEndpointMachine, XepEvent >
typedef SmState< XhciEndpointMachine, XepEvent > State
 
- Protected Member Functions inherited from SmMachine< XhciEndpointMachine, XepEvent >
VOID SmBeginPause ()
 
VOID SmDiscardQueued (_In_ XepEvent Ev)
 
BOOLEAN SmAccepts (_In_ XepEvent Ev)
 
VOID SmReference ()
 
VOID SmDereference ()
 
VOID SmQueuePassive ()
 
VOID SmOnDequeue (_In_ XepEvent Ev)
 
VOID SmStateChanged ()
 
BOOLEAN SmCancelTimer ()
 
- Static Protected Member Functions inherited from SmMachine< XhciEndpointMachine, XepEvent >
static SM_RESULT SmMakeResult (_In_ SM_RESULT_KIND Kind, _In_ USHORT Ev, _In_opt_ const VOID *Target)
 
static SM_RESULT SmHandled ()
 
static SM_RESULT SmUnhandled ()
 
static SM_RESULT SmTransition (_In_ const State *Target)
 
static SM_RESULT SmPaused ()
 
static SM_RESULT SmCall (_In_ const State *Start)
 
static SM_RESULT SmReturn (_In_ XepEvent Ev)
 
- Static Protected Attributes inherited from SmMachine< XhciEndpointMachine, XepEvent >
static const BOOLEAN SmCompletionsFirst
 
static const USHORT SmTimerEventId
 

Detailed Description

Definition at line 56 of file epstate.h.

Member Enumeration Documentation

◆ MAPPING_STOP_REASON

Enumerator
MappingStopForCancel 
MappingStopForHalt 
MappingStopForReset 
MappingStopForRemoval 

Definition at line 75 of file epstate.h.

◆ RECLAIM_REASON

Enumerator
ReclaimAfterStop 
ReclaimAfterAutoReset 
ReclaimAfterHaltClear 
ReclaimAfterControllerReset 

Definition at line 83 of file epstate.h.

◆ TIMER_EXIT

Enumerator
TimerExitHalt 
TimerExitStoppedEvent 
TimerExitStopDrained 
TimerExitHaltDrained 

Definition at line 91 of file epstate.h.

Member Function Documentation

◆ AckControllerReset()

VOID XhciEndpointMachine::AckControllerReset ( )
private

Definition at line 2502 of file epctx.cpp.

2503{
2505
2508}
XhciEndpoint * m_Endpoint
Definition: epstate.h:318
volatile LONG m_Flags
Definition: epctx.h:285
KEVENT m_ResetAck
Definition: epctx.h:286
#define FALSE
Definition: types.h:117
#define KeSetEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:476
#define XHCI_EP_RESET_ACK_HANDSHAKE
Definition: epctx.cpp:27
#define InterlockedXor
Definition: interlocked.h:281
#define IO_NO_INCREMENT
Definition: iotypes.h:598

Referenced by OnDisabled(), OnReclaiming(), and OnRunning().

◆ AfterHalt()

SM_RESULT XhciEndpointMachine::AfterHalt ( )
private

Definition at line 800 of file epstate.cpp.

801{
803
804 /* Control endpoints are reset here, others wait for the client */
805 if (IsControlEndpoint())
807
808 return DrainFor(TRUE);
809}
static SM_RESULT SmTransition(_In_ const State *Target)
Definition: smengine.h:194
VOID NotifyRingsHalted()
Definition: epctx.cpp:2587
static const State ResettingDefaultPipe
Definition: epstate.h:118
SM_RESULT DrainFor(_In_ BOOLEAN AfterHalt)
Definition: epstate.cpp:734
BOOLEAN IsControlEndpoint()
Definition: epctx.cpp:2778
#define TRUE
Definition: types.h:120

Referenced by DrainFor(), OnAwaitingHalt(), OnHaltingRingFill(), and RunTimerExit().

◆ AfterHaltDrained()

SM_RESULT XhciEndpointMachine::AfterHaltDrained ( )
private

Definition at line 819 of file epstate.cpp.

820{
824}
static const State AwaitingClientReset
Definition: epstate.h:107
VOID NotifyRingsReclaimOnCancel()
Definition: epctx.cpp:2605
VOID PurgeStreamQueues()
Definition: epctx.cpp:2632

Referenced by OnDraining(), and RunTimerExit().

◆ AfterStopCommand()

SM_RESULT XhciEndpointMachine::AfterStopCommand ( )
private

Definition at line 781 of file epstate.cpp.

782{
785
787 return AfterStopDrained();
788}
VOID DropStoppedEvent()
Definition: epctx.cpp:2554
SM_RESULT AfterStopDrained()
Definition: epstate.cpp:791
BOOLEAN OnPrimaryInterrupterOnly()
Definition: epctx.cpp:2784
static const State AwaitingStoppedEvent
Definition: epstate.h:126

Referenced by OnAwaitingStopRetry(), and OnStoppingPipe().

◆ AfterStopDrained()

SM_RESULT XhciEndpointMachine::AfterStopDrained ( )
private

Definition at line 791 of file epstate.cpp.

792{
795
797}
static const State UpdatingDequeue
Definition: epstate.h:117
static const State RebuildingContextAfterStop
Definition: epstate.h:116
BOOLEAN NeedsContextRebuildAfterStop()
Definition: epctx.cpp:2834

Referenced by AfterStopCommand(), OnDraining(), and RunTimerExit().

◆ AfterStoppedEvent()

SM_RESULT XhciEndpointMachine::AfterStoppedEvent ( )
private

Definition at line 812 of file epstate.cpp.

813{
815 return DrainFor(FALSE);
816}
VOID NotifyRingsStoppedEvent()
Definition: epctx.cpp:2599

Referenced by OnAwaitingStoppedEvent(), and RunTimerExit().

◆ AskUcxToCancel()

VOID XhciEndpointMachine::AskUcxToCancel ( )
private

Definition at line 2625 of file epctx.cpp.

2626{
2627 UcxEndpointNeedToCancelTransfers(m_Endpoint->m_Ucx);
2628}
UCXENDPOINT m_Ucx
Definition: epctx.h:281

Referenced by EnterAwaitingCancelOk().

◆ BeginStop()

SM_RESULT XhciEndpointMachine::BeginStop ( )
private

Definition at line 770 of file epstate.cpp.

771{
773 if (DelaysFirstStop())
775
776 return SmTransition(&StoppingPipe);
777}
VOID ResetStopAttempts()
Definition: epctx.cpp:2560
static const State StoppingPipe
Definition: epstate.h:115
BOOLEAN DelaysFirstStop()
Definition: epctx.cpp:2790
SM_RESULT RetryStopAfter(_In_ ULONG Milliseconds)
Definition: epstate.cpp:726
#define XEP_STOP_RETRY_LONG_MS
Definition: epstate.cpp:19

Referenced by OnHaltingRingFill().

◆ CanResetAfterHalt()

BOOLEAN XhciEndpointMachine::CanResetAfterHalt ( )
private

Definition at line 2864 of file epctx.cpp.

2865{
2867
2868 if (Ep->m_StreamsCapable && Ep->AnyTransfersPending())
2869 {
2871 return FALSE;
2872 }
2873
2874 return TRUE;
2875}
BOOLEAN m_StreamsCapable
Definition: epctx.h:284
NTSTATUS m_ResetStatus
Definition: epctx.h:309
BOOLEAN AnyTransfersPending() const
Definition: epctx.cpp:947
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132

Referenced by OnAwaitingClientReset().

◆ CompleteResetRequest()

VOID XhciEndpointMachine::CompleteResetRequest ( )
private

Definition at line 2511 of file epctx.cpp.

2512{
2514 WDFREQUEST Request;
2516
2518
2519 Status = Ep->m_ResetStatus;
2521 Request = static_cast<WDFREQUEST>(
2522 InterlockedExchangePointer(reinterpret_cast<PVOID volatile*>(&Ep->m_ResetRequest), NULL));
2523
2524 if (Request == NULL)
2525 return;
2526
2527 /* A controller reset or removal got here first; complete with success, not STATUS_PENDING */
2528 if (Status == STATUS_PENDING)
2530
2531 DPRINT("Endpoint %p client reset completed with 0x%lx\n", Ep, Status);
2532 WdfRequestComplete(Request, Status);
2533}
LONG NTSTATUS
Definition: precomp.h:26
WDFREQUEST volatile m_ResetRequest
Definition: epctx.h:308
#define NULL
Definition: types.h:112
#define InterlockedExchangePointer(Target, Value)
Definition: dshow.h:45
#define XHCI_EP_CLIENT_RESET_HANDSHAKE
Definition: epctx.cpp:28
Status
Definition: gdiplustypes.h:24
#define InterlockedAnd
Definition: interlocked.h:77
#define volatile
Definition: prototyp.h:117
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:73
#define STATUS_PENDING
Definition: telnetd.h:14
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFREQUEST Request

Referenced by CompleteResetRequestIfAllowed(), OnAwaitingClientReset(), OnClientResetCommand(), OnMapping(), OnRebuildingContextForReset(), and OnReclaiming().

◆ CompleteResetRequestIfAllowed()

VOID XhciEndpointMachine::CompleteResetRequestIfAllowed ( )
private

◆ CountStopAttempt()

VOID XhciEndpointMachine::CountStopAttempt ( )
private

Definition at line 2566 of file epctx.cpp.

2567{
2569}
ULONG m_StopAttempts
Definition: epctx.h:303

Referenced by EnterStoppingPipe().

◆ DelaysFirstStop()

BOOLEAN XhciEndpointMachine::DelaysFirstStop ( )
private

Definition at line 2790 of file epctx.cpp.

2791{
2792 return m_Endpoint->m_Controller->HasErrata(XhciErrata::EpDeferFirstStop);
2793}
BOOLEAN HasErrata(_In_ XhciErrata Bit) const
Definition: hc.h:58
XhciController * m_Controller
Definition: epctx.h:278

Referenced by BeginStop().

◆ DereferenceEndpoint()

VOID XhciEndpointMachine::DereferenceEndpoint ( )
private

Definition at line 2438 of file epctx.cpp.

2439{
2441}
#define WdfObjectDereference(Handle)
Definition: wdfobject.h:826

Referenced by SmDereference().

◆ DoorbellRungSinceFill()

BOOLEAN XhciEndpointMachine::DoorbellRungSinceFill ( )
private

Definition at line 2814 of file epctx.cpp.

2815{
2817 ULONG Index;
2818
2819 if (!Ep->UsesStreams())
2820 return Ep->m_MainRing->DoorbellRungSinceFill();
2821
2822 /* QUIRK: asking also resets the shared stream counter */
2824 for (Index = 0; Index < Ep->m_CurrentStreams->Count; Index++)
2825 {
2827 return TRUE;
2828 }
2829
2830 return FALSE;
2831}
#define InterlockedExchange
Definition: armddk.h:54
BOOLEAN UsesStreams() const
Definition: epctx.cpp:899
XhciTransferRing * m_MainRing
Definition: epctx.h:288
XhciStreams * m_CurrentStreams
Definition: epctx.h:301
BOOLEAN DoorbellRungSinceFill() const
Definition: xferring.cpp:763
XhciTransferRing * Ring
Definition: epctx.cpp:69
volatile LONG UpdateCount
Definition: epctx.cpp:83
ULONG Count
Definition: epctx.cpp:80
XhciStreamEntry Entry[1]
Definition: epctx.cpp:86
uint32_t ULONG
Definition: typedefs.h:59
_In_ WDFCOLLECTION _In_ ULONG Index

Referenced by OnHaltingRingFill().

◆ DrainFor()

SM_RESULT XhciEndpointMachine::DrainFor ( _In_ BOOLEAN  AfterHalt)
private

Definition at line 734 of file epstate.cpp.

736{
738 return SmTransition(&Draining);
739}
BOOLEAN m_DrainAfterHalt
Definition: epstate.h:323
SM_RESULT AfterHalt()
Definition: epstate.cpp:800
static const State Draining
Definition: epstate.h:127

Referenced by AfterHalt(), and AfterStoppedEvent().

◆ DropStoppedEvent()

VOID XhciEndpointMachine::DropStoppedEvent ( )
private

Definition at line 2554 of file epctx.cpp.

2555{
2557}
#define XHCI_EP_IGNORE_STOPPED
Definition: epctx.cpp:26
#define InterlockedOr
Definition: interlocked.h:239

Referenced by AfterStopCommand().

◆ Endpoint()

XhciEndpoint * XhciEndpointMachine::Endpoint ( ) const
inline

Definition at line 67 of file epstate.h.

68 {
69 return m_Endpoint;
70 }

Referenced by Initialize().

◆ EnterAwaitingCancelOk()

SM_RESULT XhciEndpointMachine::EnterAwaitingCancelOk ( )
private

Definition at line 380 of file epstate.cpp.

381{
383 return SmHandled();
384}
VOID AskUcxToCancel()
Definition: epctx.cpp:2625

◆ EnterAwaitingControllerReset()

SM_RESULT XhciEndpointMachine::EnterAwaitingControllerReset ( )
private

Definition at line 319 of file epstate.cpp.

320{
322 return SmHandled();
323}
VOID CompleteResetRequestIfAllowed()
Definition: epctx.cpp:2536

◆ EnterAwaitingHalt()

SM_RESULT XhciEndpointMachine::EnterAwaitingHalt ( )
private

Definition at line 604 of file epstate.cpp.

605{
607 return SmHandled();
608}
VOID StartTimer(_In_ ULONG Milliseconds)
Definition: epctx.cpp:2450
#define XEP_STOP_TIMEOUT_MS
Definition: epstate.cpp:17

◆ EnterAwaitingStoppedEvent()

SM_RESULT XhciEndpointMachine::EnterAwaitingStoppedEvent ( )
private

Definition at line 629 of file epstate.cpp.

630{
633 return SmHandled();
634}
VOID ReportStoppedEvent()
Definition: epctx.cpp:2545

◆ EnterAwaitingStopRetry()

SM_RESULT XhciEndpointMachine::EnterAwaitingStopRetry ( )
private

Definition at line 572 of file epstate.cpp.

573{
575 return SmHandled();
576}

◆ EnterDraining()

SM_RESULT XhciEndpointMachine::EnterDraining ( )
private

Definition at line 655 of file epstate.cpp.

656{
660 SmDiscardQueued(XepEvent::TransferAborted);
661
662 return SmHandled();
663}
VOID SmDiscardQueued(_In_ XepEvent Ev)
Definition: smengine.h:522
VOID NotifyRingsDrainEvents()
Definition: epctx.cpp:2611

◆ EnterHaltingRingFill()

SM_RESULT XhciEndpointMachine::EnterHaltingRingFill ( )
private

Definition at line 344 of file epstate.cpp.

345{
348 SmDiscardQueued(XepEvent::TransferAborted);
349
350 return SmHandled();
351}
VOID SuspendRingFill()
Definition: epctx.cpp:2496
MAPPING_STOP_REASON m_AfterMapping
Definition: epstate.h:319

◆ EnterLeavingTimer()

SM_RESULT XhciEndpointMachine::EnterLeavingTimer ( )
private

Runs the timer exit; the engine already stopped the timer, so it cannot fire after this.

Definition at line 697 of file epstate.cpp.

698{
700}
SM_RESULT RunTimerExit(_In_ TIMER_EXIT Exit)
Definition: epstate.cpp:750
TIMER_EXIT m_AfterTimer
Definition: epstate.h:321

◆ EnterRebuildingContextAfterStop()

SM_RESULT XhciEndpointMachine::EnterRebuildingContextAfterStop ( )
private

Definition at line 438 of file epstate.cpp.

439{
441 return SmHandled();
442}
VOID ReconfigureAfterStop()
Definition: epctx.cpp:2694

◆ EnterRebuildingContextForReset()

SM_RESULT XhciEndpointMachine::EnterRebuildingContextForReset ( )
private

Definition at line 517 of file epstate.cpp.

518{
520 return SmHandled();
521}
VOID ReconfigureForReset()
Definition: epctx.cpp:2659

◆ EnterReclaiming()

SM_RESULT XhciEndpointMachine::EnterReclaiming ( )
private

Definition at line 536 of file epstate.cpp.

537{
540 SmDiscardQueued(XepEvent::TransferAborted);
541
542 return SmHandled();
543}
VOID NotifyRingsReclaim()
Definition: epctx.cpp:2618
BOOLEAN ReclaimIgnoresCancel() const
Definition: epstate.h:265

◆ EnterRemoved()

SM_RESULT XhciEndpointMachine::EnterRemoved ( )
private

Definition at line 336 of file epstate.cpp.

◆ EnterResettingDefaultPipe()

SM_RESULT XhciEndpointMachine::EnterResettingDefaultPipe ( )
private

Definition at line 472 of file epstate.cpp.

473{
475 return SmHandled();
476}
VOID ResetDefaultPipe()
Definition: epctx.cpp:2733

◆ EnterResettingPipe()

SM_RESULT XhciEndpointMachine::EnterResettingPipe ( )
private

Definition at line 500 of file epstate.cpp.

501{
503 return SmHandled();
504}
VOID ResetEndpoint()
Definition: epctx.cpp:2748

◆ EnterStoppingPipe()

SM_RESULT XhciEndpointMachine::EnterStoppingPipe ( )
private

Definition at line 407 of file epstate.cpp.

408{
411 return SmHandled();
412}
VOID SendStopCommand()
Definition: epctx.cpp:2572
VOID CountStopAttempt()
Definition: epctx.cpp:2566

◆ EnterUpdatingDequeue()

SM_RESULT XhciEndpointMachine::EnterUpdatingDequeue ( )
private

Definition at line 455 of file epstate.cpp.

456{
458 return SmHandled();
459}
VOID UpdateDequeuePointers()
Definition: epctx.cpp:2716

◆ IgnoresStopContextError()

BOOLEAN XhciEndpointMachine::IgnoresStopContextError ( )
private

Definition at line 2796 of file epctx.cpp.

2797{
2799
2800 if (!Controller->HasErrata(XhciErrata::EpStopContextErrorIsStopped))
2801 return FALSE;
2802
2803 NT_ASSERT(Controller->HasErrata(XhciErrata::IntPrimaryOnly));
2804 return TRUE;
2805}
_Must_inspect_result_ _In_ WDFDEVICE _In_ PUCX_CONTROLLER_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ UCXCONTROLLER * Controller
#define NT_ASSERT
Definition: rtlfuncs.h:3334

Referenced by OnAwaitingStopRetry().

◆ Initialize()

VOID XhciEndpointMachine::Initialize ( _In_ XhciEndpoint *  Endpoint)

Definition at line 181 of file epstate.cpp.

183{
190
192}
VOID SmInitialize(_In_ const State *Initial)
Definition: smengine.h:349
XhciEndpoint * Endpoint() const
Definition: epstate.h:67
RECLAIM_REASON m_AfterReclaim
Definition: epstate.h:320
static const State Disabled
Definition: epstate.h:100
#define XEP_STOP_RETRY_SHORT_MS
Definition: epstate.cpp:18

Referenced by XhciEndpoint::Create().

◆ IsControlEndpoint()

BOOLEAN XhciEndpointMachine::IsControlEndpoint ( )
private

Definition at line 2778 of file epctx.cpp.

2779{
2781}
ULONG m_XhciType
Definition: epctx.h:293
#define XHCI_ENDPOINT_TYPE_CONTROL
Definition: xhcihw.h:543

Referenced by AfterHalt().

◆ LeaveTimerFor()

SM_RESULT XhciEndpointMachine::LeaveTimerFor ( _In_ TIMER_EXIT  Exit)
private

Definition at line 742 of file epstate.cpp.

744{
746 return SmTransition(&LeavingTimer);
747}
static const State LeavingTimer
Definition: epstate.h:128
static void Exit(void)
Definition: sock.c:1330

Referenced by OnAwaitingHalt(), OnAwaitingStoppedEvent(), OnAwaitingStopRetry(), and OnDraining().

◆ NeedsContextRebuildAfterStop()

BOOLEAN XhciEndpointMachine::NeedsContextRebuildAfterStop ( )
private

Definition at line 2834 of file epctx.cpp.

2835{
2836 return m_Endpoint->m_StreamsCapable &&
2837 m_Endpoint->m_Controller->HasErrata(XhciErrata::StrmReconfigOnStop);
2838}

Referenced by AfterStopDrained().

◆ NotifyRingsClientReset()

VOID XhciEndpointMachine::NotifyRingsClientReset ( )
private

Definition at line 2593 of file epctx.cpp.

2594{
2596}
VOID ForEachRing(_In_ VOID(XhciTransferRing::*Action)())
Definition: epctx.cpp:918
VOID OnClientPipeReset()
Definition: xferring.cpp:714

Referenced by OnMapping().

◆ NotifyRingsDrainEvents()

VOID XhciEndpointMachine::NotifyRingsDrainEvents ( )
private

Definition at line 2611 of file epctx.cpp.

Referenced by EnterDraining().

◆ NotifyRingsHalted()

VOID XhciEndpointMachine::NotifyRingsHalted ( )
private

Definition at line 2587 of file epctx.cpp.

Referenced by AfterHalt().

◆ NotifyRingsReclaim()

VOID XhciEndpointMachine::NotifyRingsReclaim ( )
private

Definition at line 2618 of file epctx.cpp.

2619{
2622}
VOID RecoverTransfers()
Definition: xferring.cpp:752
#define XHCI_RECLAIM_TAG
Definition: epctx.cpp:58
#define WdfObjectReferenceWithTag(Handle, Tag)
Definition: wdfobject.h:806

Referenced by EnterReclaiming().

◆ NotifyRingsReclaimOnCancel()

VOID XhciEndpointMachine::NotifyRingsReclaimOnCancel ( )
private

Definition at line 2605 of file epctx.cpp.

Referenced by AfterHaltDrained(), and EnterRemoved().

◆ NotifyRingsStoppedEvent()

VOID XhciEndpointMachine::NotifyRingsStoppedEvent ( )
private

Definition at line 2599 of file epctx.cpp.

Referenced by AfterStoppedEvent().

◆ OnActive()

SM_RESULT XhciEndpointMachine::OnActive ( _In_ XepEvent  Event)
private

Definition at line 232 of file epstate.cpp.

234{
235 if (Event == XepEvent::Disable)
236 return SmTransition(&Disabled);
237
238 return SmUnhandled();
239}
_Check_return_ _In_ DXGK_EVENT_TYPE _In_ ULONG Event
Definition: dispmprt.h:1287

◆ OnAwaitingCancelOk()

SM_RESULT XhciEndpointMachine::OnAwaitingCancelOk ( _In_ XepEvent  Event)
private

Definition at line 387 of file epstate.cpp.

389{
390 if (Event == XepEvent::CancelAllowed)
392
393 return SmUnhandled();
394}
SM_RESULT ReclaimFor(_In_ RECLAIM_REASON Reason)
Definition: epstate.cpp:718

◆ OnAwaitingClientReset()

SM_RESULT XhciEndpointMachine::OnAwaitingClientReset ( _In_ XepEvent  Event)
private

Definition at line 305 of file epstate.cpp.

307{
308 if (Event != XepEvent::ClientReset)
309 return SmUnhandled();
310
311 if (CanResetAfterHalt())
313
316}
static const State ResettingPipe
Definition: epstate.h:120
BOOLEAN CanResetAfterHalt()
Definition: epctx.cpp:2864

◆ OnAwaitingControllerReset()

SM_RESULT XhciEndpointMachine::OnAwaitingControllerReset ( _In_ XepEvent  Event)
private

Definition at line 326 of file epstate.cpp.

328{
329 if (Event == XepEvent::ControllerResetDone)
331
332 return SmUnhandled();
333}

◆ OnAwaitingHalt()

SM_RESULT XhciEndpointMachine::OnAwaitingHalt ( _In_ XepEvent  Event)
private

Definition at line 611 of file epstate.cpp.

613{
614 switch (Event)
615 {
616 case XepEvent::TimerFired:
618 return AfterHalt();
619
620 case XepEvent::HaltReported:
622
623 default:
624 return SmUnhandled();
625 }
626}
SM_RESULT LeaveTimerFor(_In_ TIMER_EXIT Exit)
Definition: epstate.cpp:742
VOID ReportTimeout(_In_ XEP_TIMEOUT Timeout)
Definition: epctx.cpp:2458
@ XepTimeoutHalt
Definition: epstate.h:50

◆ OnAwaitingStoppedEvent()

SM_RESULT XhciEndpointMachine::OnAwaitingStoppedEvent ( _In_ XepEvent  Event)
private

Definition at line 637 of file epstate.cpp.

639{
640 switch (Event)
641 {
642 case XepEvent::TimerFired:
644 return AfterStoppedEvent();
645
646 case XepEvent::StoppedEventSeen:
648
649 default:
650 return SmUnhandled();
651 }
652}
SM_RESULT AfterStoppedEvent()
Definition: epstate.cpp:812
@ XepTimeoutStoppedEvent
Definition: epstate.h:51

◆ OnAwaitingStopRetry()

SM_RESULT XhciEndpointMachine::OnAwaitingStopRetry ( _In_ XepEvent  Event)
private

Definition at line 579 of file epstate.cpp.

581{
582 switch (Event)
583 {
584 case XepEvent::TimerFired:
586 return SmTransition(&StoppingPipe);
587
588 /* Controllers with this quirk report a context error for a stopped endpoint */
590 return AfterStopCommand();
591
594
595 case XepEvent::HaltReported:
597
598 default:
599 return SmUnhandled();
600 }
601}
BOOLEAN StopAttemptsExhausted()
Definition: epctx.cpp:2808
VOID RequestControllerReset()
Definition: epctx.cpp:2766
BOOLEAN IgnoresStopContextError()
Definition: epctx.cpp:2796
SM_RESULT AfterStopCommand()
Definition: epstate.cpp:781
static const State AwaitingRecovery
Definition: epstate.h:108

◆ OnClientResetCommand()

SM_RESULT XhciEndpointMachine::OnClientResetCommand ( _In_ XepEvent  Event)
private

Definition at line 489 of file epstate.cpp.

491{
492 if (Event != XepEvent::CommandFailed)
493 return SmUnhandled();
494
497}

◆ OnCommanding()

SM_RESULT XhciEndpointMachine::OnCommanding ( _In_ XepEvent  Event)
private

Definition at line 397 of file epstate.cpp.

399{
400 if (Event == XepEvent::CommandFailed)
402
403 return SmUnhandled();
404}

◆ OnDisabled()

SM_RESULT XhciEndpointMachine::OnDisabled ( _In_ XepEvent  Event)
private

Definition at line 213 of file epstate.cpp.

215{
216 switch (Event)
217 {
218 case XepEvent::ControllerResetDone:
219 /* Enter again so the discards are purged once more */
221 return SmTransition(&Disabled);
222
223 case XepEvent::Enable:
224 return Remap();
225
226 default:
227 return SmUnhandled();
228 }
229}
VOID AckControllerReset()
Definition: epctx.cpp:2502
SM_RESULT Remap()
Definition: epstate.cpp:703

◆ OnDraining()

SM_RESULT XhciEndpointMachine::OnDraining ( _In_ XepEvent  Event)
private

Definition at line 666 of file epstate.cpp.

668{
669 switch (Event)
670 {
671 case XepEvent::TimerFired:
673 {
675 return AfterHaltDrained();
676 }
677
679 return AfterStopDrained();
680
681 case XepEvent::ExpectedEventsDone:
683
684 case XepEvent::TransferAborted:
686
687 default:
688 return SmUnhandled();
689 }
690}
SM_RESULT AfterHaltDrained()
Definition: epstate.cpp:819
@ XepTimeoutDrainAfterStop
Definition: epstate.h:52
@ XepTimeoutDrainAfterHalt
Definition: epstate.h:53

◆ OnHaltingRingFill()

SM_RESULT XhciEndpointMachine::OnHaltingRingFill ( _In_ XepEvent  Event)
private

Definition at line 354 of file epstate.cpp.

356{
357 if (Event != XepEvent::StreamMapStopped)
358 return SmUnhandled();
359
360 switch (m_AfterMapping)
361 {
364 return BeginStop();
365
367
369 return AfterHalt();
370
373
374 default:
375 return SmTransition(&Removed);
376 }
377}
static const State RebuildingContextForReset
Definition: epstate.h:121
SM_RESULT BeginStop()
Definition: epstate.cpp:770
static const State Removed
Definition: epstate.h:111
BOOLEAN DoorbellRungSinceFill()
Definition: epctx.cpp:2814

◆ OnMapping()

SM_RESULT XhciEndpointMachine::OnMapping ( _In_ XepEvent  Event)
private

Definition at line 253 of file epstate.cpp.

255{
256 switch (Event)
257 {
258 case XepEvent::ControllerResetStarting:
260
261 case XepEvent::StreamsOn:
262 case XepEvent::StreamsOff:
263 return Remap();
264
265 case XepEvent::TransferAborted:
267
268 case XepEvent::HaltReported:
270
271 case XepEvent::ControllerRemoved:
273
274 case XepEvent::ClientReset:
278
280 return SmTransition(&Mapping);
281
282 default:
283 return SmUnhandled();
284 }
285}
VOID NotifyRingsClientReset()
Definition: epctx.cpp:2593
static const State Mapping
Definition: epstate.h:103
SM_RESULT SuspendRingFillFor(_In_ MAPPING_STOP_REASON Reason)
Definition: epstate.cpp:710
static const State ResetWhileMapping
Definition: epstate.h:104
BOOLEAN ShouldReconfigureForReset()
Definition: epctx.cpp:2841

◆ OnParked()

SM_RESULT XhciEndpointMachine::OnParked ( _In_ XepEvent  Event)
private

Definition at line 288 of file epstate.cpp.

290{
291 switch (Event)
292 {
293 case XepEvent::ControllerResetStarting:
295
296 case XepEvent::ControllerRemoved:
297 return SmTransition(&Removed);
298
299 default:
300 return SmUnhandled();
301 }
302}
static const State AwaitingControllerReset
Definition: epstate.h:110

◆ OnPrimaryInterrupterOnly()

BOOLEAN XhciEndpointMachine::OnPrimaryInterrupterOnly ( )
private

Definition at line 2784 of file epctx.cpp.

2785{
2786 return m_Endpoint->m_Controller->HasErrata(XhciErrata::IntPrimaryOnly);
2787}

Referenced by AfterStopCommand().

◆ OnRebuildingContextAfterStop()

SM_RESULT XhciEndpointMachine::OnRebuildingContextAfterStop ( _In_ XepEvent  Event)
private

Definition at line 445 of file epstate.cpp.

447{
448 if (Event == XepEvent::CommandSucceeded)
450
451 return SmUnhandled();
452}

◆ OnRebuildingContextForReset()

SM_RESULT XhciEndpointMachine::OnRebuildingContextForReset ( _In_ XepEvent  Event)
private

Definition at line 524 of file epstate.cpp.

526{
527 if ((Event != XepEvent::CommandSucceeded) && (Event != XepEvent::BufferAllocFailed))
528 return SmUnhandled();
529
530 /* A buffer failure already set the request status, the request completes either way */
532 return Remap();
533}

◆ OnReclaiming()

SM_RESULT XhciEndpointMachine::OnReclaiming ( _In_ XepEvent  Event)
private

Definition at line 546 of file epstate.cpp.

548{
549 if (Event == XepEvent::TransferAborted)
551
552 if (Event != XepEvent::TransfersRecovered)
553 return SmUnhandled();
554
555 switch (m_AfterReclaim)
556 {
560 return Remap();
561
565
566 default:
567 return Remap();
568 }
569}
static const State AwaitingDisable
Definition: epstate.h:105
VOID RestartStreamQueues()
Definition: epctx.cpp:2645

◆ OnResettingDefaultPipe()

SM_RESULT XhciEndpointMachine::OnResettingDefaultPipe ( _In_ XepEvent  Event)
private

Definition at line 479 of file epstate.cpp.

481{
482 if (Event == XepEvent::CommandSucceeded)
484
485 return SmUnhandled();
486}

◆ OnResettingPipe()

SM_RESULT XhciEndpointMachine::OnResettingPipe ( _In_ XepEvent  Event)
private

Definition at line 507 of file epstate.cpp.

509{
510 if (Event == XepEvent::CommandSucceeded)
512
513 return SmUnhandled();
514}

◆ OnRunning()

SM_RESULT XhciEndpointMachine::OnRunning ( _In_ XepEvent  Event)
private

Definition at line 242 of file epstate.cpp.

244{
245 if (Event != XepEvent::ControllerResetDone)
246 return SmUnhandled();
247
250}

◆ OnStoppingPipe()

SM_RESULT XhciEndpointMachine::OnStoppingPipe ( _In_ XepEvent  Event)
private

Definition at line 415 of file epstate.cpp.

417{
418 switch (Event)
419 {
420 case XepEvent::CommandSucceeded:
421 return AfterStopCommand();
422
423 case XepEvent::StopFailedHalted:
424 return SmTransition(&AwaitingHalt);
425
426 case XepEvent::StopFailedRunning:
428
429 case XepEvent::StopFailedStopped:
431
432 default:
433 return SmUnhandled();
434 }
435}
static const State AwaitingHalt
Definition: epstate.h:125

◆ OnUpdatingDequeue()

SM_RESULT XhciEndpointMachine::OnUpdatingDequeue ( _In_ XepEvent  Event)
private

Definition at line 462 of file epstate.cpp.

464{
465 if (Event == XepEvent::CommandSucceeded)
467
468 return SmUnhandled();
469}
static const State AwaitingCancelOk
Definition: epstate.h:113

◆ PurgeStreamQueues()

VOID XhciEndpointMachine::PurgeStreamQueues ( )
private

Definition at line 2632 of file epctx.cpp.

2633{
2635 ULONG Index;
2636
2637 if (!(Ep->m_Flags & XHCI_EP_STREAM_HALT_PENDING) || !Ep->UsesStreams())
2638 return;
2639
2640 for (Index = 0; Index < Ep->m_CurrentStreams->Count; Index++)
2641 WdfIoQueuePurge(Ep->m_CurrentStreams->Entry[Index].Ring->Queue(), NULL, NULL);
2642}
WDFQUEUE Queue() const
Definition: xferring.cpp:315
#define XHCI_EP_STREAM_HALT_PENDING
Definition: epctx.cpp:22

Referenced by AfterHaltDrained().

◆ ReclaimFor()

SM_RESULT XhciEndpointMachine::ReclaimFor ( _In_ RECLAIM_REASON  Reason)
private

Definition at line 718 of file epstate.cpp.

720{
722 return SmTransition(&Reclaiming);
723}
static const State Reclaiming
Definition: epstate.h:122
PVOID PVOID PWCHAR PVOID USHORT PULONG Reason
Definition: env.c:47

Referenced by OnAwaitingCancelOk(), OnAwaitingControllerReset(), OnHaltingRingFill(), OnResettingDefaultPipe(), and OnResettingPipe().

◆ ReclaimIgnoresCancel()

BOOLEAN XhciEndpointMachine::ReclaimIgnoresCancel ( ) const
inlineprivate

Definition at line 265 of file epstate.h.

Referenced by EnterReclaiming(), and OnReclaiming().

◆ ReconfigureAfterStop()

VOID XhciEndpointMachine::ReconfigureAfterStop ( )
private

Definition at line 2694 of file epctx.cpp.

2695{
2699
2701 if (Ep->m_StopInput == NULL)
2702 {
2703 DPRINT1("Endpoint %p DCI %lu no input context for the reconfigure after stop\n", Ep, Ep->m_Dci);
2704 Ep->m_Controller->RaiseControllerFault(XhciRecovery::ResetHost, XHCI_REASON_NO_LIVE_DUMP);
2705 Ep->PostCommandFailure();
2706 return;
2707 }
2708
2711 Ep->m_Controller->m_Commands.Submit(&Ep->m_Command);
2712}
#define DPRINT1
Definition: precomp.h:8
XhciCommonBuffer m_Buffers
Definition: hc.h:92
XhciCommandRing m_Commands
Definition: hc.h:95
XhciRegisters m_Registers
Definition: hc.h:91
VOID BuildEndpointConfigure(_In_ XhciDmaBuffer *Input, _In_opt_ const VOID *EndpointContext, _In_ BOOLEAN Drop, _In_ BOOLEAN Add, _Out_ XhciCommand *Command, _In_ PFN_XHCI_COMMAND_DONE Done)
Definition: epctx.cpp:1888
XhciCommand m_Command
Definition: epctx.h:304
XhciDmaBuffer * m_StopInput
Definition: epctx.h:305
VOID PostCommandFailure()
Definition: epctx.cpp:1076
ULONG m_Dci
Definition: epctx.h:294
XhciUsbDevice * m_Device
Definition: epctx.h:279
static VOID NTAPI StopDropDone(_In_ XhciCommand *Command)
Definition: epctx.cpp:2282
ULONG ContextSize() const
Definition: mmio.cpp:651
PVOID OutputContext(_In_ ULONG Dci) const
Definition: slotdev.cpp:269
#define XHCI_REASON_NO_LIVE_DUMP
Definition: epctx.cpp:40
WDFSTRING Original
Definition: userreq.cpp:198
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
#define XHCI_INPUT_CONTEXT_COUNT
Definition: xhcihw.h:450

Referenced by EnterRebuildingContextAfterStop().

◆ ReconfigureForReset()

VOID XhciEndpointMachine::ReconfigureForReset ( )
private

Definition at line 2659 of file epctx.cpp.

2660{
2662 XhciEndpointReset* Data = &XhciGetRequestData(Ep->m_ResetRequest)->EndpointReset;
2665
2666 Data->InputContext = Ep->m_Controller->m_Buffers.Acquire(Size * XHCI_INPUT_CONTEXT_COUNT);
2667 if (Data->InputContext == NULL)
2668 {
2669 DPRINT1("Endpoint %p DCI %lu no input context for the client reset\n", Ep, Ep->m_Dci);
2671 Ep->PostEvent(XepEvent::BufferAllocFailed);
2672 return;
2673 }
2674
2675 if (Ep->UsesStreams())
2676 {
2677 /* Drop first; the copied endpoint context waits in the buffer for the add */
2678 Ep->BuildEndpointConfigure(Data->InputContext, Original, TRUE, FALSE,
2680 }
2681 else
2682 {
2683 Ep->BuildEndpointConfigure(Data->InputContext, Original, TRUE, TRUE,
2687 }
2688
2689 Ep->m_Controller->m_Commands.Submit(&Data->Command);
2690}
PXHCI_ENDPOINT_CONTEXT InputEndpointContext(_In_ XhciDmaBuffer *Input) const
Definition: epctx.cpp:1877
static VOID NTAPI ResetConfigureDone(_In_ XhciCommand *Command)
Definition: epctx.cpp:2250
static VOID NTAPI ResetDropDone(_In_ XhciCommand *Command)
Definition: epctx.cpp:2210
VOID PostEvent(_In_ XepEvent Event)
Definition: epctx.cpp:1069
ULONG64 DequeuePointerValue() const
Definition: xferring.cpp:670
VOID InitializeRing()
Definition: xferring.cpp:648
ULONG64 TRDequeuePointer
Definition: xhcihw.h:514
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158

Referenced by EnterRebuildingContextForReset().

◆ ReferenceEndpoint()

VOID XhciEndpointMachine::ReferenceEndpoint ( )
private

Definition at line 2432 of file epctx.cpp.

2433{
2435}
#define WdfObjectReference(Handle)
Definition: wdfobject.h:803

Referenced by SmReference().

◆ Remap()

SM_RESULT XhciEndpointMachine::Remap ( )
private

Definition at line 703 of file epstate.cpp.

704{
706 return SmTransition(&Mapping);
707}
VOID ResumeRingFill()
Definition: epctx.cpp:2484

Referenced by OnDisabled(), OnMapping(), OnRebuildingContextForReset(), and OnReclaiming().

◆ ReportStoppedEvent()

VOID XhciEndpointMachine::ReportStoppedEvent ( )
private

Definition at line 2545 of file epctx.cpp.

2546{
2548
2550 Ep->PostEvent(XepEvent::StoppedEventSeen);
2551}
#define XHCI_EP_STOPPED_HANDSHAKE
Definition: epctx.cpp:23

Referenced by EnterAwaitingStoppedEvent().

◆ ReportTimeout()

VOID XhciEndpointMachine::ReportTimeout ( _In_ XEP_TIMEOUT  Timeout)
private

Definition at line 2458 of file epctx.cpp.

2460{
2462
2463 switch (Timeout)
2464 {
2465 case XepTimeoutHalt:
2466 DPRINT1("Endpoint %p DCI %lu stop failed as halted but no halt event came\n", Ep, Ep->m_Dci);
2467 break;
2468
2470 DPRINT1("Endpoint %p DCI %lu got no stopped event after the stop\n", Ep, Ep->m_Dci);
2471 break;
2472
2474 DPRINT1("Endpoint %p DCI %lu expected events still missing after the stop\n", Ep, Ep->m_Dci);
2475 break;
2476
2477 default:
2478 DPRINT1("Endpoint %p DCI %lu expected events still missing after the halt\n", Ep, Ep->m_Dci);
2479 break;
2480 }
2481}
static ULONG Timeout
Definition: ping.c:61

Referenced by OnAwaitingHalt(), OnAwaitingStoppedEvent(), and OnDraining().

◆ RequestControllerReset()

VOID XhciEndpointMachine::RequestControllerReset ( )
private

Definition at line 2766 of file epctx.cpp.

2767{
2769
2770 DPRINT1("Endpoint %p DCI %lu would not stop after %lu attempts\n", Ep, Ep->m_Dci, Ep->m_StopAttempts);
2771 Ep->m_Controller->VerifierCheck(XHCI_VERIFY_STOP_EXHAUSTED);
2773}
VOID FatalError(_In_ ULONG Reason)
Definition: epctx.cpp:1083
#define XHCI_VERIFY_STOP_EXHAUSTED
Definition: epctx.cpp:34
#define XHCI_REASON_STOP_CONTEXT
Definition: epctx.cpp:42

Referenced by OnAwaitingStopRetry().

◆ ResetDefaultPipe()

VOID XhciEndpointMachine::ResetDefaultPipe ( )
private

Definition at line 2733 of file epctx.cpp.

2734{
2737
2738 RtlZeroMemory(Command, sizeof(*Command));
2739 Command->Trb.Dword[3] = XhciEndpointCommandControl(XhciTrbType::ResetEndpoint,
2740 Ep->m_Dci, Ep->m_Device->SlotId());
2742 Command->Context = Ep;
2743
2744 Ep->m_Controller->m_Commands.Submit(Command);
2745}
static VOID NTAPI ControlResetDone(_In_ XhciCommand *Command)
Definition: epctx.cpp:2055
ULONG SlotId() const
Definition: slotdev.cpp:335
static ULONG NTAPI XhciEndpointCommandControl(_In_ enum XhciTrbType Type, _In_ ULONG Dci, _In_ ULONG SlotId)
Definition: epctx.cpp:173
Definition: shell.h:41
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262

Referenced by EnterResettingDefaultPipe().

◆ ResetEndpoint()

VOID XhciEndpointMachine::ResetEndpoint ( )
private

Definition at line 2748 of file epctx.cpp.

2749{
2751 XhciCommand* Command = &XhciGetRequestData(Ep->m_ResetRequest)->EndpointReset.Command;
2752
2753 RtlZeroMemory(Command, sizeof(*Command));
2754 Command->Trb.Dword[3] = XhciEndpointCommandControl(XhciTrbType::ResetEndpoint,
2755 Ep->m_Dci, Ep->m_Device->SlotId());
2758
2760 Command->Context = Ep;
2761
2762 Ep->m_Controller->m_Commands.Submit(Command);
2763}
PENDPOINT_RESET ResetPayload() const
Definition: epctx.cpp:1096
static VOID NTAPI ClientResetDone(_In_ XhciCommand *Command)
Definition: epctx.cpp:2111
ENDPOINT_RESET_FLAGS Flags
Definition: ucxendpoint.h:49
@ FlagEndpointResetPreserveTransferState
Definition: ucxendpoint.h:16
#define XHCI_CMD_TRANSFER_STATE_PRESERVE
Definition: xhcihw.h:586

Referenced by EnterResettingPipe().

◆ ResetStopAttempts()

VOID XhciEndpointMachine::ResetStopAttempts ( )
private

Definition at line 2560 of file epctx.cpp.

2561{
2563}

Referenced by BeginStop().

◆ RestartStreamQueues()

VOID XhciEndpointMachine::RestartStreamQueues ( )
private

Definition at line 2645 of file epctx.cpp.

2646{
2648 ULONG Index;
2649
2650 if (!(Ep->m_Flags & XHCI_EP_STREAM_HALT_PENDING) || !Ep->UsesStreams())
2651 return;
2652
2653 for (Index = 0; Index < Ep->m_CurrentStreams->Count; Index++)
2654 WdfIoQueueStart(Ep->m_CurrentStreams->Entry[Index].Ring->Queue());
2655}

Referenced by OnReclaiming().

◆ ResumeRingFill()

VOID XhciEndpointMachine::ResumeRingFill ( )
private

Definition at line 2484 of file epctx.cpp.

2485{
2487
2489 if (Ep->UsesStreams())
2491
2493}
VOID ResumeRingFill()
Definition: xferring.cpp:684
ULONG HaltedCode
Definition: epctx.cpp:84

Referenced by Remap().

◆ RetryStopAfter()

SM_RESULT XhciEndpointMachine::RetryStopAfter ( _In_ ULONG  Milliseconds)
private

Definition at line 726 of file epstate.cpp.

728{
729 m_RetryDelay = Milliseconds;
731}
static const State AwaitingStopRetry
Definition: epstate.h:124

Referenced by BeginStop(), and OnStoppingPipe().

◆ RunTimerExit()

SM_RESULT XhciEndpointMachine::RunTimerExit ( _In_ TIMER_EXIT  Exit)
private

Definition at line 750 of file epstate.cpp.

752{
753 switch (Exit)
754 {
755 case TimerExitHalt:
756 return AfterHalt();
757
759 return AfterStoppedEvent();
760
762 return AfterStopDrained();
763
764 default:
765 return AfterHaltDrained();
766 }
767}

Referenced by EnterLeavingTimer().

◆ SendStopCommand()

VOID XhciEndpointMachine::SendStopCommand ( )
private

Definition at line 2572 of file epctx.cpp.

2573{
2576
2577 RtlZeroMemory(Command, sizeof(*Command));
2578 Command->Trb.Dword[3] = XhciEndpointCommandControl(XhciTrbType::StopEndpoint,
2579 Ep->m_Dci, Ep->m_Device->SlotId());
2581 Command->Context = Ep;
2582
2583 Ep->m_Controller->m_Commands.Submit(Command);
2584}
static VOID NTAPI StopDone(_In_ XhciCommand *Command)
Definition: epctx.cpp:1929

Referenced by EnterStoppingPipe().

◆ ShouldReconfigureForReset()

BOOLEAN XhciEndpointMachine::ShouldReconfigureForReset ( )
private

Definition at line 2841 of file epctx.cpp.

2842{
2844 ULONG Type = Ep->TransferType();
2845
2846 /* Like the USB 2.0 stack: nothing to do for a preserved state, control or isoch */
2850 {
2852 return FALSE;
2853 }
2854
2855 if (!Ep->AnyTransfersPending())
2856 return TRUE;
2857
2858 /* QUIRK: with transfers pending a bulk or interrupt reset succeeds without a toggle reset */
2860 return FALSE;
2861}
Type
Definition: Type.h:7
ULONG TransferType() const
Definition: epctx.cpp:263
#define USB_ENDPOINT_TYPE_CONTROL
Definition: usb100.h:62
#define USB_ENDPOINT_TYPE_ISOCHRONOUS
Definition: usb100.h:63

Referenced by OnMapping().

◆ SmCancelTimer()

BOOLEAN XhciEndpointMachine::SmCancelTimer ( )
private

Definition at line 207 of file epstate.cpp.

208{
209 return StopTimer();
210}
BOOLEAN StopTimer()
Definition: epctx.cpp:2444

◆ SmDereference()

VOID XhciEndpointMachine::SmDereference ( )
private

Definition at line 201 of file epstate.cpp.

202{
204}
VOID DereferenceEndpoint()
Definition: epctx.cpp:2438

◆ SmReference()

VOID XhciEndpointMachine::SmReference ( )
private

Definition at line 195 of file epstate.cpp.

196{
198}
VOID ReferenceEndpoint()
Definition: epctx.cpp:2432

◆ StartTimer()

VOID XhciEndpointMachine::StartTimer ( _In_ ULONG  Milliseconds)
private

Definition at line 2450 of file epctx.cpp.

2452{
2453 WdfTimerStart(m_Endpoint->m_Timer, WDF_REL_TIMEOUT_IN_MS(Milliseconds));
2454}
WDFTIMER m_Timer
Definition: epctx.h:287
FORCEINLINE LONGLONG WDF_REL_TIMEOUT_IN_MS(_In_ ULONGLONG Time)
Definition: wdfcore.h:80

Referenced by EnterAwaitingHalt(), EnterAwaitingStoppedEvent(), EnterAwaitingStopRetry(), and EnterDraining().

◆ StopAttemptsExhausted()

BOOLEAN XhciEndpointMachine::StopAttemptsExhausted ( )
private

Definition at line 2808 of file epctx.cpp.

2809{
2811}
#define XHCI_STOP_ATTEMPTS_MAX
Definition: epctx.cpp:59

Referenced by OnAwaitingStopRetry().

◆ StopTimer()

BOOLEAN XhciEndpointMachine::StopTimer ( )
private

Definition at line 2444 of file epctx.cpp.

2445{
2446 return WdfTimerStop(m_Endpoint->m_Timer, FALSE);
2447}

Referenced by SmCancelTimer().

◆ SuspendRingFill()

VOID XhciEndpointMachine::SuspendRingFill ( )
private

Definition at line 2496 of file epctx.cpp.

Referenced by EnterHaltingRingFill().

◆ SuspendRingFillFor()

SM_RESULT XhciEndpointMachine::SuspendRingFillFor ( _In_ MAPPING_STOP_REASON  Reason)
private

Definition at line 710 of file epstate.cpp.

712{
715}
static const State HaltingRingFill
Definition: epstate.h:112

Referenced by OnMapping().

◆ UpdateDequeuePointers()

VOID XhciEndpointMachine::UpdateDequeuePointers ( )
private

Definition at line 2716 of file epctx.cpp.

2717{
2719 ULONG StreamId;
2720
2721 if (!Ep->UsesStreams())
2722 {
2723 Ep->DequeueAfterStop(0);
2724 return;
2725 }
2726
2728 for (StreamId = 1; StreamId <= Ep->m_CurrentStreams->Count; StreamId++)
2729 Ep->DequeueAfterStop(StreamId);
2730}
VOID DequeueAfterStop(_In_ ULONG StreamId)
Definition: epctx.cpp:1997

Referenced by EnterUpdatingDequeue().

Friends And Related Function Documentation

◆ SmMachine< XhciEndpointMachine, XepEvent >

Definition at line 1 of file epstate.h.

◆ XhciEndpointProbe

friend class XhciEndpointProbe
friend

Definition at line 59 of file epstate.h.

Member Data Documentation

◆ Active

const Xep::State Xep::Active
staticprivate
Initial value:
=
{ NULL, "Active", 0, &Xep::OnActive, NULL }
SM_RESULT OnActive(_In_ XepEvent Event)
Definition: epstate.cpp:232

Definition at line 101 of file epstate.h.

◆ AwaitingCancelOk

const Xep::State Xep::AwaitingCancelOk
staticprivate
Initial value:
=
{ &Active, "AwaitingCancelOk", SM_STATE_CRITICAL_ONLY,
static const State Active
Definition: epstate.h:101
SM_RESULT OnAwaitingCancelOk(_In_ XepEvent Event)
Definition: epstate.cpp:387
SM_RESULT EnterAwaitingCancelOk()
Definition: epstate.cpp:380
#define SM_STATE_CRITICAL_ONLY
Definition: smengine.h:41

Definition at line 113 of file epstate.h.

Referenced by OnUpdatingDequeue().

◆ AwaitingClientReset

const Xep::State Xep::AwaitingClientReset
staticprivate
Initial value:
=
{ &Parked, "AwaitingClientReset", 0, &Xep::OnAwaitingClientReset, NULL, CancelDiscards }
SM_RESULT OnAwaitingClientReset(_In_ XepEvent Event)
Definition: epstate.cpp:305
static const State Parked
Definition: epstate.h:106
static const XepEvent CancelDiscards[]
Definition: epstate.cpp:58

Definition at line 107 of file epstate.h.

Referenced by AfterHaltDrained(), and OnAwaitingClientReset().

◆ AwaitingControllerReset

const Xep::State Xep::AwaitingControllerReset
staticprivate
Initial value:
=
{ &Fenced, "AwaitingControllerReset", 0,
static const State Fenced
Definition: epstate.h:109
SM_RESULT OnAwaitingControllerReset(_In_ XepEvent Event)
Definition: epstate.cpp:326
SM_RESULT EnterAwaitingControllerReset()
Definition: epstate.cpp:319

Definition at line 110 of file epstate.h.

Referenced by OnParked().

◆ AwaitingDisable

const Xep::State Xep::AwaitingDisable
staticprivate
Initial value:
=
static const XepEvent AwaitingDisableDiscards[]
Definition: epstate.cpp:55
#define SM_STATE_TAKES_REQUESTS
Definition: smengine.h:39

Definition at line 105 of file epstate.h.

Referenced by OnReclaiming(), and OnRunning().

◆ AwaitingHalt

const Xep::State Xep::AwaitingHalt
staticprivate
Initial value:
=
{ &Timed, "AwaitingHalt", 0, &Xep::OnAwaitingHalt, &Xep::EnterAwaitingHalt }
SM_RESULT OnAwaitingHalt(_In_ XepEvent Event)
Definition: epstate.cpp:611
static const State Timed
Definition: epstate.h:123
SM_RESULT EnterAwaitingHalt()
Definition: epstate.cpp:604

Definition at line 125 of file epstate.h.

Referenced by OnStoppingPipe().

◆ AwaitingRecovery

const Xep::State Xep::AwaitingRecovery
staticprivate
Initial value:
=
{ &Parked, "AwaitingRecovery", 0, NULL, NULL, AwaitingRecoveryDiscards }
static const XepEvent AwaitingRecoveryDiscards[]
Definition: epstate.cpp:61

Definition at line 108 of file epstate.h.

Referenced by OnAwaitingStopRetry(), OnClientResetCommand(), and OnCommanding().

◆ AwaitingStoppedEvent

const Xep::State Xep::AwaitingStoppedEvent
staticprivate
Initial value:
=
{ &Timed, "AwaitingStoppedEvent", 0,
SM_RESULT OnAwaitingStoppedEvent(_In_ XepEvent Event)
Definition: epstate.cpp:637
SM_RESULT EnterAwaitingStoppedEvent()
Definition: epstate.cpp:629

Definition at line 126 of file epstate.h.

Referenced by AfterStopCommand().

◆ AwaitingStopRetry

const Xep::State Xep::AwaitingStopRetry
staticprivate
Initial value:
=
SM_RESULT OnAwaitingStopRetry(_In_ XepEvent Event)
Definition: epstate.cpp:579
SM_RESULT EnterAwaitingStopRetry()
Definition: epstate.cpp:572

Definition at line 124 of file epstate.h.

Referenced by RetryStopAfter().

◆ ClientResetCommand

const Xep::State Xep::ClientResetCommand
staticprivate
Initial value:
=
{ &Commanding, "ClientResetCommand", 0, &Xep::OnClientResetCommand, NULL }
static const State Commanding
Definition: epstate.h:114
SM_RESULT OnClientResetCommand(_In_ XepEvent Event)
Definition: epstate.cpp:489

Definition at line 119 of file epstate.h.

◆ Commanding

const Xep::State Xep::Commanding
staticprivate
Initial value:
=
{ &Active, "Commanding", 0, &Xep::OnCommanding, NULL }
SM_RESULT OnCommanding(_In_ XepEvent Event)
Definition: epstate.cpp:397

Definition at line 114 of file epstate.h.

◆ Disabled

const Xep::State Xep::Disabled
staticprivate
Initial value:
=
SM_RESULT OnDisabled(_In_ XepEvent Event)
Definition: epstate.cpp:213
static const XepEvent DisabledDiscards[]
Definition: epstate.cpp:52

Definition at line 100 of file epstate.h.

Referenced by Initialize(), OnActive(), and OnDisabled().

◆ Draining

const Xep::State Xep::Draining
staticprivate
Initial value:
=
{ &Timed, "Draining", 0, &Xep::OnDraining, &Xep::EnterDraining }
SM_RESULT OnDraining(_In_ XepEvent Event)
Definition: epstate.cpp:666
SM_RESULT EnterDraining()
Definition: epstate.cpp:655

Definition at line 127 of file epstate.h.

Referenced by DrainFor().

◆ EventInfo

const SM_EVENT_INFO XhciEndpointMachine::EventInfo
static
Initial value:
=
{
{ "CommandSucceeded", SmEventCritical, FALSE, FALSE },
{ "CommandFailed", SmEventCritical, FALSE, FALSE },
{ "StreamMapStopped", SmEventCritical, FALSE, FALSE },
{ "CancelAllowed", SmEventCritical, FALSE, FALSE },
{ "StopFailedHalted", SmEventCritical, FALSE, FALSE },
{ "StopFailedRunning", SmEventCritical, FALSE, FALSE },
{ "StopFailedStopped", SmEventCritical, FALSE, FALSE },
{ "BufferAllocFailed", SmEventCompletion, FALSE, FALSE },
{ "ExpectedEventsDone", SmEventCompletion, FALSE, FALSE },
{ "StoppedEventSeen", SmEventCompletion, FALSE, FALSE },
{ "HaltReported", SmEventCompletion, FALSE, FALSE },
{ "StreamsOff", SmEventCompletion, FALSE, FALSE },
{ "StreamsOn", SmEventCompletion, FALSE, FALSE },
{ "TimerFired", SmEventCompletion, FALSE, FALSE },
{ "TransferAborted", SmEventCompletion, FALSE, FALSE },
{ "TransfersRecovered", SmEventCompletion, FALSE, FALSE },
{ "ControllerResetStarting", SmEventRequest, FALSE, FALSE },
{ "ControllerResetDone", SmEventRequest, FALSE, FALSE },
{ "ControllerRemoved", SmEventRequest, FALSE, FALSE },
{ "Disable", SmEventRequest, FALSE, FALSE },
{ "Enable", SmEventRequest, FALSE, FALSE },
{ "ClientReset", SmEventRequest, FALSE, FALSE },
}
@ SmEventRequest
Definition: smengine.h:25
@ SmEventCompletion
Definition: smengine.h:24
@ SmEventCritical
Definition: smengine.h:27

Definition at line 72 of file epstate.h.

◆ Fenced

const Xep::State Xep::Fenced
staticprivate
Initial value:
=
static const XepEvent FencedDiscards[]
Definition: epstate.cpp:64

Definition at line 109 of file epstate.h.

◆ HaltingRingFill

const Xep::State Xep::HaltingRingFill
staticprivate
Initial value:
=
{ &Active, "HaltingRingFill", SM_STATE_CRITICAL_ONLY,
SM_RESULT EnterHaltingRingFill()
Definition: epstate.cpp:344
SM_RESULT OnHaltingRingFill(_In_ XepEvent Event)
Definition: epstate.cpp:354

Definition at line 112 of file epstate.h.

Referenced by SuspendRingFillFor().

◆ LeavingTimer

const Xep::State Xep::LeavingTimer
staticprivate
Initial value:
=
{ &Active, "LeavingTimer", 0, NULL, &Xep::EnterLeavingTimer }
SM_RESULT EnterLeavingTimer()
Runs the timer exit; the engine already stopped the timer, so it cannot fire after this.
Definition: epstate.cpp:697

Definition at line 128 of file epstate.h.

Referenced by LeaveTimerFor().

◆ m_AfterMapping

MAPPING_STOP_REASON XhciEndpointMachine::m_AfterMapping
private

Definition at line 319 of file epstate.h.

Referenced by EnterHaltingRingFill(), Initialize(), OnHaltingRingFill(), and SuspendRingFillFor().

◆ m_AfterReclaim

RECLAIM_REASON XhciEndpointMachine::m_AfterReclaim
private

Definition at line 320 of file epstate.h.

Referenced by Initialize(), OnReclaiming(), ReclaimFor(), and ReclaimIgnoresCancel().

◆ m_AfterTimer

TIMER_EXIT XhciEndpointMachine::m_AfterTimer
private

Definition at line 321 of file epstate.h.

Referenced by EnterLeavingTimer(), Initialize(), and LeaveTimerFor().

◆ m_DrainAfterHalt

BOOLEAN XhciEndpointMachine::m_DrainAfterHalt
private

Definition at line 323 of file epstate.h.

Referenced by DrainFor(), EnterDraining(), Initialize(), and OnDraining().

◆ m_Endpoint

◆ m_RetryDelay

ULONG XhciEndpointMachine::m_RetryDelay
private

Definition at line 322 of file epstate.h.

Referenced by EnterAwaitingStopRetry(), Initialize(), and RetryStopAfter().

◆ Mapping

const Xep::State Xep::Mapping
staticprivate
Initial value:
=
{ &Running, "Mapping", 0, &Xep::OnMapping, NULL }
SM_RESULT OnMapping(_In_ XepEvent Event)
Definition: epstate.cpp:253
static const State Running
Definition: epstate.h:102

Definition at line 103 of file epstate.h.

Referenced by OnMapping(), and Remap().

◆ Parked

const Xep::State Xep::Parked
staticprivate
Initial value:
=
SM_RESULT OnParked(_In_ XepEvent Event)
Definition: epstate.cpp:288

Definition at line 106 of file epstate.h.

◆ RebuildingContextAfterStop

const Xep::State Xep::RebuildingContextAfterStop
staticprivate
Initial value:
=
{ &Commanding, "RebuildingContextAfterStop", SM_STATE_CRITICAL_ONLY,
SM_RESULT OnRebuildingContextAfterStop(_In_ XepEvent Event)
Definition: epstate.cpp:445
SM_RESULT EnterRebuildingContextAfterStop()
Definition: epstate.cpp:438

Definition at line 116 of file epstate.h.

Referenced by AfterStopDrained().

◆ RebuildingContextForReset

const Xep::State Xep::RebuildingContextForReset
staticprivate
Initial value:
=
{ &ClientResetCommand, "RebuildingContextForReset", 0,
static const State ClientResetCommand
Definition: epstate.h:119
SM_RESULT EnterRebuildingContextForReset()
Definition: epstate.cpp:517
SM_RESULT OnRebuildingContextForReset(_In_ XepEvent Event)
Definition: epstate.cpp:524

Definition at line 121 of file epstate.h.

Referenced by OnHaltingRingFill().

◆ Reclaiming

const Xep::State Xep::Reclaiming
staticprivate
Initial value:
=
{ &Active, "Reclaiming", 0, &Xep::OnReclaiming, &Xep::EnterReclaiming }
SM_RESULT EnterReclaiming()
Definition: epstate.cpp:536
SM_RESULT OnReclaiming(_In_ XepEvent Event)
Definition: epstate.cpp:546

Definition at line 122 of file epstate.h.

Referenced by ReclaimFor().

◆ Removed

const Xep::State Xep::Removed
staticprivate
Initial value:
=
{ &Fenced, "Removed", 0, NULL, &Xep::EnterRemoved }
SM_RESULT EnterRemoved()
Definition: epstate.cpp:336

Definition at line 111 of file epstate.h.

Referenced by OnHaltingRingFill(), and OnParked().

◆ ResettingDefaultPipe

const Xep::State Xep::ResettingDefaultPipe
staticprivate
Initial value:
=
{ &Commanding, "ResettingDefaultPipe", 0,
SM_RESULT OnResettingDefaultPipe(_In_ XepEvent Event)
Definition: epstate.cpp:479
SM_RESULT EnterResettingDefaultPipe()
Definition: epstate.cpp:472

Definition at line 118 of file epstate.h.

Referenced by AfterHalt().

◆ ResettingPipe

const Xep::State Xep::ResettingPipe
staticprivate
Initial value:
=
{ &ClientResetCommand, "ResettingPipe", 0,
SM_RESULT EnterResettingPipe()
Definition: epstate.cpp:500
SM_RESULT OnResettingPipe(_In_ XepEvent Event)
Definition: epstate.cpp:507

Definition at line 120 of file epstate.h.

Referenced by OnAwaitingClientReset().

◆ ResetWhileMapping

const Xep::State Xep::ResetWhileMapping
staticprivate
Initial value:
=
{ &Running, "ResetWhileMapping", 0, NULL, NULL }

Definition at line 104 of file epstate.h.

Referenced by OnMapping().

◆ Running

const Xep::State Xep::Running
staticprivate
Initial value:
=
SM_RESULT OnRunning(_In_ XepEvent Event)
Definition: epstate.cpp:242

Definition at line 102 of file epstate.h.

◆ SmCompletionsFirst

const BOOLEAN XhciEndpointMachine::SmCompletionsFirst = FALSE
staticprivate

Definition at line 131 of file epstate.h.

◆ SmTimerEventId

const USHORT XhciEndpointMachine::SmTimerEventId = static_cast<USHORT>(XepEvent::TimerFired)
staticprivate

Definition at line 132 of file epstate.h.

◆ StoppingPipe

const Xep::State Xep::StoppingPipe
staticprivate
Initial value:
=
{ &Commanding, "StoppingPipe", SM_STATE_CRITICAL_ONLY,
SM_RESULT OnStoppingPipe(_In_ XepEvent Event)
Definition: epstate.cpp:415
SM_RESULT EnterStoppingPipe()
Definition: epstate.cpp:407

Definition at line 115 of file epstate.h.

Referenced by BeginStop(), and OnAwaitingStopRetry().

◆ Timed

const Xep::State Xep::Timed
staticprivate
Initial value:
=
#define SM_STATE_STOP_TIMER_ON_EXIT
Definition: smengine.h:43

Definition at line 123 of file epstate.h.

◆ UpdatingDequeue

const Xep::State Xep::UpdatingDequeue
staticprivate
Initial value:
=
{ &Commanding, "UpdatingDequeue", SM_STATE_CRITICAL_ONLY,
SM_RESULT EnterUpdatingDequeue()
Definition: epstate.cpp:455
SM_RESULT OnUpdatingDequeue(_In_ XepEvent Event)
Definition: epstate.cpp:462

Definition at line 117 of file epstate.h.

Referenced by AfterStopDrained(), and OnRebuildingContextAfterStop().


The documentation for this class was generated from the following files: