ReactOS 0.4.17-dev-1281-g065abb3
hostreset.cpp File Reference
#include "ucx01000.h"
#include <debug.h>
Include dependency graph for hostreset.cpp:

Go to the source code of this file.

Classes

struct  UcxResetFanOut
 

Macros

#define NDEBUG
 

Functions

static VOID NTAPI UcxCollectEndpointsForReset (_In_ UcxUsbDevice *Device, _In_opt_ PVOID Context)
 
static VOID NTAPI UcxPostToCollectedEndpoints (_Inout_ UcxResetFanOut *FanOut, _In_ EpEvent Event)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 10 of file hostreset.cpp.

Function Documentation

◆ UcxCollectEndpointsForReset()

static VOID NTAPI UcxCollectEndpointsForReset ( _In_ UcxUsbDevice *  Device,
_In_opt_ PVOID  Context 
)
static

Definition at line 24 of file hostreset.cpp.

27{
31
32 /* Root hub endpoints have no machine and the root hub keeps its programming */
33 if (Device->IsRootHub())
34 return;
35
36 if (FanOut->MarkDeprogrammed)
37 Device->m_DeprogrammedByControllerReset = TRUE;
38
39 for (Entry = Device->m_EndpointList.Flink;
40 Entry != &Device->m_EndpointList;
41 Entry = Entry->Flink)
42 {
44
45 NT_ASSERT(!UcxIsListEntryLinked(&Endpoint->m_ControllerResetLink));
47 InsertTailList(&FanOut->Endpoints, &Endpoint->m_ControllerResetLink);
48 FanOut->Count++;
49 }
50}
PLIST_ENTRY Entry
Definition: devhcd.cpp:1262
#define TRUE
Definition: types.h:120
#define InsertTailList(ListHead, Entry)
_Must_inspect_result_ _In_ PUCXHUB_DEVICE_CREATE_INFO _Out_ UCXUSBDEVICE * Device
Definition: hubucx.h:258
_In_ UCXHUB_DEVICE_CONTEXT _In_ UCXENDPOINT Endpoint
Definition: hubucx.h:238
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_ PVOID Context
Definition: kse.h:81
LIST_ENTRY Endpoints
Definition: hostreset.cpp:16
BOOLEAN MarkDeprogrammed
Definition: hostreset.cpp:18
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
FORCEINLINE BOOLEAN NTAPI UcxIsListEntryLinked(_In_ const LIST_ENTRY *Entry)
Definition: ucxutil.h:94
#define WdfObjectReference(Handle)
Definition: wdfobject.h:803
#define NT_ASSERT
Definition: rtlfuncs.h:3334

Referenced by UcxController::NotifyDevicesResetDone(), and UcxController::PrepareDevicesForReset().

◆ UcxPostToCollectedEndpoints()

static VOID NTAPI UcxPostToCollectedEndpoints ( _Inout_ UcxResetFanOut *  FanOut,
_In_ EpEvent  Event 
)
static

Definition at line 55 of file hostreset.cpp.

58{
61
62 while (!IsListEmpty(&FanOut->Endpoints))
63 {
64 Entry = RemoveHeadList(&FanOut->Endpoints);
65 Endpoint = CONTAINING_RECORD(Entry, UcxEndpoint, m_ControllerResetLink);
67
68 Endpoint->m_Machine.SmPost(Event);
70 }
71}
_Check_return_ _In_ DXGK_EVENT_TYPE _In_ ULONG Event
Definition: dispmprt.h:1287
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
#define RemoveHeadList(ListHead)
Definition: env_spec_w32.h:964
FORCEINLINE VOID NTAPI UcxClearListEntry(_Out_ PLIST_ENTRY Entry)
Definition: ucxutil.h:84
#define WdfObjectDereference(Handle)
Definition: wdfobject.h:826

Referenced by UcxController::NotifyDevicesResetDone(), and UcxController::PrepareDevicesForReset().