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

Go to the source code of this file.

Macros

#define NDEBUG
 
#define DEVICE_ENUM_RETRY_TIME   500
 
#define DEVICE_POST_RESET_TIME_20   32
 
#define DEVICE_POST_RESET_TIME_LONG   100
 
#define DEVICE_POST_RESET_TIME_30   15
 
#define DEVICE_POST_ADDRESS_TIME   10
 
#define DEVICE_DUPLICATE_POLL_TIME   500
 
#define DEVICE_DEFAULT_LANGUAGE   0x0409
 

Functions

static VOID NTAPI HubDropDeviceObject (_Inout_ WDFOBJECT *Object)
 
static VOID NTAPI HubFreeIfPresent (_In_opt_ PVOID Buffer)
 
static NTSTATUS NTAPI HubCreateDeviceRequest (_In_ HubPort *Port, _Out_ WDFREQUEST *Request)
 

Variables

static const char HubTagDeviceCreate [] = "hub child create"
 
static const char HubTagDevice [] = "hub child"
 

Macro Definition Documentation

◆ DEVICE_DEFAULT_LANGUAGE

#define DEVICE_DEFAULT_LANGUAGE   0x0409

Definition at line 26 of file hubchild.cpp.

◆ DEVICE_DUPLICATE_POLL_TIME

#define DEVICE_DUPLICATE_POLL_TIME   500

Definition at line 23 of file hubchild.cpp.

◆ DEVICE_ENUM_RETRY_TIME

#define DEVICE_ENUM_RETRY_TIME   500

Definition at line 18 of file hubchild.cpp.

◆ DEVICE_POST_ADDRESS_TIME

#define DEVICE_POST_ADDRESS_TIME   10

Definition at line 22 of file hubchild.cpp.

◆ DEVICE_POST_RESET_TIME_20

#define DEVICE_POST_RESET_TIME_20   32

Definition at line 19 of file hubchild.cpp.

◆ DEVICE_POST_RESET_TIME_30

#define DEVICE_POST_RESET_TIME_30   15

Definition at line 21 of file hubchild.cpp.

◆ DEVICE_POST_RESET_TIME_LONG

#define DEVICE_POST_RESET_TIME_LONG   100

Definition at line 20 of file hubchild.cpp.

◆ NDEBUG

#define NDEBUG

Definition at line 10 of file hubchild.cpp.

Function Documentation

◆ HubCreateDeviceRequest()

static NTSTATUS NTAPI HubCreateDeviceRequest ( _In_ HubPort *  Port,
_Out_ WDFREQUEST *  Request 
)
static

Definition at line 75 of file hubchild.cpp.

78{
81
83 Attributes.ParentObject = Port->m_Object;
84
85 Status = WdfRequestCreate(&Attributes, WdfDeviceGetIoTarget(Port->m_Hub->m_Device), Request);
86 if (NT_SUCCESS(Status))
88
89 return Status;
90}
LONG NTSTATUS
Definition: precomp.h:26
_In_ ULONG Attributes
Definition: dispmprt.h:1077
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
Status
Definition: gdiplustypes.h:24
CPPORT Port[4]
Definition: headless.c:38
static const char HubTagDevice[]
Definition: hubchild.cpp:15
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFREQUEST Request
FORCEINLINE VOID WDF_OBJECT_ATTRIBUTES_INIT(_Out_ PWDF_OBJECT_ATTRIBUTES Attributes)
Definition: wdfobject.h:147
#define WdfObjectReferenceWithTag(Handle, Tag)
Definition: wdfobject.h:806

Referenced by HubChild::Create().

◆ HubDropDeviceObject()

static VOID NTAPI HubDropDeviceObject ( _Inout_ WDFOBJECT *  Object)
static

Deletes a device owned object and drops the device's own reference on it.

Definition at line 51 of file hubchild.cpp.

53{
54 if (*Object == NULL)
55 return;
56
59 *Object = NULL;
60}
#define NULL
Definition: types.h:112
WdfObjectDelete(String)
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
#define WdfObjectDereferenceWithTag(Handle, Tag)
Definition: wdfobject.h:829

◆ HubFreeIfPresent()

static VOID NTAPI HubFreeIfPresent ( _In_opt_ PVOID  Buffer)
static

Definition at line 65 of file hubchild.cpp.

67{
68 if (Buffer != NULL)
70}
Definition: bufpool.h:45
#define HUB_TAG_DEVICE
Definition: hubutil.h:13
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109

Variable Documentation

◆ HubTagDevice

◆ HubTagDeviceCreate

const char HubTagDeviceCreate[] = "hub child create"
static

Definition at line 14 of file hubchild.cpp.

Referenced by HubChild::Create().