ReactOS 0.4.17-dev-1371-g303d27d
ucx01000.h File Reference
#include <ntddk.h>
#include <windef.h>
#include <ntstrsafe.h>
#include <wdmguid.h>
#include <fxldr.h>
#include <wdf.h>
#include <ucxclass.h>
#include <usbbusif.h>
#include <usbdlib.h>
#include <wmistr.h>
#include <drivers/usb3/hubucx.h>
#include <drivers/usb3/usbdclient.h>
#include "ucxutil.h"
#include "crsm.h"
#include "epsm.h"
#include "hostctl.h"
#include "rhub.h"
#include "pipe.h"
#include "devobj.h"
#include "urbroute.h"
#include "clientxrb.h"
#include "clientif.h"
#include "userreq.h"
Include dependency graph for ucx01000.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define UCX_CLASS_MAJOR_VERSION   1
 
#define UCX_CLASS_MINOR_VERSION   7
 

Functions

 _IRQL_requires_ (PASSIVE_LEVEL) NTSTATUS NTAPI UcxOnClassLoad(VOID)
 Sends a synchronous IOCTL to the specified device object.
 
VOID NTAPI UcxBuildExportTable (VOID)
 
VOID NTAPI UcxInterfaceNoOp (_In_ PVOID Context)
 

Variables

WDF_CLASS_LIBRARY_INFO UcxClassLibraryInfo
 
_Outptr_ PWDF_COMPONENT_GLOBALS * ComponentGlobals
 
PFN_UCXFUNC UcxExportTable [UcxFunctionTableNumEntries]
 

Macro Definition Documentation

◆ UCX_CLASS_MAJOR_VERSION

#define UCX_CLASS_MAJOR_VERSION   1

Definition at line 43 of file ucx01000.h.

◆ UCX_CLASS_MINOR_VERSION

#define UCX_CLASS_MINOR_VERSION   7

Definition at line 44 of file ucx01000.h.

Function Documentation

◆ _IRQL_requires_()

_IRQL_requires_ ( PASSIVE_LEVEL  )

Sends a synchronous IOCTL to the specified device object.

Parameters
[in]IoControlCodeThe IOCTL to send to the device.
[in]DeviceObjectPointer to the device object that will handle the IOCTL.
[in]InputBufferOptional pointer to a buffer containing input data for the IOCTL. When specified, the buffer should be at least of InputBufferLength size.
[in]InputBufferLengthSize in bytes, of the buffer pointed by InputBuffer.
[out]OutputBufferOptional pointer to a buffer that will receive output data from the IOCTL. When specified, the buffer should be at least of OutputBufferLength size.
[in]OutputBufferLengthSize in bytes, of the buffer pointed by OutputBuffer.
[in]FileObjectOptional pointer to a file object that may be necessary for the IOCTL.
Returns
An NTSTATUS code indicating success or failure of this function.
Note
Must be called at PASSIVE_LEVEL with all APCs enabled.

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

◆ UcxBuildExportTable()

VOID NTAPI UcxBuildExportTable ( VOID  )

Definition at line 353 of file exports.cpp.

354{
356
383}
static VOID NTAPI UcxApiControllerSetFailed(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXCONTROLLER Controller)
Definition: exports.cpp:80
static VOID NTAPI UcxApiUsbDeviceInitSetEventCallbacks(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _Inout_ PUCXUSBDEVICE_INIT Init, _In_ PUCX_USBDEVICE_EVENT_CALLBACKS Callbacks)
Definition: exports.cpp:136
static _Must_inspect_result_ NTSTATUS NTAPI UcxApiUsbDeviceCreate(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXCONTROLLER Controller, _Inout_ PUCXUSBDEVICE_INIT *Init, _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes, _Out_ UCXUSBDEVICE *UsbDevice)
Definition: exports.cpp:121
static VOID NTAPI UcxApiControllerNotifyTransportCharacteristicsChange(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXCONTROLLER Controller, _In_ PUCX_CONTROLLER_TRANSPORT_CHARACTERISTICS Characteristics)
Definition: exports.cpp:341
static VOID NTAPI UcxApiEndpointPurgeComplete(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXENDPOINT Endpoint)
Definition: exports.cpp:244
static VOID NTAPI UcxApiControllerResetComplete(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXCONTROLLER Controller, _In_ PUCX_CONTROLLER_RESET_COMPLETE_INFO Info)
Definition: exports.cpp:67
static VOID NTAPI UcxApiControllerNeedsReset(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXCONTROLLER Controller)
Definition: exports.cpp:55
static _Must_inspect_result_ UCXSSTREAMS NTAPI UcxApiEndpointGetStaticStreamsReferenced(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXENDPOINT Endpoint, _In_ PVOID Tag)
Definition: exports.cpp:179
static _Must_inspect_result_ NTSTATUS NTAPI UcxApiStaticStreamsCreate(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXENDPOINT Endpoint, _Inout_ PUCXSSTREAMS_INIT *Init, _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes, _Out_ UCXSSTREAMS *StaticStreams)
Definition: exports.cpp:296
static _Must_inspect_result_ BOOLEAN NTAPI UcxApiIoDeviceControl(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ WDFDEVICE Device, _In_ WDFREQUEST Request, _In_ size_t OutputBufferLength, _In_ size_t InputBufferLength, _In_ ULONG IoControlCode)
Definition: exports.cpp:25
static VOID NTAPI UcxApiEndpointNeedToCancelTransfers(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXENDPOINT Endpoint)
Definition: exports.cpp:192
static _Must_inspect_result_ NTSTATUS NTAPI UcxApiControllerCreate(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ WDFDEVICE Device, _In_ PUCX_CONTROLLER_CONFIG Config, _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes, _Out_ UCXCONTROLLER *Controller)
Definition: exports.cpp:42
static _Must_inspect_result_ NTSTATUS NTAPI UcxApiInitializeDeviceInit(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _Inout_ PWDFDEVICE_INIT DeviceInit)
Definition: exports.cpp:313
static NTSTATUS NTAPI UcxApiControllerSetIdStrings(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXCONTROLLER Controller, _In_ PUNICODE_STRING Manufacturer, _In_ PUNICODE_STRING ModelName, _In_ PUNICODE_STRING ModelNumber)
Definition: exports.cpp:326
static _Must_inspect_result_ NTSTATUS NTAPI UcxApiRootHubCreate(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXCONTROLLER Controller, _In_ PUCX_ROOTHUB_CONFIG Config, _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes, _Out_ UCXROOTHUB *RootHub)
Definition: exports.cpp:93
PFN_UCXFUNC UcxExportTable[UcxFunctionTableNumEntries]
Definition: exports.cpp:19
static VOID NTAPI UcxApiUsbDeviceRemoteWakeNotification(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXUSBDEVICE UsbDevice, _In_ ULONG Interface)
Definition: exports.cpp:149
static VOID NTAPI UcxApiStaticStreamsSetStreamInfo(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXSSTREAMS StaticStreams, _In_ PSTREAM_INFO StreamInfo)
Definition: exports.cpp:282
static VOID NTAPI UcxApiRootHubPortChanged(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXROOTHUB RootHub)
Definition: exports.cpp:108
static _Must_inspect_result_ NTSTATUS NTAPI UcxApiEndpointCreate(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXUSBDEVICE UsbDevice, _Inout_ PUCXENDPOINT_INIT *Init, _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes, _Out_ UCXENDPOINT *Endpoint)
Definition: exports.cpp:163
static VOID NTAPI UcxApiEndpointAbortComplete(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXENDPOINT Endpoint)
Definition: exports.cpp:257
static VOID NTAPI UcxApiEndpointInitSetEventCallbacks(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _Inout_ PUCXENDPOINT_INIT Init, _In_ PUCX_ENDPOINT_EVENT_CALLBACKS Callbacks)
Definition: exports.cpp:204
static VOID NTAPI UcxApiEndpointNoPingResponseError(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXENDPOINT Endpoint)
Definition: exports.cpp:270
static VOID NTAPI UcxApiDefaultEndpointInitSetEventCallbacks(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _Inout_ PUCXENDPOINT_INIT Init, _In_ PUCX_DEFAULT_ENDPOINT_EVENT_CALLBACKS Callbacks)
Definition: exports.cpp:217
static VOID NTAPI UcxApiEndpointSetWdfIoQueue(_In_ PUCX_DRIVER_GLOBALS DriverGlobals, _In_ UCXENDPOINT Endpoint, _In_ WDFQUEUE Queue)
Definition: exports.cpp:230
ASMGENDATA Table[]
Definition: genincdata.c:61
@ UcxIoDeviceControlTableIndex
Definition: ucxfuncenum.h:13
@ UcxControllerSetIdStringsTableIndex
Definition: ucxfuncenum.h:35
@ UcxEndpointInitSetEventCallbacksTableIndex
Definition: ucxfuncenum.h:26
@ UcxEndpointPurgeCompleteTableIndex
Definition: ucxfuncenum.h:29
@ UcxStaticStreamsCreateTableIndex
Definition: ucxfuncenum.h:33
@ UcxEndpointGetStaticStreamsReferencedTableIndex
Definition: ucxfuncenum.h:24
@ UcxRootHubPortChangedTableIndex
Definition: ucxfuncenum.h:19
@ UcxEndpointSetWdfIoQueueTableIndex
Definition: ucxfuncenum.h:28
@ UcxUsbDeviceRemoteWakeNotificationTableIndex
Definition: ucxfuncenum.h:22
@ UcxUsbDeviceCreateTableIndex
Definition: ucxfuncenum.h:20
@ UcxControllerCreateTableIndex
Definition: ucxfuncenum.h:14
@ UcxStaticStreamsSetStreamInfoTableIndex
Definition: ucxfuncenum.h:32
@ UcxEndpointNeedToCancelTransfersTableIndex
Definition: ucxfuncenum.h:25
@ UcxEndpointNoPingResponseErrorTableIndex
Definition: ucxfuncenum.h:31
@ UcxControllerResetCompleteTableIndex
Definition: ucxfuncenum.h:16
@ UcxControllerSetFailedTableIndex
Definition: ucxfuncenum.h:17
@ UcxRootHubCreateTableIndex
Definition: ucxfuncenum.h:18
@ UcxDefaultEndpointInitSetEventCallbacksTableIndex
Definition: ucxfuncenum.h:27
@ UcxEndpointCreateTableIndex
Definition: ucxfuncenum.h:23
@ UcxEndpointAbortCompleteTableIndex
Definition: ucxfuncenum.h:30
@ UcxUsbDeviceInitSetEventCallbacksTableIndex
Definition: ucxfuncenum.h:21
@ UcxControllerNeedsResetTableIndex
Definition: ucxfuncenum.h:15
@ UcxInitializeDeviceInitTableIndex
Definition: ucxfuncenum.h:34
@ UcxControllerNotifyTransportCharacteristicsChangeTableIndex
Definition: ucxfuncenum.h:36
VOID(NTAPI * PFN_UCXFUNC)(VOID)
Definition: ucxglobals.h:21

Referenced by _IRQL_requires_().

◆ UcxInterfaceNoOp()

VOID NTAPI UcxInterfaceNoOp ( _In_ PVOID  Context)

Definition at line 15 of file hubinterface.cpp.

17{
19}
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_ PVOID Context
Definition: kse.h:81
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329

Referenced by _IRQL_requires_(), UcxRootHub::AddQueryInterfaces(), UcxEvtQueryStackInterface(), UcxEvtQueryUsbdiInterface(), and UcxFillParentInterface().

Variable Documentation

◆ ComponentGlobals

_In_ PWDF_COMPONENT_GLOBALS* ComponentGlobals

Definition at line 64 of file ucx01000.h.

◆ UcxClassLibraryInfo

WDF_CLASS_LIBRARY_INFO UcxClassLibraryInfo

Definition at line 46 of file ucx01000.h.

◆ UcxExportTable

PFN_UCXFUNC UcxExportTable[UcxFunctionTableNumEntries]
extern

Definition at line 19 of file exports.cpp.

Referenced by UcxBuildExportTable().