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

Go to the source code of this file.

Macros

#define NDEBUG
 
#define UCX_ROOT_HUB_ID   L"USB\\ROOT_HUB30"
 
#define UCX_HWID_FULL_CHARS   RTL_NUMBER_OF(UCX_ROOT_HUB_ID L"&VID0000&PID0000&REV0000")
 
#define UCX_HWID_SHORT_CHARS   RTL_NUMBER_OF(UCX_ROOT_HUB_ID L"&VID0000&PID0000")
 
#define UCX_HWID_PLAIN_CHARS   RTL_NUMBER_OF(UCX_ROOT_HUB_ID)
 
#define UCX_HWID_BUFFER_CHARS   ((UCX_HWID_FULL_CHARS + UCX_HWID_SHORT_CHARS + UCX_HWID_PLAIN_CHARS + 1) * sizeof(WCHAR))
 

Enumerations

enum class  UcxStackSetup { Skip , DeviceMgmtCompletion , GetInfoCompletion }
 

Functions

 DECLARE_GLOBAL_CONST_UNICODE_STRING (UcxRootHubPdoSddl, L"D:P(A;;GA;;;SY)(A;;GRGWGX;;;BA)(A;;GRGW;;;WD)(A;;GR;;;RC)")
 
static VOID NTAPI UcxBuildRootHubHardwareIds (_In_ const UCX_CONTROLLER_CONFIG *Config, _Out_writes_(BufferChars) PWCHAR Buffer, _In_ SIZE_T BufferChars, _Out_ PUNICODE_STRING Ids)
 
 _IRQL_requires_ (PASSIVE_LEVEL) static VOID NTAPI UcxRootHubCopyPciProperties(_In_ WDFDEVICE Controller
 Sends a synchronous IOCTL to the specified device object.
 
 if (!NT_SUCCESS(Status))
 
 if (Found)
 
 if (Attributes !=NULL) WdfObjectDelete(Attributes)
 
NTSTATUS NTAPI UcxEvtRootHubPrepareHardware (_In_ WDFDEVICE Device, _In_ WDFCMRESLIST ResourcesRaw, _In_ WDFCMRESLIST ResourcesTranslated)
 
NTSTATUS NTAPI UcxEvtRootHubReleaseHardware (_In_ WDFDEVICE Device, _In_ WDFCMRESLIST ResourcesTranslated)
 
NTSTATUS NTAPI UcxEvtRootHubD0Entry (_In_ WDFDEVICE Device, _In_ WDF_POWER_DEVICE_STATE PreviousState)
 
NTSTATUS NTAPI UcxEvtRootHubD0Exit (_In_ WDFDEVICE Device, _In_ WDF_POWER_DEVICE_STATE TargetState)
 
NTSTATUS NTAPI UcxEvtRootHubEnableWakeAtBus (_In_ WDFDEVICE Device, _In_ SYSTEM_POWER_STATE PowerState)
 
VOID NTAPI UcxEvtRootHubDisableWakeAtBus (_In_ WDFDEVICE Device)
 
VOID NTAPI UcxEvtRootHubPdoIoDeviceControl (_In_ WDFQUEUE Queue, _In_ WDFREQUEST Request, _In_ size_t OutputBufferLength, _In_ size_t InputBufferLength, _In_ ULONG IoControlCode)
 
static WDFQUEUE NTAPI UcxRouteHubIoctl (_In_ UcxController *Controller, _In_ ULONG IoControlCode, _Out_ UcxStackSetup *Setup)
 
static NTSTATUS NTAPI UcxCompleteIrpWithStatus (_In_ PIRP Irp, _In_ NTSTATUS Status)
 
static VOID NTAPI UcxSetCompletionRoutine (_In_ WDFDEVICE Device, _In_ PIRP Irp, _In_ PIO_COMPLETION_ROUTINE Routine, _In_ PVOID Context)
 
static NTSTATUS NTAPI UcxQueueAsyncPortReset (_In_ UcxController *Controller, _In_ PIRP Irp)
 
NTSTATUS NTAPI UcxEvtRootHubPreprocessInternalIoctl (_In_ WDFDEVICE Device, _Inout_ PIRP Irp)
 
NTSTATUS NTAPI UcxEvtRootHubPreprocessQueryInterface (_In_ WDFDEVICE Device, _Inout_ PIRP Irp)
 
NTSTATUS NTAPI UcxEvtRootHubPreprocessSetPower (_In_ WDFDEVICE Device, _Inout_ PIRP Irp)
 
static NTSTATUS NTAPI UcxDeviceMgmtCompletion (_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _In_reads_opt_(_Inexpressible_("varies")) PVOID Context)
 
static NTSTATUS NTAPI UcxRootHubGetInfoCompletion (_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _In_reads_opt_(_Inexpressible_("varies")) PVOID Context)
 

Variables

static IO_COMPLETION_ROUTINE UcxDeviceMgmtCompletion
 
static IO_COMPLETION_ROUTINE UcxRootHubGetInfoCompletion
 
static const WCHAR UcxRootHubDeviceIdText [] = UCX_ROOT_HUB_ID L"\0"
 
static const SIZE_T UcxHardwareIdSeparators []
 
static const DEVPROPKEY UcxPciKeySerialNumber
 
static const DEVPROPKEY UcxPciKeyUsb4PortAttributes
 
static const DEVPROPKEY UcxPciKeyParentSerialNumber
 
_In_ WDFDEVICE Pdo
 
WDFMEMORY Attributes = NULL
 
PVOID AttributesData = NULL
 
size_t AttributesSize = 0
 
DEVPROPTYPE AttributesType = DEVPROP_TYPE_UINT32
 
DEVPROPTYPE SerialType = DEVPROP_TYPE_EMPTY
 
ULONG64 Serial = 0
 
ULONG Required = 0
 
BOOLEAN Found = NT_SUCCESS(Status)
 
NTSTATUS Status = WdfDeviceQueryPropertyEx(Controller, &Property, sizeof(Serial), &Serial, &Required, &SerialType)
 
WDF_DEVICE_PROPERTY_DATA_INIT & Property
 
 else
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 10 of file rhubpdo.cpp.

◆ UCX_HWID_BUFFER_CHARS

Definition at line 30 of file rhubpdo.cpp.

◆ UCX_HWID_FULL_CHARS

#define UCX_HWID_FULL_CHARS   RTL_NUMBER_OF(UCX_ROOT_HUB_ID L"&VID0000&PID0000&REV0000")

Definition at line 27 of file rhubpdo.cpp.

◆ UCX_HWID_PLAIN_CHARS

#define UCX_HWID_PLAIN_CHARS   RTL_NUMBER_OF(UCX_ROOT_HUB_ID)

Definition at line 29 of file rhubpdo.cpp.

◆ UCX_HWID_SHORT_CHARS

#define UCX_HWID_SHORT_CHARS   RTL_NUMBER_OF(UCX_ROOT_HUB_ID L"&VID0000&PID0000")

Definition at line 28 of file rhubpdo.cpp.

◆ UCX_ROOT_HUB_ID

#define UCX_ROOT_HUB_ID   L"USB\\ROOT_HUB30"

Definition at line 21 of file rhubpdo.cpp.

Enumeration Type Documentation

◆ UcxStackSetup

Enumerator
Skip 
DeviceMgmtCompletion 
GetInfoCompletion 

Definition at line 588 of file rhubpdo.cpp.

Function Documentation

◆ _IRQL_requires_()

_IRQL_requires_ ( PASSIVE_LEVEL  )

Sends a synchronous IOCTL to the specified device object.

Nothing is found unless the PCI bus driver publishes the properties.

Definition at line 2121 of file class.c.

13175{
13177
13178 PAGED_CODE();
13179
13180 TracePrint((TRACE_LEVEL_VERBOSE,
13181 TRACE_FLAG_PNP,
13182 "ClassDetermineTokenOperationCommandSupport (%p): Entering function.\n",
13183 DeviceObject));
13184
13185 //
13186 // Send down Inquiry for VPD_THIRD_PARTY_COPY_PAGE and cache away the device parameters
13187 // from WINDOWS_BLOCK_DEVICE_TOKEN_LIMITS_DESCRIPTOR.
13188 //
13190
13191 if (NT_SUCCESS(status)) {
13192
13193 ULONG maxListIdentifier = MaxTokenOperationListIdentifier;
13194
13195 //
13196 // Query the maximum list identifier to use for TokenOperation commands.
13197 //
13198 if (NT_SUCCESS(ClasspGetMaximumTokenListIdentifier(DeviceObject, REG_DISK_CLASS_CONTROL, &maxListIdentifier))) {
13199 if (maxListIdentifier >= MIN_TOKEN_LIST_IDENTIFIERS) {
13200
13201 NT_ASSERT(maxListIdentifier <= MAX_TOKEN_LIST_IDENTIFIERS);
13202 MaxTokenOperationListIdentifier = maxListIdentifier;
13203 }
13204 }
13205
13206 }
13207
13208 TracePrint((TRACE_LEVEL_VERBOSE,
13209 TRACE_FLAG_PNP,
13210 "ClassDetermineTokenOperationCommandSupport (%p): Exiting function with status %x.\n",
13212 status));
13213
13214 return status;
13215}
#define PAGED_CODE()
LONG NTSTATUS
Definition: precomp.h:26
#define REG_DISK_CLASS_CONTROL
Definition: classp.h:218
#define MAX_TOKEN_LIST_IDENTIFIERS
Definition: classp.h:215
#define MIN_TOKEN_LIST_IDENTIFIERS
Definition: classp.h:214
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
ULONG MaxTokenOperationListIdentifier
Definition: class.c:107
_IRQL_requires_same_ NTSTATUS ClasspGetBlockDeviceTokenLimitsInfo(_Inout_ PDEVICE_OBJECT DeviceObject)
Definition: class.c:13220
#define STATUS_SUCCESS
Definition: shellext.h:65
#define TRACE_LEVEL_VERBOSE
Definition: storswtr.h:30
Definition: ps.c:97
uint32_t ULONG
Definition: typedefs.h:59
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2061
#define NT_ASSERT
Definition: rtlfuncs.h:3334

◆ DECLARE_GLOBAL_CONST_UNICODE_STRING()

DECLARE_GLOBAL_CONST_UNICODE_STRING ( UcxRootHubPdoSddl  ,
L"D:P(A;;GA;;;SY)(A;;GRGWGX;;;BA)(A;;GRGW;;;WD)(A;;GR;;;RC)"   
)

◆ if() [1/3]

if ( !  NT_SUCCESSStatus)

Definition at line 342 of file rhubpdo.cpp.

343 {
345 Status = WdfDeviceQueryPropertyEx(Controller, &Property, sizeof(Serial), &Serial, &Required, &SerialType);
346 }
Status
Definition: gdiplustypes.h:24
DEVPROPTYPE SerialType
Definition: rhubpdo.cpp:334
ULONG64 Serial
Definition: rhubpdo.cpp:335
ULONG Required
Definition: rhubpdo.cpp:336
static const DEVPROPKEY UcxPciKeyParentSerialNumber
Definition: rhubpdo.cpp:317
_Must_inspect_result_ _In_ WDFDEVICE _In_ PUCX_CONTROLLER_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ UCXCONTROLLER * Controller
FORCEINLINE VOID WDF_DEVICE_PROPERTY_DATA_INIT(_Out_ PWDF_DEVICE_PROPERTY_DATA PropertyData, _In_ const DEVPROPKEY *PropertyKey)
Definition: wdfdevice.h:1941

◆ if() [2/3]

if ( Attributes !  = NULL)

Definition at line 86 of file fxdmaenablerapi.cpp.

86 {
88 Attributes->ParentObject,
90 (PVOID*)&pParent);
91
93 FxDeviceBase * pSearchDevice;
94
95 //
96 // If a parent object is passed-in it must be descendent of device.
97 // DmaEnabler stores device and uses it during dispose
98 // (to remove it from dmaenabler list maintained at device level),
99 // so DmaEnabler cannot outlive device.
100 //
101
103
104 if (pSearchDevice == NULL) {
106
109 "Attributes->ParentObject 0x%p must have WDFDEVICE as an "
110 "eventual ancestor, %!STATUS!",
111 Attributes->ParentObject, status);
112
113 return status;
114 }
115 else if (pSearchDevice != pDevice) {
117
120 "Attributes->ParentObject 0x%p ancestor is WDFDEVICE %p, but "
121 "not the same WDFDEVICE 0x%p passed to WdfDmaEnablerCreate, "
122 "%!STATUS!",
123 Attributes->ParentObject, pSearchDevice->GetHandle(),
124 Device, status);
125
126 return status;
127 }
128 }
129 else {
130 //
131 // For < 1.11 drivers we only allow pDevice to be the parent
132 // since that is what we were blindly setting the parent to.
133 //
134 // Using the passed-in parent for such drivers could cause
135 // side-effects such as earlier deletion of DmaEnabler object. So
136 // we don't do that.
137 //
138 // We cause this verifier breakpoint to warn downlevel drivers
139 // that the parent they passed in gets ignored.
140 //
141 if (pParent != pDevice) {
144 "For drivers bound to version <= 1.9 "
145 "WdfDmaEnablerCreate uses WDFDEVICE as the "
146 "parent object for the dma enabler object. "
147 "Attributes->ParentObject 0x%p, which is different from "
148 "WDFDEVICE 0x%p, gets ignored. Please note that DmaEnabler "
149 "would be disposed only when device is disposed.",
150 Attributes->ParentObject, Device);
151
154 }
155 }
156
158 }
159 }
static FxDeviceBase * _SearchForDevice(__in FxObject *Object, __out_opt IFxHasCallbacks **Callbacks)
WDFDEVICE __inline GetHandle(VOID)
Definition: fxdevice.hpp:237
#define TRACINGDMA
Definition: dbgtrace.h:71
_In_ ULONG Attributes
Definition: dispmprt.h:1077
#define NULL
Definition: types.h:112
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
FxVerifierDbgBreakPoint(pFxDriverGlobals)
FxDeviceBase * pDevice
FxObject * pParent
NTSTATUS status
FxObjectHandleGetPtr(GetFxDriverGlobals(DriverGlobals), DmaEnabler, FX_TYPE_DMA_ENABLER,(PVOID *) &pDmaEnabler)
PFX_DRIVER_GLOBALS pFxDriverGlobals
@ FX_TYPE_OBJECT
Definition: fxtypes.h:45
_Must_inspect_result_ _In_ PUCXHUB_DEVICE_CREATE_INFO _Out_ UCXUSBDEVICE * Device
Definition: hubucx.h:258
#define TRACE_LEVEL_WARNING
Definition: storswtr.h:28
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
_Must_inspect_result_ BOOLEAN IsVersionGreaterThanOrEqualTo(__in ULONG Major, __in ULONG Minor)
Definition: globalskm.cpp:92
__inline _Must_inspect_result_ BOOLEAN IsDownlevelVerificationEnabled()
Definition: fxglobals.h:314
#define STATUS_WDF_OBJECT_ATTRIBUTES_INVALID
Definition: wdfstatus.h:171

◆ if() [3/3]

if ( Found  )

Definition at line 349 of file rhubpdo.cpp.

350 {
352 Status = WdfDeviceAllocAndQueryPropertyEx(Controller,
353 &Property,
354 PagedPool,
356 &Attributes,
358 if (NT_SUCCESS(Status))
359 {
360 AttributesData = WdfMemoryGetBuffer(Attributes, &AttributesSize);
361 }
362 else
363 {
364 /* QUIRK: the serial number is dropped as well */
365 DPRINT1("Controller %p USB4 port attributes query failed 0x%lx\n", Controller, Status);
367 Found = FALSE;
368 }
369 }
#define DPRINT1
Definition: precomp.h:8
#define FALSE
Definition: types.h:117
#define PagedPool
Definition: env_spec_w32.h:308
size_t AttributesSize
Definition: rhubpdo.cpp:332
PVOID AttributesData
Definition: rhubpdo.cpp:331
BOOLEAN Found
Definition: rhubpdo.cpp:337
static const DEVPROPKEY UcxPciKeyUsb4PortAttributes
Definition: rhubpdo.cpp:315
DEVPROPTYPE AttributesType
Definition: rhubpdo.cpp:333
#define WDF_NO_OBJECT_ATTRIBUTES
Definition: wdftypes.h:105

◆ UcxBuildRootHubHardwareIds()

static VOID NTAPI UcxBuildRootHubHardwareIds ( _In_ const UCX_CONTROLLER_CONFIG *  Config,
_Out_writes_(BufferChars) PWCHAR  Buffer,
_In_ SIZE_T  BufferChars,
_Out_ PUNICODE_STRING  Ids 
)
static

Most specific ID first, ending with the plain root hub ID.

Definition at line 44 of file rhubpdo.cpp.

49{
50 const UCX_CONTROLLER_PCI_INFORMATION* Pci = &Config->PciDeviceInfo;
51 const UCX_CONTROLLER_ACPI_INFORMATION* Acpi = &Config->AcpiDeviceInfo;
53
54 if (Config->ParentBusType != UcxControllerParentBusTypePci &&
55 Config->ParentBusType != UcxControllerParentBusTypeAcpi)
56 {
58 Ids->Length = sizeof(UcxRootHubDeviceIdText) - sizeof(WCHAR);
59 Ids->MaximumLength = sizeof(UcxRootHubDeviceIdText);
60 return;
61 }
62
63 RtlInitEmptyUnicodeString(Ids, Buffer, (USHORT)(BufferChars * sizeof(WCHAR)));
64
65 /* A truncated result is used as is */
66 if (Config->ParentBusType == UcxControllerParentBusTypePci)
67 {
69 UCX_ROOT_HUB_ID L"&VID%04X&PID%04X&REV%04X#" UCX_ROOT_HUB_ID L"&VID%04X&PID%04X#" UCX_ROOT_HUB_ID L"#",
70 Pci->VendorId, Pci->DeviceId, Pci->RevisionId,
71 Pci->VendorId, Pci->DeviceId);
72 }
73 else
74 {
76 UCX_ROOT_HUB_ID L"&VID%S&PID%S&REV%S#" UCX_ROOT_HUB_ID L"&VID%S&PID%S#" UCX_ROOT_HUB_ID L"#",
77 Acpi->VendorId, Acpi->DeviceId, Acpi->RevisionId,
78 Acpi->VendorId, Acpi->DeviceId);
79 }
80
83}
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
RtlInitEmptyUnicodeString(SymbolicLinkName, NULL, 0)
Definition: bufpool.h:45
#define L(x)
Definition: resources.c:13
_In_ const HubIdStrings * Ids
return RtlUnicodeStringPrintf(Name, L"uxd_port_%03u", PortNumber)
WCHAR * PWCH
Definition: ntbasedef.h:422
#define UNICODE_NULL
short WCHAR
Definition: pedump.c:58
unsigned short USHORT
Definition: pedump.c:61
static const SIZE_T UcxHardwareIdSeparators[]
Definition: rhubpdo.cpp:33
#define UCX_ROOT_HUB_ID
Definition: rhubpdo.cpp:21
static const WCHAR UcxRootHubDeviceIdText[]
Definition: rhubpdo.cpp:24
CHAR DeviceId[MAX_DEVICE_ID_STRING_LENGTH]
Definition: ucxcontroller.h:51
CHAR RevisionId[MAX_REVISION_ID_STRING_LENGTH]
Definition: ucxcontroller.h:52
CHAR VendorId[MAX_VENDOR_ID_STRING_LENGTH]
Definition: ucxcontroller.h:50
@ UcxControllerParentBusTypePci
Definition: ucxcontroller.h:17
@ UcxControllerParentBusTypeAcpi
Definition: ucxcontroller.h:18
_Must_inspect_result_ _In_ WDFDEVICE _In_ PUCX_CONTROLLER_CONFIG Config
_In_ WDFCOLLECTION _In_ ULONG Index

Referenced by UcxRootHub::CreatePdo().

◆ UcxCompleteIrpWithStatus()

static NTSTATUS NTAPI UcxCompleteIrpWithStatus ( _In_ PIRP  Irp,
_In_ NTSTATUS  Status 
)
static

Definition at line 656 of file rhubpdo.cpp.

659{
660 Irp->IoStatus.Status = Status;
661 Irp->IoStatus.Information = 0;
663 return Status;
664}
_In_ PIRP Irp
Definition: kse.h:79
#define IoCompleteRequest
Definition: irp.c:1272
NTSTATUS Status
Definition: rhubpdo.cpp:338
#define IO_NO_INCREMENT
Definition: iotypes.h:598

Referenced by UcxEvtRootHubPreprocessInternalIoctl(), and UcxQueueAsyncPortReset().

◆ UcxDeviceMgmtCompletion()

static NTSTATUS NTAPI UcxDeviceMgmtCompletion ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_ PIRP  Irp,
_In_reads_opt_(_Inexpressible_("varies")) PVOID  Context 
)
static

Definition at line 820 of file rhubpdo.cpp.

824{
826 PVOID Payload = Stack->Parameters.Others.Argument1;
828
831
832 if (Irp->PendingReturned)
834
835 switch (Stack->Parameters.DeviceIoControl.IoControlCode)
836 {
839 return Device->OnHcdEndpointsConfigureDone(Irp, (PENDPOINTS_CONFIGURE)Payload);
840
843 return Device->OnHcdEnableDone(Irp, (PUSBDEVICE_ENABLE)Payload);
844
847 if (Device->m_ResetFailedByControllerReset)
848 {
849 Device->m_ResetFailedByControllerReset = FALSE;
851 }
852 return Device->OnHcdResetDone(Irp, (PUSBDEVICE_RESET)Payload);
853
855 Device = UcxUsbDevice::FromHandle(((PENDPOINT_RESET)Payload)->Header.UsbDevice);
856 if (Device->m_EndpointResetFailedByControllerReset)
857 {
858 Device->m_EndpointResetFailedByControllerReset = FALSE;
860 }
862
863 default:
865 }
866}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
Definition: Header.h:9
static UcxEndpoint * FromHandle(_In_ UCXENDPOINT Handle)
Definition: pipe.cpp:91
NTSTATUS OnHcdResetDone(_In_ PIRP Irp)
Definition: pipeio.cpp:25
static UcxUsbDevice * FromHandle(_In_ UCXUSBDEVICE Handle)
Definition: devobj.cpp:18
#define IOCTL_UCXHUB_DEVICE_ENABLE
Definition: hubucx.h:53
#define IOCTL_UCXHUB_ENDPOINT_RESET
Definition: hubucx.h:63
#define IOCTL_UCXHUB_DEVICE_RESET
Definition: hubucx.h:54
_In_ UCXHUB_DEVICE_CONTEXT _In_ UCXENDPOINT Endpoint
Definition: hubucx.h:238
#define IOCTL_UCXHUB_ENDPOINTS_CONFIGURE
Definition: hubucx.h:61
IoMarkIrpPending(Irp)
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_ PVOID Context
Definition: kse.h:81
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
Definition: wdfrequest.h:639
#define STATUS_CONTINUE_COMPLETION

◆ UcxEvtRootHubD0Entry()

NTSTATUS NTAPI UcxEvtRootHubD0Entry ( _In_ WDFDEVICE  Device,
_In_ WDF_POWER_DEVICE_STATE  PreviousState 
)

Definition at line 476 of file rhubpdo.cpp.

479{
480 UcxRootHubPdoContext* Context = UcxGetRootHubPdoContext(Device);
481 UcxInterruptQueueState* State = Context->RootHub->m_InterruptState;
482
484
485 DPRINT("Root hub PDO %p D0 entry, previous WDF state %d\n", Device, PreviousState);
486
487 {
488 SpinLockGuard Guard(&State->PortChangeLock);
489
490 State->IndicateWakeEnabled = FALSE;
491 }
492
493 /* A port change may still be inside WdfDeviceIndicateWakeStatus */
494 KeWaitForSingleObject(&State->NoIndicateWakeInProgress, Executive, KernelMode, FALSE, NULL);
495
496 Context->Controller->PostResetEvent(CrEvent::RootHubPoweredUp);
497 Context->Controller->m_RootHubInD0 = TRUE;
498
499 return STATUS_SUCCESS;
500}
@ RootHubPoweredUp
#define TRUE
Definition: types.h:120
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
Definition: env_spec_w32.h:478
#define KernelMode
Definition: asm.h:38
#define DPRINT
Definition: sndvol32.h:73
_In_ WDF_POWER_DEVICE_STATE PreviousState
Definition: wdfdevice.h:829
@ Executive
Definition: ketypes.h:467

◆ UcxEvtRootHubD0Exit()

NTSTATUS NTAPI UcxEvtRootHubD0Exit ( _In_ WDFDEVICE  Device,
_In_ WDF_POWER_DEVICE_STATE  TargetState 
)

Definition at line 504 of file rhubpdo.cpp.

507{
508 UcxRootHubPdoContext* Context = UcxGetRootHubPdoContext(Device);
509 UcxController* Controller = Context->Controller;
510 UcxRootHub* RootHub = Context->RootHub;
511 UcxInterruptQueueState* State = RootHub->m_InterruptState;
512 BOOLEAN WakeNow = FALSE;
513
515
516 DPRINT("Root hub PDO %p D0 exit, target WDF state %d\n", Device, TargetState);
517
518 /* Waits out any reset recovery that still needs the root hub */
521 Controller->m_RootHubInD0 = FALSE;
522
523 {
524 SpinLockGuard Guard(&State->PortChangeLock);
525
526 /* The hub may have dropped its last transfer; make the next one reach the HCD */
527 if (!State->LastTransferCanceled)
528 State->PortChangeGeneration++;
529
530 /* S0 idle: changes from now on must wake the root hub */
531 if (RootHub->m_SystemPowerAction == PowerActionNone)
532 {
533 State->IndicateWakeEnabled = TRUE;
534 WakeNow = (State->PortChangeGeneration != State->PortChangeGenerationProcessed);
535 }
536 }
537
538 if (WakeNow)
539 WdfDeviceIndicateWakeStatus(Device, STATUS_SUCCESS);
540
541 return STATUS_SUCCESS;
542}
unsigned char BOOLEAN
Definition: actypes.h:127
@ RootHubPoweringDown
@ PowerActionNone
Definition: ntpoapi.h:123
_Must_inspect_result_ _In_ UCXCONTROLLER _In_ PUCX_ROOTHUB_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ UCXROOTHUB * RootHub
Definition: ucxroothub.h:299
_In_ WDF_POWER_DEVICE_STATE TargetState
Definition: wdfdevice.h:859

◆ UcxEvtRootHubDisableWakeAtBus()

VOID NTAPI UcxEvtRootHubDisableWakeAtBus ( _In_ WDFDEVICE  Device)

Definition at line 564 of file rhubpdo.cpp.

566{
568}

◆ UcxEvtRootHubEnableWakeAtBus()

NTSTATUS NTAPI UcxEvtRootHubEnableWakeAtBus ( _In_ WDFDEVICE  Device,
_In_ SYSTEM_POWER_STATE  PowerState 
)

Definition at line 546 of file rhubpdo.cpp.

549{
551
552 if (UcxGetRootHubPdoContext(Device)->Controller->IsResetInProgress())
553 {
554 DPRINT1("Root hub PDO %p wake arm failed, controller reset in progress\n", Device);
556 }
557
558 DPRINT("Root hub PDO %p wake armed\n", Device);
559 return STATUS_SUCCESS;
560}
#define STATUS_NO_SUCH_DEVICE
Definition: udferr_usr.h:136
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ WDF_DEVICE_POWER_STATE PowerState
Definition: wdfdevice.h:3040

◆ UcxEvtRootHubPdoIoDeviceControl()

VOID NTAPI UcxEvtRootHubPdoIoDeviceControl ( _In_ WDFQUEUE  Queue,
_In_ WDFREQUEST  Request,
_In_ size_t  OutputBufferLength,
_In_ size_t  InputBufferLength,
_In_ ULONG  IoControlCode 
)

Definition at line 572 of file rhubpdo.cpp.

578{
582 DPRINT1("Root hub PDO user IOCTL 0x%lx not supported\n", IoControlCode);
583 WdfRequestComplete(Request, STATUS_INVALID_DEVICE_REQUEST);
584}
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
_In_ PGUID _In_ ULONG OutputBufferLength
Definition: ucxcontroller.h:81
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFREQUEST Request
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2231

◆ UcxEvtRootHubPrepareHardware()

NTSTATUS NTAPI UcxEvtRootHubPrepareHardware ( _In_ WDFDEVICE  Device,
_In_ WDFCMRESLIST  ResourcesRaw,
_In_ WDFCMRESLIST  ResourcesTranslated 
)

Definition at line 398 of file rhubpdo.cpp.

402{
403 UcxRootHubPdoContext* Context = UcxGetRootHubPdoContext(Device);
404 UcxRootHub* RootHub = Context->RootHub;
406 WDFSTRING Name;
408
411
413 Attributes.ParentObject = Device;
414
415 Status = WdfStringCreate(NULL, &Attributes, &Name);
416 if (!NT_SUCCESS(Status))
417 {
418 DPRINT1("Root hub PDO %p interface string create failed 0x%lx\n", Device, Status);
419 return Status;
420 }
421
422 Status = WdfDeviceRetrieveDeviceInterfaceString(Device, &GUID_DEVINTERFACE_USB_HUB, NULL, Name);
423 if (!NT_SUCCESS(Status))
424 {
425 DPRINT1("Root hub PDO %p hub interface name query failed 0x%lx\n", Device, Status);
427 return Status;
428 }
429
430 /* Controller errata are known by now */
431 Context->Controller->m_ClearTtBufferOnAsyncCancel = Context->Controller->QueryClearTtBufferOnCancel();
432
433 {
434 SpinLockGuard Guard(&RootHub->m_PdoInfoLock);
435
436 RootHub->m_PdoStarted = TRUE;
437 RootHub->m_SymbolicName = Name;
438 }
439
440 UcxRootHubCopyPciProperties(Context->Controller->m_Fdo, Device);
441
442 /* Unknown until the first S IRP, as USBPORT reports it */
443 RootHub->m_LastSystemSleepState = PowerSystemUnspecified;
444 DPRINT("Root hub PDO %p prepared\n", Device);
445 return STATUS_SUCCESS;
446}
LPWSTR Name
Definition: desk.c:124
@ PowerSystemUnspecified
Definition: ntpoapi.h:35
WDFMEMORY Attributes
Definition: rhubpdo.cpp:330
WdfObjectDelete(String)
_In_ WDFCMRESLIST _In_ WDFCMRESLIST ResourcesTranslated
Definition: wdfdevice.h:891
_In_ WDFCMRESLIST ResourcesRaw
Definition: wdfdevice.h:888
FORCEINLINE VOID WDF_OBJECT_ATTRIBUTES_INIT(_Out_ PWDF_OBJECT_ATTRIBUTES Attributes)
Definition: wdfobject.h:147

◆ UcxEvtRootHubPreprocessInternalIoctl()

NTSTATUS NTAPI UcxEvtRootHubPreprocessInternalIoctl ( _In_ WDFDEVICE  Device,
_Inout_ PIRP  Irp 
)

Definition at line 721 of file rhubpdo.cpp.

724{
725 UcxController* Controller = UcxGetRootHubPdoContext(Device)->Controller;
728 WDFQUEUE Queue;
729
732
735
737 if (Queue == NULL)
738 {
739 DPRINT1("Root hub PDO internal IOCTL 0x%lx not supported, IRP %p\n", Code, Irp);
741 }
742
743 switch (Setup)
744 {
748 break;
749
753 break;
754
755 default:
757 break;
758 }
759
760 return WdfDeviceWdmDispatchIrpToIoQueue(Device, Irp, Queue, WDF_DISPATCH_IRP_TO_IO_QUEUE_PREPROCESSED_IRP);
761}
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE ACPI_HANDLE ACPI_HANDLE *OutHandle ACPI_HANDLE *OutHandle void *Context void *Context ACPI_EVENT_HANDLER Handler UINT32 UINT32 ACPI_GPE_HANDLER void *Context UINT32 ACPI_NOTIFY_HANDLER void *Context ACPI_ADR_SPACE_TYPE ACPI_ADR_SPACE_HANDLER ACPI_ADR_SPACE_SETUP Setup
Definition: acpixf.h:834
NTSTATUS NTAPI UcxProcessSubmitUrb(_In_ WDFDEVICE RootHubPdo, _In_ PIRP Irp)
Definition: clientxrb.cpp:169
#define STATUS_NOT_SUPPORTED
Definition: d3dkmdt.h:48
#define IOCTL_UCXHUB_RESET_PORT_ASYNC
Definition: hubucx.h:78
#define IoSkipCurrentIrpStackLocation(Irp)
Definition: ntifs_ex.h:421
#define IoCopyCurrentIrpStackLocationToNext(Irp)
Definition: ntifs_ex.h:413
static VOID NTAPI UcxSetCompletionRoutine(_In_ WDFDEVICE Device, _In_ PIRP Irp, _In_ PIO_COMPLETION_ROUTINE Routine, _In_ PVOID Context)
Definition: rhubpdo.cpp:670
UcxStackSetup
Definition: rhubpdo.cpp:589
static NTSTATUS NTAPI UcxQueueAsyncPortReset(_In_ UcxController *Controller, _In_ PIRP Irp)
Definition: rhubpdo.cpp:692
static WDFQUEUE NTAPI UcxRouteHubIoctl(_In_ UcxController *Controller, _In_ ULONG IoControlCode, _Out_ UcxStackSetup *Setup)
Definition: rhubpdo.cpp:599
static IO_COMPLETION_ROUTINE UcxRootHubGetInfoCompletion
Definition: rhubpdo.cpp:19
static IO_COMPLETION_ROUTINE UcxDeviceMgmtCompletion
Definition: rhubpdo.cpp:18
static NTSTATUS NTAPI UcxCompleteIrpWithStatus(_In_ PIRP Irp, _In_ NTSTATUS Status)
Definition: rhubpdo.cpp:656
union _IO_STACK_LOCATION::@1823 Parameters
struct _IO_STACK_LOCATION::@1823::@1824 DeviceIoControl
#define IOCTL_INTERNAL_USB_SUBMIT_URB
Definition: usbioctl.h:32
@ WDF_DISPATCH_IRP_TO_IO_QUEUE_PREPROCESSED_IRP
Definition: wdfdevice.h:437
_In_ UCHAR _In_ UCHAR _In_ ULONG Code
Definition: wdfdevice.h:1707

◆ UcxEvtRootHubPreprocessQueryInterface()

NTSTATUS NTAPI UcxEvtRootHubPreprocessQueryInterface ( _In_ WDFDEVICE  Device,
_Inout_ PIRP  Irp 
)

Definition at line 766 of file rhubpdo.cpp.

769{
771 const GUID* Type = Stack->Parameters.QueryInterface.InterfaceType;
772
773 if (IsEqualGUID(*Type, USB_BUS_INTERFACE_USBDI_GUID) ||
774 IsEqualGUID(*Type, GUID_UCXHUB_PARENT_INTERFACE) ||
775 IsEqualGUID(*Type, GUID_UCXHUB_STACK_INTERFACE))
776 {
777 Stack->Parameters.QueryInterface.Interface->Size = Stack->Parameters.QueryInterface.Size;
778 Stack->Parameters.QueryInterface.Interface->Version = Stack->Parameters.QueryInterface.Version;
779 }
780
783}
Type
Definition: Type.h:7
WdfDeviceWdmDispatchPreprocessedIrp(Device, Irp)
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147

◆ UcxEvtRootHubPreprocessSetPower()

NTSTATUS NTAPI UcxEvtRootHubPreprocessSetPower ( _In_ WDFDEVICE  Device,
_Inout_ PIRP  Irp 
)

Definition at line 788 of file rhubpdo.cpp.

791{
793 UcxRootHub* RootHub = UcxGetRootHubPdoContext(Device)->RootHub;
795
796 if (Stack->Parameters.Power.Type == SystemPowerState)
797 {
798 Target = (SYSTEM_POWER_STATE)Stack->Parameters.Power.SystemPowerStateContext.TargetSystemState;
799
801 {
802 RootHub->m_LastSystemSleepState = Target;
803 RootHub->m_SystemPowerAction = Stack->Parameters.Power.ShutdownType;
804 }
805 else
806 {
807 RootHub->m_SystemPowerAction = PowerActionNone;
808 }
809 }
810
813}
if(dx< 0)
Definition: linetemp.h:194
@ PowerSystemWorking
Definition: ntpoapi.h:36
enum _SYSTEM_POWER_STATE SYSTEM_POWER_STATE
_In_ WDFIOTARGET Target
Definition: wdfrequest.h:306
_In_ SYSTEM_POWER_STATE SystemPowerState
Definition: iotypes.h:7535

◆ UcxEvtRootHubReleaseHardware()

NTSTATUS NTAPI UcxEvtRootHubReleaseHardware ( _In_ WDFDEVICE  Device,
_In_ WDFCMRESLIST  ResourcesTranslated 
)

Definition at line 450 of file rhubpdo.cpp.

453{
454 UcxRootHub* RootHub = UcxGetRootHubPdoContext(Device)->RootHub;
455 WDFSTRING Name;
456
458
459 {
460 SpinLockGuard Guard(&RootHub->m_PdoInfoLock);
461
462 RootHub->m_PdoStarted = FALSE;
463 Name = RootHub->m_SymbolicName;
464 RootHub->m_SymbolicName = NULL;
465 }
466
467 if (Name != NULL)
469
470 DPRINT("Root hub PDO %p released\n", Device);
471 return STATUS_SUCCESS;
472}

◆ UcxQueueAsyncPortReset()

static NTSTATUS NTAPI UcxQueueAsyncPortReset ( _In_ UcxController *  Controller,
_In_ PIRP  Irp 
)
static

Definition at line 692 of file rhubpdo.cpp.

695{
696 if (Controller->m_Config.EvtControllerReset == NULL)
697 {
698 DPRINT1("Controller %p has no reset callback, failing async port reset\n", Controller);
700 }
701
702 if (Controller->HasFailed())
703 {
704 DPRINT1("Controller %p has failed, refusing async port reset\n", Controller);
706 }
707
708 DPRINT("Controller %p async port reset requested by hub\n", Controller);
709
711
712 NT_ASSERT(Controller->m_RootHub->m_PendingAsyncReset == NULL);
713 Controller->m_RootHub->m_PendingAsyncReset = Irp;
714
715 Controller->PostResetEvent(CrEvent::HubRequestsReset);
716 return STATUS_PENDING;
717}
@ HubRequestsReset
#define STATUS_PENDING
Definition: telnetd.h:14
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132

Referenced by UcxEvtRootHubPreprocessInternalIoctl().

◆ UcxRootHubGetInfoCompletion()

static NTSTATUS NTAPI UcxRootHubGetInfoCompletion ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_ PIRP  Irp,
_In_reads_opt_(_Inexpressible_("varies")) PVOID  Context 
)
static

Definition at line 872 of file rhubpdo.cpp.

876{
878 ULONG Code = Stack->Parameters.DeviceIoControl.IoControlCode;
881
883
884 if (Irp->PendingReturned)
886
887 if (!NT_SUCCESS(Irp->IoStatus.Status))
888 {
889 DPRINT1("Root hub PDO %p IOCTL 0x%lx failed by HCD 0x%lx\n",
890 Context, Code, Irp->IoStatus.Status);
892 }
893
896
897 Info = (PUCXHUB_ROOTHUB_INFO)Stack->Parameters.Others.Argument1;
898 RootHub = UcxGetRootHubPdoContext((WDFDEVICE)Context)->RootHub;
899
900 Info->Info.Size = sizeof(*Info);
901 RootHub->m_NumberOf20Ports = Info->Info.NumberOf20Ports;
902 RootHub->m_NumberOf30Ports = Info->Info.NumberOf30Ports;
903
904 DPRINT("Root hub %p has %lu USB 2 and %lu USB 3 ports\n",
905 RootHub, (ULONG)Info->Info.NumberOf20Ports, (ULONG)Info->Info.NumberOf30Ports);
906
908}
#define IOCTL_UCXHUB_ROOTHUB_GET_INFO
Definition: hubucx.h:50
struct _UCXHUB_ROOTHUB_INFO * PUCXHUB_ROOTHUB_INFO
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690

◆ UcxRouteHubIoctl()

static WDFQUEUE NTAPI UcxRouteHubIoctl ( _In_ UcxController *  Controller,
_In_ ULONG  IoControlCode,
_Out_ UcxStackSetup *  Setup 
)
static

The controller queue a hub IOCTL goes to, or NULL when the root hub does not serve it.

Definition at line 599 of file rhubpdo.cpp.

603{
605
606 switch (IoControlCode)
607 {
613 return Controller->m_DeviceMgmtQueue;
614
623 return Controller->m_DeviceMgmtQueue;
624
626 return Controller->m_TreePurgeQueue;
627
629 return Controller->m_Address0Queue;
630
631 /* The port info IOCTLs get the completion routine only so HCD failures print */
636 return Controller->m_DefaultQueue;
637
646 return Controller->m_DefaultQueue;
647
648 default:
649 return NULL;
650 }
651}
#define IOCTL_UCXHUB_DEVICE_ADDRESS
Definition: hubucx.h:55
#define IOCTL_UCXHUB_ROOTHUB_GET_20PORT_INFO
Definition: hubucx.h:51
#define IOCTL_UCXHUB_ROOTHUB_GET_30PORT_INFO
Definition: hubucx.h:52
#define IOCTL_UCXHUB_ADDRESS0_OWNERSHIP_ACQUIRE
Definition: hubucx.h:49
#define IOCTL_UCXHUB_DEVICE_TREE_PURGE_IO
Definition: hubucx.h:67
#define IOCTL_UCXHUB_DEVICE_START_IO
Definition: hubucx.h:60
#define IOCTL_UCXHUB_FREE_DUMP_DATA
Definition: hubucx.h:74
#define IOCTL_UCXHUB_DEVICE_UPDATE
Definition: hubucx.h:56
#define IOCTL_UCXHUB_DEVICE_DISABLE
Definition: hubucx.h:58
#define IOCTL_UCXHUB_DEVICE_HUB_INFO
Definition: hubucx.h:57
#define IOCTL_UCXHUB_DEFAULT_ENDPOINT_UPDATE
Definition: hubucx.h:62
#define IOCTL_UCXHUB_QUERY_USB_CAPABILITY
Definition: hubucx.h:65
#define IOCTL_UCXHUB_SET_FUNCTION_HANDLE_DATA
Definition: hubucx.h:66
#define IOCTL_UCXHUB_GET_DUMP_DATA
Definition: hubucx.h:72
#define IOCTL_UCXHUB_NOTIFY_FORWARD_PROGRESS
Definition: hubucx.h:69
#define IOCTL_UCXHUB_DEVICE_PURGE_IO
Definition: hubucx.h:59
#define IOCTL_UCXHUB_DEVICE_ABORT_IO
Definition: hubucx.h:68
#define IOCTL_INTERNAL_USB_REGISTER_COMPOSITE_DEVICE
Definition: usbioctl.h:760
#define IOCTL_INTERNAL_USB_REQUEST_REMOTE_WAKE_NOTIFICATION
Definition: usbioctl.h:766
#define IOCTL_INTERNAL_USB_UNREGISTER_COMPOSITE_DEVICE
Definition: usbioctl.h:763

Referenced by UcxEvtRootHubPreprocessInternalIoctl().

◆ UcxSetCompletionRoutine()

static VOID NTAPI UcxSetCompletionRoutine ( _In_ WDFDEVICE  Device,
_In_ PIRP  Irp,
_In_ PIO_COMPLETION_ROUTINE  Routine,
_In_ PVOID  Context 
)
static

Keeps ucx01000 loaded until the routine ran when the system allows it.

Definition at line 670 of file rhubpdo.cpp.

675{
677
678 Status = IoSetCompletionRoutineEx(WdfDeviceWdmGetDeviceObject(Device),
679 Irp,
680 Routine,
681 Context,
682 TRUE,
683 TRUE,
684 TRUE);
685 if (!NT_SUCCESS(Status))
687}
NTSTATUS NTAPI IoSetCompletionRoutineEx(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PIO_COMPLETION_ROUTINE CompletionRoutine, IN PVOID Context, IN BOOLEAN InvokeOnSuccess, IN BOOLEAN InvokeOnError, IN BOOLEAN InvokeOnCancel)
Definition: iocomp.c:220
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
Definition: irp.cpp:490

Referenced by UcxEvtRootHubPreprocessInternalIoctl().

Variable Documentation

◆ Attributes

WDFMEMORY Attributes = NULL

Definition at line 330 of file rhubpdo.cpp.

Referenced by UcxEvtRootHubPrepareHardware().

◆ AttributesData

PVOID AttributesData = NULL

Definition at line 331 of file rhubpdo.cpp.

Referenced by if().

◆ AttributesSize

size_t AttributesSize = 0

Definition at line 332 of file rhubpdo.cpp.

Referenced by if().

◆ AttributesType

DEVPROPTYPE AttributesType = DEVPROP_TYPE_UINT32

Definition at line 333 of file rhubpdo.cpp.

Referenced by if().

◆ else

else
Initial value:
{
static const DEVPROPKEY UcxPciKeySerialNumber
Definition: rhubpdo.cpp:313

Definition at line 377 of file rhubpdo.cpp.

◆ Found

Found = NT_SUCCESS(Status)

Definition at line 337 of file rhubpdo.cpp.

Referenced by if().

◆ Pdo

Pdo
Initial value:

Definition at line 327 of file rhubpdo.cpp.

◆ Property

Definition at line 340 of file rhubpdo.cpp.

◆ Required

◆ Serial

◆ SerialType

Definition at line 334 of file rhubpdo.cpp.

Referenced by if().

◆ Status

◆ UcxDeviceMgmtCompletion

IO_COMPLETION_ROUTINE UcxDeviceMgmtCompletion
static

Definition at line 18 of file rhubpdo.cpp.

Referenced by UcxEvtRootHubPreprocessInternalIoctl().

◆ UcxHardwareIdSeparators

const SIZE_T UcxHardwareIdSeparators[]
static
Initial value:
=
{
}
#define UCX_HWID_SHORT_CHARS
Definition: rhubpdo.cpp:28
#define UCX_HWID_FULL_CHARS
Definition: rhubpdo.cpp:27
#define UCX_HWID_PLAIN_CHARS
Definition: rhubpdo.cpp:29

Definition at line 33 of file rhubpdo.cpp.

Referenced by UcxBuildRootHubHardwareIds().

◆ UcxPciKeyParentSerialNumber

const DEVPROPKEY UcxPciKeyParentSerialNumber
static
Initial value:
=
{ { 0x3ab22e31, 0x8264, 0x4b4e, { 0x9a, 0xf5, 0xa8, 0xd2, 0xd8, 0xe3, 0x3e, 0x62 } }, 45 }

Definition at line 317 of file rhubpdo.cpp.

Referenced by if().

◆ UcxPciKeySerialNumber

const DEVPROPKEY UcxPciKeySerialNumber
static
Initial value:
=
{ { 0x3ab22e31, 0x8264, 0x4b4e, { 0x9a, 0xf5, 0xa8, 0xd2, 0xd8, 0xe3, 0x3e, 0x62 } }, 40 }

Definition at line 313 of file rhubpdo.cpp.

◆ UcxPciKeyUsb4PortAttributes

const DEVPROPKEY UcxPciKeyUsb4PortAttributes
static
Initial value:
=
{ { 0x3ab22e31, 0x8264, 0x4b4e, { 0x9a, 0xf5, 0xa8, 0xd2, 0xd8, 0xe3, 0x3e, 0x62 } }, 42 }

Definition at line 315 of file rhubpdo.cpp.

Referenced by if().

◆ UcxRootHubDeviceIdText

const WCHAR UcxRootHubDeviceIdText[] = UCX_ROOT_HUB_ID L"\0"
static

Definition at line 24 of file rhubpdo.cpp.

Referenced by UcxBuildRootHubHardwareIds().

◆ UcxRootHubGetInfoCompletion

IO_COMPLETION_ROUTINE UcxRootHubGetInfoCompletion
static

Definition at line 19 of file rhubpdo.cpp.

Referenced by UcxEvtRootHubPreprocessInternalIoctl().