ReactOS 0.4.17-dev-1281-g065abb3
devreq.h File Reference
#include "hubid.h"
Include dependency graph for devreq.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HUB_MSOS_INDEX_EXT_CONFIG   4
 
#define HUB_MSOS_INDEX_EXT_PROPERTIES   5
 
#define HUB_MSOS_INDEX_CONTAINER_ID   6
 
#define HUB_MSOS20_INDEX_SET   7
 
#define HUB_MSOS20_INDEX_ALT_ENUM   8
 
#define HUB_MSOS_STRING_INDEX   0xEE
 

Functions

BOOLEAN NTAPI HubDeviceSend (_In_ HubChild *Child, _In_reads_bytes_opt_(Length) PVOID Buffer, _In_ ULONG Length, _In_ BOOLEAN ShortTransferOk)
 
FORCEINLINE ULONG NTAPI HubDeviceBytesReturned (_In_ HubChild *Child)
 
VOID NTAPI HubDeviceDescContext (_In_ HubChild *Child, _Out_ HubDescContext *Context)
 
VOID NTAPI HubCompleteFdoDescriptorRequest (_In_ HubChild *Child, _In_ WDFREQUEST Request, _In_ NTSTATUS Status, _In_ ULONG Size)
 

Macro Definition Documentation

◆ HUB_MSOS20_INDEX_ALT_ENUM

#define HUB_MSOS20_INDEX_ALT_ENUM   8

Definition at line 17 of file devreq.h.

◆ HUB_MSOS20_INDEX_SET

#define HUB_MSOS20_INDEX_SET   7

Definition at line 16 of file devreq.h.

◆ HUB_MSOS_INDEX_CONTAINER_ID

#define HUB_MSOS_INDEX_CONTAINER_ID   6

Definition at line 15 of file devreq.h.

◆ HUB_MSOS_INDEX_EXT_CONFIG

#define HUB_MSOS_INDEX_EXT_CONFIG   4

Definition at line 13 of file devreq.h.

◆ HUB_MSOS_INDEX_EXT_PROPERTIES

#define HUB_MSOS_INDEX_EXT_PROPERTIES   5

Definition at line 14 of file devreq.h.

◆ HUB_MSOS_STRING_INDEX

#define HUB_MSOS_STRING_INDEX   0xEE

Definition at line 20 of file devreq.h.

Function Documentation

◆ HubCompleteFdoDescriptorRequest()

VOID NTAPI HubCompleteFdoDescriptorRequest ( _In_ HubChild *  Child,
_In_ WDFREQUEST  Request,
_In_ NTSTATUS  Status,
_In_ ULONG  Size 
)

Completes the hub FDO descriptor request and drops the "User Mode FDO Request" device reference.

Definition at line 372 of file hubioctl.cpp.

377{
380}
Status
Definition: gdiplustypes.h:24
static VOID NTAPI HubIoCompleteDescriptor(_In_ WDFREQUEST Request, _In_ NTSTATUS Status, _In_ ULONG Size)
Definition: hubioctl.cpp:359
static const char HubTagUserRequest[]
Definition: hubioctl.cpp:67
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFREQUEST Request
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFDEVICE Child
Definition: wdffdo.h:536
#define WdfObjectDereferenceWithTag(Handle, Tag)
Definition: wdfobject.h:829

Referenced by DeviceMachine::FailHubDescriptorRequest(), DeviceMachine::GetDescriptorForHub(), and HubFdoDescriptorComplete().

◆ HubDeviceBytesReturned()

◆ HubDeviceDescContext()

VOID NTAPI HubDeviceDescContext ( _In_ HubChild *  Child,
_Out_ HubDescContext *  Context 
)

Validator context for a device, with its validation bits and hacks.

Definition at line 35 of file devdesc.cpp.

38{
40 Child->m_DeviceDescriptor.bcdUSB,
41 Child->Speed(),
43 Child->m_Port->m_Info.SspIsochBurstCount,
44 Child->m_ValidationBits);
45
46 /* Only names the device in the validator's debug prints */
47 Context->LogContext = Child;
48}
VOID NTAPI HubDescInitDeviceContext(_Out_ HubDescContext *Context, _In_ USHORT BcdUsb, _In_ USB_DEVICE_SPEED Speed, _In_ BOOLEAN Win8Behavior, _In_ ULONG SspIsochBurstCount, _In_opt_ PULONG Bitmap)
Definition: desccheck.cpp:91
HubQueryLocalDualRoleFeatures & Child
Definition: devdesc.cpp:459
@ UseWin8DescriptorValidation
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_ PVOID Context
Definition: kse.h:81

Referenced by DeviceMachine::AltModeStringValid(), DeviceMachine::BillboardStringValid(), DeviceMachine::BosHeaderValid(), DeviceMachine::BosValid(), DeviceMachine::ConfigDescriptorValid(), DeviceMachine::ContainerIdHeaderValid(), DeviceMachine::ContainerIdKnown(), DeviceMachine::DeviceDescriptorValid(), DeviceMachine::ExtendedConfigHeaderValid(), DeviceMachine::ExtendedConfigValid(), DeviceMachine::FirstDescriptorValid(), HubCacheString(), DeviceMachine::MsOs20SetValid(), and DeviceMachine::MsOsDescriptorValid().

◆ HubDeviceSend()

BOOLEAN NTAPI HubDeviceSend ( _In_ HubChild *  Child,
_In_reads_bytes_opt_(Length) PVOID  Buffer,
_In_ ULONG  Length,
_In_ BOOLEAN  ShortTransferOk 
)

Sends the setup packet in Child->m_Control; on FALSE the caller posts TransferFailed.

Definition at line 262 of file devreq.cpp.

267{
269
270 Status = Child->m_Control.Send(Child->m_Hub->m_RootHubTarget,
271 Child->m_UsbDevice,
273 Child,
274 Buffer,
275 Length,
276 ShortTransferOk,
277 Child->m_NeedsForwardProgress);
278 if (NT_SUCCESS(Status))
279 return TRUE;
280
281 Child->m_Control.UsbdFlags = 0;
282 DPRINT1("Device %p transfer refused 0x%lx\n", Child, Status);
283 return FALSE;
284}
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
Definition: bufpool.h:45
static EVT_WDF_REQUEST_COMPLETION_ROUTINE HubDeviceControlComplete
Definition: devreq.cpp:47
NTSTATUS Status
Definition: devreq.cpp:1163
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102

Referenced by HubDeviceTrySend(), DeviceMachine::ReadAltModeString(), and DeviceMachine::SetInterface().