ReactOS 0.4.17-dev-1037-g720d112
usbxhci.h File Reference
#include <ntddk.h>
#include <wdf.h>
#include <ucxclass.h>
#include <ucxstub.h>
Include dependency graph for usbxhci.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _XHCI_CONTROLLER
 
struct  _XHCI_UCX_CONTROLLER_CONTEXT
 

Macros

#define XHCI_POOL_TAG   'ichX'
 

Typedefs

typedef struct _XHCI_CONTROLLER XHCI_CONTROLLER
 
typedef struct _XHCI_CONTROLLER * PXHCI_CONTROLLER
 
typedef struct _XHCI_UCX_CONTROLLER_CONTEXT XHCI_UCX_CONTROLLER_CONTEXT
 
typedef struct _XHCI_UCX_CONTROLLER_CONTEXT * PXHCI_UCX_CONTROLLER_CONTEXT
 

Functions

 WDF_DECLARE_CONTEXT_TYPE_WITH_NAME (XHCI_CONTROLLER, XhciGetController)
 
 WDF_DECLARE_CONTEXT_TYPE_WITH_NAME (XHCI_UCX_CONTROLLER_CONTEXT, XhciGetUcxControllerContext)
 
 _IRQL_requires_ (PASSIVE_LEVEL) NTSTATUS NTAPI XhciRootHubCreate(_In_ PXHCI_CONTROLLER Controller)
 Sends a synchronous IOCTL to the specified device object.
 

Variables

DRIVER_INITIALIZE DriverEntry
 
EVT_WDF_DRIVER_UNLOAD XhciEvtDriverUnload
 
EVT_WDF_DRIVER_DEVICE_ADD XhciEvtDeviceAdd
 
EVT_WDF_DEVICE_PREPARE_HARDWARE XhciEvtDevicePrepareHardware
 
EVT_WDF_DEVICE_RELEASE_HARDWARE XhciEvtDeviceReleaseHardware
 
EVT_WDF_DEVICE_D0_ENTRY XhciEvtDeviceD0Entry
 
EVT_WDF_DEVICE_D0_EXIT XhciEvtDeviceD0Exit
 
EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL XhciEvtIoDeviceControl
 
EVT_UCX_CONTROLLER_QUERY_USB_CAPABILITY XhciEvtControllerQueryUsbCapability
 
EVT_UCX_CONTROLLER_GET_CURRENT_FRAMENUMBER XhciEvtControllerGetCurrentFrameNumber
 
EVT_UCX_CONTROLLER_RESET XhciEvtControllerReset
 
EVT_UCX_ROOTHUB_CONTROL_URB XhciEvtRootHubClearHubFeature
 
EVT_UCX_ROOTHUB_CONTROL_URB XhciEvtRootHubClearPortFeature
 
EVT_UCX_ROOTHUB_CONTROL_URB XhciEvtRootHubGetHubStatus
 
EVT_UCX_ROOTHUB_CONTROL_URB XhciEvtRootHubGetPortStatus
 
EVT_UCX_ROOTHUB_CONTROL_URB XhciEvtRootHubSetHubFeature
 
EVT_UCX_ROOTHUB_CONTROL_URB XhciEvtRootHubSetPortFeature
 
EVT_UCX_ROOTHUB_CONTROL_URB XhciEvtRootHubGetPortErrorCount
 
EVT_UCX_ROOTHUB_INTERRUPT_TX XhciEvtRootHubInterruptTx
 
EVT_UCX_ROOTHUB_GET_INFO XhciEvtRootHubGetInfo
 
EVT_UCX_ROOTHUB_GET_20PORT_INFO XhciEvtRootHubGet20PortInfo
 
EVT_UCX_ROOTHUB_GET_30PORT_INFO XhciEvtRootHubGet30PortInfo
 
EVT_UCX_CONTROLLER_USBDEVICE_ADD XhciEvtControllerUsbDeviceAdd
 
EVT_UCX_USBDEVICE_ENDPOINTS_CONFIGURE XhciEvtUsbDeviceEndpointsConfigure
 
EVT_UCX_USBDEVICE_ENABLE XhciEvtUsbDeviceEnable
 
EVT_UCX_USBDEVICE_DISABLE XhciEvtUsbDeviceDisable
 
EVT_UCX_USBDEVICE_RESET XhciEvtUsbDeviceReset
 
EVT_UCX_USBDEVICE_ADDRESS XhciEvtUsbDeviceAddress
 
EVT_UCX_USBDEVICE_UPDATE XhciEvtUsbDeviceUpdate
 
EVT_UCX_USBDEVICE_HUB_INFO XhciEvtUsbDeviceHubInfo
 
EVT_UCX_USBDEVICE_DEFAULT_ENDPOINT_ADD XhciEvtUsbDeviceDefaultEndpointAdd
 
EVT_UCX_USBDEVICE_ENDPOINT_ADD XhciEvtUsbDeviceEndpointAdd
 

Macro Definition Documentation

◆ XHCI_POOL_TAG

#define XHCI_POOL_TAG   'ichX'

Definition at line 15 of file usbxhci.h.

Typedef Documentation

◆ PXHCI_CONTROLLER

◆ PXHCI_UCX_CONTROLLER_CONTEXT

◆ XHCI_CONTROLLER

◆ XHCI_UCX_CONTROLLER_CONTEXT

Lets UCX callbacks get from their controller handle back to the device.

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.

Lets UCX hook the controller device init. Call before WdfDeviceCreate.

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.

Lets UCX hook the controller device init. Call before WdfDeviceCreate.

Definition at line 13147 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

◆ WDF_DECLARE_CONTEXT_TYPE_WITH_NAME() [1/2]

WDF_DECLARE_CONTEXT_TYPE_WITH_NAME ( XHCI_CONTROLLER  ,
XhciGetController   
)

◆ WDF_DECLARE_CONTEXT_TYPE_WITH_NAME() [2/2]

WDF_DECLARE_CONTEXT_TYPE_WITH_NAME ( XHCI_UCX_CONTROLLER_CONTEXT  ,
XhciGetUcxControllerContext   
)

Variable Documentation

◆ DriverEntry

DRIVER_INITIALIZE DriverEntry

Definition at line 35 of file usbxhci.h.

◆ XhciEvtControllerGetCurrentFrameNumber

EVT_UCX_CONTROLLER_GET_CURRENT_FRAMENUMBER XhciEvtControllerGetCurrentFrameNumber

Definition at line 46 of file usbxhci.h.

Referenced by _IRQL_requires_().

◆ XhciEvtControllerQueryUsbCapability

EVT_UCX_CONTROLLER_QUERY_USB_CAPABILITY XhciEvtControllerQueryUsbCapability

Definition at line 45 of file usbxhci.h.

Referenced by _IRQL_requires_().

◆ XhciEvtControllerReset

EVT_UCX_CONTROLLER_RESET XhciEvtControllerReset

Definition at line 47 of file usbxhci.h.

Referenced by _IRQL_requires_().

◆ XhciEvtControllerUsbDeviceAdd

EVT_UCX_CONTROLLER_USBDEVICE_ADD XhciEvtControllerUsbDeviceAdd

Definition at line 70 of file usbxhci.h.

Referenced by _IRQL_requires_().

◆ XhciEvtDeviceAdd

EVT_WDF_DRIVER_DEVICE_ADD XhciEvtDeviceAdd

Definition at line 39 of file usbxhci.h.

Referenced by DriverEntry().

◆ XhciEvtDeviceD0Entry

EVT_WDF_DEVICE_D0_ENTRY XhciEvtDeviceD0Entry

Definition at line 42 of file usbxhci.h.

Referenced by XhciEvtDeviceAdd().

◆ XhciEvtDeviceD0Exit

EVT_WDF_DEVICE_D0_EXIT XhciEvtDeviceD0Exit

Definition at line 43 of file usbxhci.h.

Referenced by XhciEvtDeviceAdd().

◆ XhciEvtDevicePrepareHardware

EVT_WDF_DEVICE_PREPARE_HARDWARE XhciEvtDevicePrepareHardware

Definition at line 40 of file usbxhci.h.

Referenced by XhciEvtDeviceAdd().

◆ XhciEvtDeviceReleaseHardware

EVT_WDF_DEVICE_RELEASE_HARDWARE XhciEvtDeviceReleaseHardware

Definition at line 41 of file usbxhci.h.

Referenced by XhciEvtDeviceAdd().

◆ XhciEvtDriverUnload

EVT_WDF_DRIVER_UNLOAD XhciEvtDriverUnload

Definition at line 36 of file usbxhci.h.

Referenced by DriverEntry().

◆ XhciEvtIoDeviceControl

EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL XhciEvtIoDeviceControl

Definition at line 44 of file usbxhci.h.

Referenced by XhciEvtDeviceAdd().

◆ XhciEvtRootHubClearHubFeature

EVT_UCX_ROOTHUB_CONTROL_URB XhciEvtRootHubClearHubFeature

Definition at line 57 of file usbxhci.h.

Referenced by _IRQL_requires_().

◆ XhciEvtRootHubClearPortFeature

EVT_UCX_ROOTHUB_CONTROL_URB XhciEvtRootHubClearPortFeature

Definition at line 58 of file usbxhci.h.

Referenced by _IRQL_requires_().

◆ XhciEvtRootHubGet20PortInfo

EVT_UCX_ROOTHUB_GET_20PORT_INFO XhciEvtRootHubGet20PortInfo

Definition at line 66 of file usbxhci.h.

Referenced by _IRQL_requires_().

◆ XhciEvtRootHubGet30PortInfo

EVT_UCX_ROOTHUB_GET_30PORT_INFO XhciEvtRootHubGet30PortInfo

Definition at line 67 of file usbxhci.h.

Referenced by _IRQL_requires_().

◆ XhciEvtRootHubGetHubStatus

EVT_UCX_ROOTHUB_CONTROL_URB XhciEvtRootHubGetHubStatus

Definition at line 59 of file usbxhci.h.

Referenced by _IRQL_requires_().

◆ XhciEvtRootHubGetInfo

EVT_UCX_ROOTHUB_GET_INFO XhciEvtRootHubGetInfo

Definition at line 65 of file usbxhci.h.

Referenced by _IRQL_requires_().

◆ XhciEvtRootHubGetPortErrorCount

EVT_UCX_ROOTHUB_CONTROL_URB XhciEvtRootHubGetPortErrorCount

Definition at line 63 of file usbxhci.h.

Referenced by _IRQL_requires_().

◆ XhciEvtRootHubGetPortStatus

EVT_UCX_ROOTHUB_CONTROL_URB XhciEvtRootHubGetPortStatus

Definition at line 60 of file usbxhci.h.

Referenced by _IRQL_requires_().

◆ XhciEvtRootHubInterruptTx

EVT_UCX_ROOTHUB_INTERRUPT_TX XhciEvtRootHubInterruptTx

Definition at line 64 of file usbxhci.h.

Referenced by _IRQL_requires_().

◆ XhciEvtRootHubSetHubFeature

EVT_UCX_ROOTHUB_CONTROL_URB XhciEvtRootHubSetHubFeature

Definition at line 61 of file usbxhci.h.

Referenced by _IRQL_requires_().

◆ XhciEvtRootHubSetPortFeature

EVT_UCX_ROOTHUB_CONTROL_URB XhciEvtRootHubSetPortFeature

Definition at line 62 of file usbxhci.h.

Referenced by _IRQL_requires_().

◆ XhciEvtUsbDeviceAddress

EVT_UCX_USBDEVICE_ADDRESS XhciEvtUsbDeviceAddress

Definition at line 75 of file usbxhci.h.

Referenced by XhciEvtControllerUsbDeviceAdd().

◆ XhciEvtUsbDeviceDefaultEndpointAdd

EVT_UCX_USBDEVICE_DEFAULT_ENDPOINT_ADD XhciEvtUsbDeviceDefaultEndpointAdd

Definition at line 78 of file usbxhci.h.

Referenced by XhciEvtControllerUsbDeviceAdd().

◆ XhciEvtUsbDeviceDisable

EVT_UCX_USBDEVICE_DISABLE XhciEvtUsbDeviceDisable

Definition at line 73 of file usbxhci.h.

Referenced by XhciEvtControllerUsbDeviceAdd().

◆ XhciEvtUsbDeviceEnable

EVT_UCX_USBDEVICE_ENABLE XhciEvtUsbDeviceEnable

Definition at line 72 of file usbxhci.h.

Referenced by XhciEvtControllerUsbDeviceAdd().

◆ XhciEvtUsbDeviceEndpointAdd

EVT_UCX_USBDEVICE_ENDPOINT_ADD XhciEvtUsbDeviceEndpointAdd

Definition at line 79 of file usbxhci.h.

Referenced by XhciEvtControllerUsbDeviceAdd().

◆ XhciEvtUsbDeviceEndpointsConfigure

EVT_UCX_USBDEVICE_ENDPOINTS_CONFIGURE XhciEvtUsbDeviceEndpointsConfigure

Definition at line 71 of file usbxhci.h.

Referenced by XhciEvtControllerUsbDeviceAdd().

◆ XhciEvtUsbDeviceHubInfo

EVT_UCX_USBDEVICE_HUB_INFO XhciEvtUsbDeviceHubInfo

Definition at line 77 of file usbxhci.h.

Referenced by XhciEvtControllerUsbDeviceAdd().

◆ XhciEvtUsbDeviceReset

EVT_UCX_USBDEVICE_RESET XhciEvtUsbDeviceReset

Definition at line 74 of file usbxhci.h.

Referenced by XhciEvtControllerUsbDeviceAdd().

◆ XhciEvtUsbDeviceUpdate

EVT_UCX_USBDEVICE_UPDATE XhciEvtUsbDeviceUpdate

Definition at line 76 of file usbxhci.h.

Referenced by XhciEvtControllerUsbDeviceAdd().