23#define PCI_INTERFACE_USB_ID_UHCI 0x00
24#define PCI_INTERFACE_USB_ID_OHCI 0x10
25#define PCI_INTERFACE_USB_ID_EHCI 0x20
26#define PCI_INTERFACE_USB_ID_XHCI 0x30
28#ifdef USBD_TRANSFER_DIRECTION
29#undef USBD_TRANSFER_DIRECTION
30#define USBD_TRANSFER_DIRECTION 0x00000001
33#define USBPORT_RECIPIENT_HUB BMREQUEST_TO_DEVICE
34#define USBPORT_RECIPIENT_PORT BMREQUEST_TO_OTHER
36#define INVALIDATE_ENDPOINT_ONLY 0
37#define INVALIDATE_ENDPOINT_WORKER_THREAD 1
38#define INVALIDATE_ENDPOINT_WORKER_DPC 2
39#define INVALIDATE_ENDPOINT_INT_NEXT_SOF 3
41#define USBPORT_DMA_DIRECTION_FROM_DEVICE 1
42#define USBPORT_DMA_DIRECTION_TO_DEVICE 2
44#define USB_PORT_TAG 'pbsu'
45#define URB_FUNCTION_MAX 0x31
48#define FEATURE_PORT_CONNECTION 0
49#define FEATURE_PORT_ENABLE 1
50#define FEATURE_PORT_SUSPEND 2
51#define FEATURE_PORT_OVER_CURRENT 3
52#define FEATURE_PORT_RESET 4
53#define FEATURE_PORT_POWER 8
54#define FEATURE_PORT_LOW_SPEED 9
55#define FEATURE_C_PORT_CONNECTION 16
56#define FEATURE_C_PORT_ENABLE 17
57#define FEATURE_C_PORT_SUSPEND 18
58#define FEATURE_C_PORT_OVER_CURRENT 19
59#define FEATURE_C_PORT_RESET 20
62#define FEATURE_C_HUB_LOCAL_POWER 0
63#define FEATURE_C_HUB_OVER_CURRENT 1
66#define USBPORT_FLAG_INT_CONNECTED 0x00000001
67#define USBPORT_FLAG_HC_STARTED 0x00000002
68#define USBPORT_FLAG_HC_POLLING 0x00000004
69#define USBPORT_FLAG_WORKER_THREAD_ON 0x00000008
70#define USBPORT_FLAG_WORKER_THREAD_EXIT 0x00000010
71#define USBPORT_FLAG_HC_SUSPEND 0x00000100
72#define USBPORT_FLAG_INTERRUPT_ENABLED 0x00000400
73#define USBPORT_FLAG_SELECTIVE_SUSPEND 0x00000800
74#define USBPORT_FLAG_DOS_SYMBOLIC_NAME 0x00010000
75#define USBPORT_FLAG_LEGACY_SUPPORT 0x00080000
76#define USBPORT_FLAG_HC_WAKE_SUPPORT 0x00200000
77#define USBPORT_FLAG_DIAGNOSTIC_MODE 0x00800000
78#define USBPORT_FLAG_COMPANION_HC 0x01000000
79#define USBPORT_FLAG_REGISTERED_FDO 0x02000000
80#define USBPORT_FLAG_NO_HACTION 0x04000000
81#define USBPORT_FLAG_BIOS_DISABLE_SS 0x08000000
82#define USBPORT_FLAG_PWR_AND_CHIRP_LOCK 0x10000000
83#define USBPORT_FLAG_POWER_AND_CHIRP_OK 0x40000000
84#define USBPORT_FLAG_RH_INIT_CALLBACK 0x80000000
87#define USBPORT_PNP_STATE_NOT_INIT 0x00000001
88#define USBPORT_PNP_STATE_STARTED 0x00000002
89#define USBPORT_PNP_STATE_FAILED 0x00000004
90#define USBPORT_PNP_STATE_STOPPED 0x00000008
93#define USBPORT_TMFLAG_TIMER_QUEUED 0x00000001
94#define USBPORT_TMFLAG_HC_SUSPENDED 0x00000002
95#define USBPORT_TMFLAG_HC_RESUME 0x00000004
96#define USBPORT_TMFLAG_RH_SUSPENDED 0x00000008
97#define USBPORT_TMFLAG_TIMER_STARTED 0x00000010
98#define USBPORT_TMFLAG_WAKE 0x00000020
99#define USBPORT_TMFLAG_IDLE_QUEUEITEM_ON 0x00000040
102#define USBPORT_MPFLAG_INTERRUPTS_ENABLED 0x00000001
103#define USBPORT_MPFLAG_SUSPENDED 0x00000002
106#define DEVICE_HANDLE_FLAG_ROOTHUB 0x00000002
107#define DEVICE_HANDLE_FLAG_REMOVED 0x00000008
108#define DEVICE_HANDLE_FLAG_USB2HUB 0x00000010
111#define ENDPOINT_FLAG_DMA_TYPE 0x00000001
112#define ENDPOINT_FLAG_ROOTHUB_EP0 0x00000002
113#define ENDPOINT_FLAG_NUKE 0x00000008
114#define ENDPOINT_FLAG_QUEUENE_EMPTY 0x00000010
115#define ENDPOINT_FLAG_ABORTING 0x00000020
116#define ENDPOINT_FLAG_IDLE 0x00000100
117#define ENDPOINT_FLAG_OPENED 0x00000200
118#define ENDPOINT_FLAG_CLOSED 0x00000400
121#define USBD_FLAG_ALLOCATED_MDL 0x00000002
122#define USBD_FLAG_NOT_ISO_TRANSFER 0x00000010
123#define USBD_FLAG_ALLOCATED_TRANSFER 0x00000020
126#define PIPE_HANDLE_FLAG_CLOSED 0x00000001
127#define PIPE_HANDLE_FLAG_NULL_PACKET_SIZE 0x00000002
130#define TRANSFER_FLAG_CANCELED 0x00000001
131#define TRANSFER_FLAG_DMA_MAPPED 0x00000002
132#define TRANSFER_FLAG_HIGH_SPEED 0x00000004
133#define TRANSFER_FLAG_SUBMITED 0x00000008
134#define TRANSFER_FLAG_ABORTED 0x00000010
135#define TRANSFER_FLAG_ISO 0x00000020
136#define TRANSFER_FLAG_DEVICE_GONE 0x00000080
137#define TRANSFER_FLAG_SPLITED 0x00000100
138#define TRANSFER_FLAG_COMPLETED 0x00000200
139#define TRANSFER_FLAG_PARENT 0x00000400
452#define USB2_FRAMES 32
453#define USB2_MICROFRAMES 8
454#define USB2_MAX_MICROFRAMES (USB2_FRAMES * USB2_MICROFRAMES)
455#define USB2_PREV_MICROFRAME 0xFF
457#define USB2_MAX_MICROFRAME_ALLOCATION 7000
458#define USB2_CONTROLLER_DELAY 100
459#define USB2_FS_MAX_PERIODIC_ALLOCATION 1157
460#define USB2_FS_SOF_TIME 6
461#define USB2_HUB_DELAY 30
462#define USB2_MAX_FS_LS_TRANSACTIONS_IN_UFRAME 16
463#define USB2_FS_RAW_BYTES_IN_MICROFRAME 188
466#define USB2_LS_INTERRUPT_OVERHEAD 117
467#define USB2_FS_INTERRUPT_OVERHEAD 13
468#define USB2_HS_INTERRUPT_OUT_OVERHEAD 45
469#define USB2_HS_INTERRUPT_IN_OVERHEAD 25
470#define USB2_FS_ISOCHRONOUS_OVERHEAD 9
471#define USB2_HS_ISOCHRONOUS_OUT_OVERHEAD 38
472#define USB2_HS_ISOCHRONOUS_IN_OVERHEAD 18
474#define USB2_HS_SS_INTERRUPT_OUT_OVERHEAD 58
475#define USB2_HS_CS_INTERRUPT_OUT_OVERHEAD 36
476#define USB2_HS_SS_INTERRUPT_IN_OVERHEAD 39
477#define USB2_HS_CS_INTERRUPT_IN_OVERHEAD 38
479#define USB2_HS_SS_ISOCHRONOUS_OUT_OVERHEAD 58
480#define USB2_HS_SS_ISOCHRONOUS_IN_OVERHEAD 39
481#define USB2_HS_CS_ISOCHRONOUS_IN_OVERHEAD 38
483#define USB2_BIT_STUFFING_OVERHEAD (8 * (7/6))
546#define USB2_TT_EXTENSION_FLAG_DELETED 1
761 PVOID MiniPortExtension,
762 PVOID FailedAssertion,
1284 PVOID MiniPortExtension);
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 LineNumber
_In_opt_ PIRP _In_opt_ PVOID PeekContext
static const WCHAR Message[]
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
_Outptr_ PUSB_DEVICE_HANDLE * NewDeviceHandle
_Inout_ PUSB_DEVICE_HANDLE OldDeviceHandle
_Outptr_ PUSB_DEVICE_HANDLE _In_ PUSB_DEVICE_HANDLE HubDeviceHandle
_Inout_ PUSB_DEVICE_HANDLE DeviceHandle
RH_INIT_CALLBACK * PRH_INIT_CALLBACK
_Outptr_ PUSB_DEVICE_HANDLE _In_ PUSB_DEVICE_HANDLE _In_ USHORT PortStatus
_In_ PUSB_DEVICE_HANDLE _In_ ULONG TtCount
static PLARGE_INTEGER Time
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
_Out_ _Inout_ POEM_STRING DestinationString
_In_ ULONG _In_ ULONG _In_ ULONG Length
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
const KSDEVICE_DESCRIPTOR DeviceDescriptor
PUSB2_TT_ENDPOINT IntEndpoint
PUSB2_TT_ENDPOINT IsoEndpoint
PUSB2_TT_ENDPOINT AltEndpoint
ULONG TimeUsed[USB2_FRAMES][USB2_MICROFRAMES]
PUSB2_TT_ENDPOINT RebalanceEndpoint[USB2_FRAMES - 2]
USB2_TT_ENDPOINT_PARAMS TtEndpointParams
PUSBPORT_ENDPOINT Endpoint
struct _USB2_TT_ENDPOINT * NextTtEndpoint
USB2_TT_ENDPOINT_NUMS Nums
PDEVICE_OBJECT RootHubPdo
ULONG Bandwidth[USB2_FRAMES]
USB2_TT_ENDPOINT IsoEndpoint[USB2_FRAMES]
ULONG TimeCS[USB2_FRAMES][USB2_MICROFRAMES]
PUSB2_HC_EXTENSION HcExtension
USB2_FRAME_BUDGET FrameBudget[USB2_FRAMES]
ULONG NumStartSplits[USB2_FRAMES][USB2_MICROFRAMES]
USB2_TT_ENDPOINT IntEndpoint[USB2_FRAMES]
ASYNC_TIMER_CALLBACK * CallbackFunction
DEVICE_POWER_STATE DevicePowerState
UNICODE_STRING SymbolicLinkName
PDEVICE_OBJECT LowerPdoDevice
PDEVICE_OBJECT LowerDevice
PDEVICE_OBJECT SelfDevice
PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor
LIST_ENTRY InterfaceHandleList
LIST_ENTRY EpStateChangeList
LONG BadRequestLockCounter
KSPIN_LOCK DeviceHandleSpinLock
USBPORT_COMMON_DEVICE_EXTENSION CommonExtension
KTIMER TimerSoftInterrupt
DEVICE_CAPABILITIES Capabilities
KSPIN_LOCK IdleIoCsqSpinLock
KSPIN_LOCK PowerWakeSpinLock
KSPIN_LOCK MiniportSpinLock
KSPIN_LOCK SetPowerD0SpinLock
KSPIN_LOCK EpStateChangeSpinLock
KSPIN_LOCK WorkerThreadEventSpinLock
LIST_ENTRY DoneTransferList
PUSBPORT_MINIPORT_INTERFACE MiniPortInterface
KSPIN_LOCK RootHubCallbackSpinLock
PUSBPORT_COMMON_BUFFER_HEADER MiniPortCommonBuffer
USBPORT_RESOURCES UsbPortResources
KSPIN_LOCK DoneTransferSpinLock
LONG IsrDpcHandlerCounter
LIST_ENTRY DeviceHandleList
KSPIN_LOCK EndpointListSpinLock
KSPIN_LOCK FlushTransferSpinLock
ULONG UsbAddressBitMap[4]
HANDLE WorkerThreadHandle
BUS_INTERFACE_STANDARD BusInterface
PUSB2_HC_EXTENSION Usb2Extension
KSPIN_LOCK BadRequestIoCsqSpinLock
LIST_ENTRY EndpointClosedList
KSPIN_LOCK FlushPendingTransferSpinLock
KSEMAPHORE DeviceSemaphore
LIST_ENTRY ControllerLink
KSPIN_LOCK MiniportInterruptsSpinLock
UNICODE_STRING DosDeviceSymbolicName
KSPIN_LOCK MapTransferSpinLock
LIST_ENTRY MapTransferList
KSPIN_LOCK EndpointClosedSpinLock
LIST_ENTRY BadRequestList
PDEVICE_OBJECT RootHubPdo
PUSBPORT_IRP_TABLE ActiveIrpTable
PKINTERRUPT InterruptObject
KSEMAPHORE ControllerSemaphore
PUSBPORT_IRP_TABLE PendingIrpTable
KSPIN_LOCK TimerFlagsSpinLock
PUSB2_TT_EXTENSION TtExtension
USB_DEVICE_DESCRIPTOR DeviceDescriptor
USBPORT_PIPE_HANDLE PipeHandle
LIST_ENTRY PipeHandleList
LIST_ENTRY DeviceHandleLink
PUSBPORT_CONFIGURATION_HANDLE ConfigHandle
struct _USBPORT_DEVICE_HANDLE * HubDeviceHandle
LIST_ENTRY FlushControllerLink
PUSBPORT_DEVICE_HANDLE DeviceHandle
KSPIN_LOCK StateChangeSpinLock
LIST_ENTRY StateChangeLink
KIRQL EndpointStateOldIrql
LIST_ENTRY PendingTransferList
LIST_ENTRY FlushAbortLink
KSPIN_LOCK EndpointSpinLock
PUSB2_TT_ENDPOINT TtEndpoint
PUSB2_TT_EXTENSION TtExtension
USBPORT_ENDPOINT_PROPERTIES EndpointProperties
PUSBPORT_COMMON_BUFFER_HEADER HeaderBuffer
USBPORT_PIPE_HANDLE PipeHandle[1]
USB_INTERFACE_DESCRIPTOR InterfaceDescriptor
struct _USBPORT_IRP_TABLE * LinkNextTable
USB_ENDPOINT_DESCRIPTOR EndpointDescriptor
PUSBPORT_ENDPOINT Endpoint
USBPORT_COMMON_DEVICE_EXTENSION CommonExtension
PRH_INIT_CALLBACK RootHubInitCallback
DEVICE_CAPABILITIES Capabilities
PUSBPORT_ENDPOINT Endpoint
PUSBPORT_RH_DESCRIPTORS RootHubDescriptors
USBPORT_DEVICE_HANDLE DeviceHandle
USB_DEVICE_DESCRIPTOR DeviceDescriptor
USB_HUB_DESCRIPTOR Descriptor
USB_CONFIGURATION_DESCRIPTOR ConfigDescriptor
USB_ENDPOINT_DESCRIPTOR EndPointDescriptor
USB_INTERFACE_DESCRIPTOR InterfaceDescriptor
SIZE_T PortTransferLength
ULONG CompletedTransferLen
PUSBPORT_ISO_BLOCK IsoBlockPtr
ULONG NumberOfMapRegisters
KSPIN_LOCK TransferSpinLock
struct _USBPORT_TRANSFER * ParentTransfer
LIST_ENTRY SplitTransfersList
USBPORT_TRANSFER_PARAMETERS TransferParameters
PUSBPORT_ENDPOINT Endpoint
SIZE_T FullTransferLength
USBPORT_SCATTER_GATHER_LIST SgList
VOID NTAPI USBPORT_DoneSplitTransfer(IN PUSBPORT_TRANSFER SplitTransfer)
NTSTATUS NTAPI USBPORT_RemoveDevice(IN PDEVICE_OBJECT FdoDevice, IN OUT PUSBPORT_DEVICE_HANDLE DeviceHandle, IN ULONG Flags)
NTSTATUS NTAPI USBPORT_FdoInternalDeviceControl(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
struct _USB2_TT_ENDPOINT * PUSB2_TT_ENDPOINT
USBD_STATUS NTAPI USBPORT_AllocateTransfer(IN PDEVICE_OBJECT FdoDevice, IN PURB Urb, IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PIRP Irp, IN PRKEVENT Event)
VOID NTAPI USBPORT_AbortEndpoint(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint, IN PIRP Irp)
struct _USBPORT_PIPE_HANDLE USBPORT_PIPE_HANDLE
VOID NTAPI USBPORT_CancelActiveTransferIrp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
BOOLEAN NTAPI USBPORT_QueueDoneTransfer(IN PUSBPORT_TRANSFER Transfer, IN USBD_STATUS USBDStatus)
NTSTATUS NTAPI USBPORT_GetRegistryKeyValueFullInfo(IN PDEVICE_OBJECT FdoDevice, IN PDEVICE_OBJECT PdoDevice, IN BOOL UseDriverKey, IN PCWSTR SourceString, IN ULONG LengthStr, IN PVOID Buffer, IN ULONG NumberOfBytes)
VOID NTAPI USBPORT_TransferFlushDpc(IN PRKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
struct _USBPORT_IRP_TABLE * PUSBPORT_IRP_TABLE
VOID NTAPI USBPORT_ReleaseIdleLock(IN PIO_CSQ Csq, IN KIRQL Irql)
VOID NTAPI USBPORT_DumpingEndpointProperties(IN PUSBPORT_ENDPOINT_PROPERTIES EndpointProperties)
BOOLEAN NTAPI USBPORT_ValidateDeviceHandle(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_DEVICE_HANDLE DeviceHandle)
struct _USB2_TT_EXTENSION USB2_TT_EXTENSION
struct _USBPORT_CONFIGURATION_HANDLE USBPORT_CONFIGURATION_HANDLE
VOID NTAPI USBPORT_DoSetPowerD0(IN PDEVICE_OBJECT FdoDevice)
KSPIN_LOCK USBPORT_SpinLock
VOID NTAPI USBPORT_DoneTransfer(IN PUSBPORT_TRANSFER Transfer)
VOID NTAPI USBPORT_InsertIrpInTable(IN PUSBPORT_IRP_TABLE IrpTable, IN PIRP Irp)
struct _USBPORT_ENDPOINT * PUSBPORT_ENDPOINT
VOID NTAPI USBPORT_DumpingSetupPacket(IN PUSB_DEFAULT_PIPE_SETUP_PACKET SetupPacket)
VOID NTAPI USBPORT_DumpingDeviceDescriptor(IN PUSB_DEVICE_DESCRIPTOR DeviceDescriptor)
struct _USBPORT_TRANSFER * PUSBPORT_TRANSFER
BOOLEAN NTAPI USBPORT_EndpointWorker(IN PUSBPORT_ENDPOINT Endpoint, IN BOOLEAN Flag)
VOID NTAPI USBPORT_CancelSplitTransfer(IN PUSBPORT_TRANSFER SplitTransfer)
struct _USB2_FRAME_BUDGET * PUSB2_FRAME_BUDGET
VOID NTAPI USBPORT_HcWakeDpc(IN PRKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
VOID NTAPI USBPORT_DumpingURB(IN PURB Urb)
BOOLEAN NTAPI USBPORT_AllocateBandwidthUSB2(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint)
VOID NTAPI USB2_InitController(IN PUSB2_HC_EXTENSION HcExtension)
union _USB2_TT_ENDPOINT_PARAMS USB2_TT_ENDPOINT_PARAMS
NTSTATUS NTAPI USBPORT_FdoPower(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
struct _USBPORT_COMMON_DEVICE_EXTENSION USBPORT_COMMON_DEVICE_EXTENSION
struct _USBPORT_DEVICE_HANDLE * PUSBPORT_DEVICE_HANDLE
ULONG NTAPI USBPORT_LogEntry(IN PVOID MiniPortExtension, IN ULONG DriverTag, IN ULONG EnumTag, IN ULONG P1, IN ULONG P2, IN ULONG P3)
VOID NTAPI USBPORT_DumpingConfiguration(IN PUSB_CONFIGURATION_DESCRIPTOR ConfigDescriptor)
VOID NTAPI USB2_InitTT(IN PUSB2_HC_EXTENSION HcExtension, IN PUSB2_TT Tt)
NTSTATUS NTAPI USBPORT_PdoPower(IN PDEVICE_OBJECT PdoDevice, IN PIRP Irp)
VOID NTAPI USBPORT_DumpingTtEndpoint(IN PUSB2_TT_ENDPOINT TtEndpoint)
VOID NTAPI USBPORT_AdjustDeviceCapabilities(IN PDEVICE_OBJECT FdoDevice, IN PDEVICE_OBJECT PdoDevice)
VOID NTAPI USBPORT_AddUSB2Fdo(IN PDEVICE_OBJECT FdoDevice)
ULONG NTAPI USBPORT_InvalidateRootHub(PVOID MiniPortExtension)
VOID NTAPI USBPORT_AddUSB1Fdo(IN PDEVICE_OBJECT FdoDevice)
VOID NTAPI USBPORT_RemoveUSBxFdo(IN PDEVICE_OBJECT FdoDevice)
VOID NTAPI USBPORT_BugCheck(IN PVOID MiniPortExtension)
NTSTATUS NTAPI USBPORT_IdleNotification(IN PDEVICE_OBJECT PdoDevice, IN PIRP Irp)
struct _USBPORT_INTERFACE_HANDLE * PUSBPORT_INTERFACE_HANDLE
VOID NTAPI USBPORT_NukeAllEndpoints(IN PDEVICE_OBJECT FdoDevice)
VOID NTAPI USBPORT_RemoveBadRequest(IN PIO_CSQ Csq, IN PIRP Irp)
struct _USBPORT_DEVICE_HANDLE USBPORT_DEVICE_HANDLE
VOID NTAPI USBPORT_CompletePdoWaitWake(IN PDEVICE_OBJECT FdoDevice)
VOID NTAPI USBPORT_RemovePipeHandle(IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PUSBPORT_PIPE_HANDLE PipeHandle)
struct _USBPORT_COMMON_BUFFER_HEADER * PUSBPORT_COMMON_BUFFER_HEADER
VOID NTAPI USBPORT_FlushController(IN PDEVICE_OBJECT FdoDevice)
VOID NTAPI USBPORT_AddPipeHandle(IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PUSBPORT_PIPE_HANDLE PipeHandle)
PUSBPORT_COMMON_BUFFER_HEADER NTAPI USBPORT_AllocateCommonBuffer(IN PDEVICE_OBJECT FdoDevice, IN SIZE_T BufferLength)
ULONG NTAPI USBPORT_AssertFailure(PVOID MiniPortExtension, PVOID FailedAssertion, PVOID FileName, ULONG LineNumber, PCHAR Message)
struct _USBPORT_DEVICE_EXTENSION * PUSBPORT_DEVICE_EXTENSION
struct _USBPORT_TRANSFER USBPORT_TRANSFER
struct _USB2_TT_EXTENSION * PUSB2_TT_EXTENSION
struct _USB2_TT_ENDPOINT USB2_TT_ENDPOINT
NTSTATUS NTAPI USBPORT_FdoDeviceControl(PDEVICE_OBJECT FdoDevice, PIRP Irp)
VOID NTAPI USBPORT_IsrDpc(IN PRKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
PDEVICE_OBJECT NTAPI USBPORT_FindUSB2Controller(IN PDEVICE_OBJECT FdoDevice)
USBD_STATUS * PUSBD_STATUS
struct _USBPORT_DEVICE_EXTENSION USBPORT_DEVICE_EXTENSION
NTSTATUS NTAPI USBPORT_HandleSelectConfiguration(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp, IN PURB Urb)
struct _USB2_TT * PUSB2_TT
VOID NTAPI USBPORT_StopWorkerThread(IN PDEVICE_OBJECT FdoDevice)
struct _USBPORT_COMMON_BUFFER_HEADER USBPORT_COMMON_BUFFER_HEADER
NTSTATUS NTAPI USBPORT_GetUsbDescriptor(IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PDEVICE_OBJECT FdoDevice, IN UCHAR Type, IN PUCHAR ConfigDesc, IN PULONG ConfigDescSize)
struct _USBPORT_RH_DESCRIPTORS * PUSBPORT_RH_DESCRIPTORS
VOID NTAPI USBPORT_InvalidateControllerHandler(IN PDEVICE_OBJECT FdoDevice, IN ULONG Type)
VOID NTAPI USBPORT_InsertIdleIrp(IN PIO_CSQ Csq, IN PIRP Irp)
BOOLEAN NTAPI USBPORT_InterruptService(IN PKINTERRUPT Interrupt, IN PVOID ServiceContext)
LIST_ENTRY USBPORT_MiniPortDrivers
NTSTATUS NTAPI USBPORT_PdoDeviceControl(PDEVICE_OBJECT PdoDevice, PIRP Irp)
NTSTATUS NTAPI USBPORT_CreateDevice(IN OUT PUSB_DEVICE_HANDLE *pUsbdDeviceHandle, IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_DEVICE_HANDLE HubDeviceHandle, IN USHORT PortStatus, IN USHORT Port)
VOID NTAPI USBPORT_QueueTransferUrb(IN PURB Urb)
VOID NTAPI USBPORT_SplitTransfer(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint, IN PUSBPORT_TRANSFER Transfer, IN PLIST_ENTRY List)
struct _TIMER_WORK_QUEUE_ITEM * PTIMER_WORK_QUEUE_ITEM
VOID NTAPI USBPORT_InvalidateEndpointHandler(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint, IN ULONG Type)
NTSTATUS NTAPI USBPORT_OpenPipe(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PUSBPORT_PIPE_HANDLE PipeHandle, IN PUSBD_STATUS UsbdStatus)
VOID NTAPI USBPORT_FreeCommonBuffer(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_COMMON_BUFFER_HEADER HeaderBuffer)
NTSTATUS NTAPI USBPORT_HandleSubmitURB(IN PDEVICE_OBJECT PdoDevice, IN PIRP Irp, IN PURB Urb)
struct _USBPORT_ASYNC_CALLBACK_DATA * PUSBPORT_ASYNC_CALLBACK_DATA
VOID NTAPI USBPORT_UpdateAllocatedBwTt(IN PUSB2_TT_EXTENSION TtExtension)
VOID NTAPI USBPORT_SignalWorkerThread(IN PDEVICE_OBJECT FdoDevice)
NTSTATUS NTAPI USBPORT_FdoPnP(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
struct _USBPORT_ASYNC_CALLBACK_DATA USBPORT_ASYNC_CALLBACK_DATA
NTSTATUS NTAPI USBPORT_RootHubCreateDevice(IN PDEVICE_OBJECT FdoDevice, IN PDEVICE_OBJECT PdoDevice)
PIRP NTAPI USBPORT_RemovePendingTransferIrp(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
NTSTATUS NTAPI USBPORT_SetRegistryKeyValue(IN PDEVICE_OBJECT DeviceObject, IN BOOL UseDriverKey, IN ULONG Type, IN PCWSTR ValueNameString, IN PVOID Data, IN ULONG DataSize)
VOID NTAPI USBPORT_ClosePipe(IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_PIPE_HANDLE PipeHandle)
VOID NTAPI USBPORT_FlushMapTransfers(IN PDEVICE_OBJECT FdoDevice)
PIRP NTAPI USBPORT_PeekNextBadRequest(IN PIO_CSQ Csq, IN PIRP Irp, IN PVOID PeekContext)
struct _USBPORT_RHDEVICE_EXTENSION USBPORT_RHDEVICE_EXTENSION
BOOLEAN NTAPI USBPORT_EndpointHasQueuedTransfers(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint, IN PULONG TransferCount)
NTSTATUS NTAPI USBPORT_GetSymbolicName(IN PDEVICE_OBJECT RootHubPdo, IN PUNICODE_STRING DestinationString)
PIRP NTAPI USBPORT_PeekNextIdleIrp(IN PIO_CSQ Csq, IN PIRP Irp, IN PVOID PeekContext)
BOOLEAN NTAPI USBPORT_ValidatePipeHandle(IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PUSBPORT_PIPE_HANDLE PipeHandle)
VOID NTAPI USBPORT_FlushPendingTransfers(IN PUSBPORT_ENDPOINT Endpoint)
NTSTATUS NTAPI USBPORT_ReopenPipe(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint)
PDEVICE_RELATIONS NTAPI USBPORT_FindCompanionControllers(IN PDEVICE_OBJECT USB2FdoDevice, IN BOOLEAN IsObRefer, IN BOOLEAN IsFDOsReturned)
VOID NTAPI USBPORT_FlushClosedEndpointList(IN PDEVICE_OBJECT FdoDevice)
VOID NTAPI USBPORT_DumpingIDs(IN PVOID Buffer)
VOID NTAPI USBPORT_FreeBandwidthUSB2(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint)
VOID NTAPI USBPORT_RootHubEndpointWorker(PUSBPORT_ENDPOINT Endpoint)
struct _USBPORT_RH_DESCRIPTORS USBPORT_RH_DESCRIPTORS
NTSTATUS NTAPI USBPORT_HandleSelectInterface(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp, IN PURB Urb)
VOID NTAPI USBPORT_InsertBadRequest(IN PIO_CSQ Csq, IN PIRP Irp)
VOID NTAPI USBPORT_CompleteCanceledBadRequest(IN PIO_CSQ Csq, IN PIRP Irp)
struct _USBPORT_ENDPOINT USBPORT_ENDPOINT
MPSTATUS NTAPI MiniportOpenEndpoint(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint)
ULONG NTAPI USBPORT_TestDebugBreak(IN PVOID MiniPortExtension)
NTSTATUS NTAPI USBPORT_CreateWorkerThread(IN PDEVICE_OBJECT FdoDevice)
struct _USBPORT_INTERFACE_HANDLE USBPORT_INTERFACE_HANDLE
USBD_STATUS NTAPI USBPORT_InitializeIsoTransfer(IN PDEVICE_OBJECT FdoDevice, IN struct _URB_ISOCH_TRANSFER *Urb, IN PUSBPORT_TRANSFER Transfer)
VOID NTAPI USBPORT_HcQueueWakeDpc(IN PDEVICE_OBJECT FdoDevice)
VOID NTAPI USBPORT_SetEndpointState(IN PUSBPORT_ENDPOINT Endpoint, IN ULONG State)
VOID NTAPI USBPORT_DumpingCapabilities(IN PDEVICE_CAPABILITIES Capabilities)
NTSTATUS NTAPI USBPORT_PdoPnP(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
VOID NTAPI USBPORT_MiniportInterrupts(IN PDEVICE_OBJECT FdoDevice, IN BOOLEAN IsEnable)
VOID NTAPI MiniportCloseEndpoint(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint)
struct _USB2_REBALANCE * PUSB2_REBALANCE
struct _USB2_FRAME_BUDGET USB2_FRAME_BUDGET
VOID NTAPI USBPORT_RemoveDeviceHandle(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_DEVICE_HANDLE DeviceHandle)
struct _USBPORT_COMMON_DEVICE_EXTENSION * PUSBPORT_COMMON_DEVICE_EXTENSION
ULONG USBPORT_DbgPrint(IN PVOID MiniPortExtension, IN ULONG Level, IN PCH Format,...)
VOID NTAPI USBPORT_FlushAllEndpoints(IN PDEVICE_OBJECT FdoDevice)
union _USB2_TT_ENDPOINT_NUMS USB2_TT_ENDPOINT_NUMS
VOID NTAPI USBPORT_FindUrbInIrpTable(IN PUSBPORT_IRP_TABLE IrpTable, IN PURB Urb, IN PIRP Irp)
NTSTATUS NTAPI USBPORT_Initialize20Hub(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_DEVICE_HANDLE HubDeviceHandle, IN ULONG TtCount)
VOID NTAPI USBPORT_ReleaseBadRequestLock(IN PIO_CSQ Csq, IN KIRQL Irql)
ULONG NTAPI USBPORT_GetEndpointState(IN PUSBPORT_ENDPOINT Endpoint)
NTSTATUS NTAPI USBPORT_PdoInternalDeviceControl(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
VOID NTAPI USBPORT_CompleteCanceledIdleIrp(IN PIO_CSQ Csq, IN PIRP Irp)
PIRP NTAPI USBPORT_RemoveActiveTransferIrp(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
VOID NTAPI USBPORT_AcquireBadRequestLock(IN PIO_CSQ Csq, IN PKIRQL Irql)
NTSTATUS NTAPI USBPORT_InitializeDevice(IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PDEVICE_OBJECT FdoDevice)
VOID NTAPI USBPORT_CompleteTransfer(IN PURB Urb, IN USBD_STATUS TransferStatus)
BOOLEAN NTAPI USBPORT_QueueActiveUrbToEndpoint(IN PUSBPORT_ENDPOINT Endpoint, IN PURB Urb)
struct _USBPORT_PIPE_HANDLE * PUSBPORT_PIPE_HANDLE
struct _USBPORT_ISO_BLOCK * PUSBPORT_ISO_BLOCK
VOID NTAPI USBPORT_AcquireIdleLock(IN PIO_CSQ Csq, IN PKIRQL Irql)
struct _USB2_HC_EXTENSION * PUSB2_HC_EXTENSION
struct _TIMER_WORK_QUEUE_ITEM TIMER_WORK_QUEUE_ITEM
VOID NTAPI USBPORT_BadRequestFlush(IN PDEVICE_OBJECT FdoDevice)
NTSTATUS NTAPI USBPORT_RestoreDevice(IN PDEVICE_OBJECT FdoDevice, IN OUT PUSBPORT_DEVICE_HANDLE OldDeviceHandle, IN OUT PUSBPORT_DEVICE_HANDLE NewDeviceHandle)
VOID NTAPI USBPORT_RemoveIdleIrp(IN PIO_CSQ Csq, IN PIRP Irp)
struct _USB2_REBALANCE USB2_REBALANCE
VOID NTAPI USBPORT_AddDeviceHandle(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_DEVICE_HANDLE DeviceHandle)
VOID NTAPI USBPORT_FlushCancelList(IN PUSBPORT_ENDPOINT Endpoint)
VOID NTAPI USBPORT_RootHubPowerAndChirpAllCcPorts(IN PDEVICE_OBJECT FdoDevice)
struct _USBPORT_RHDEVICE_EXTENSION * PUSBPORT_RHDEVICE_EXTENSION
VOID NTAPI USBPORT_WorkerRequestDpc(IN PRKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
VOID NTAPI USBPORT_FlushAbortList(IN PUSBPORT_ENDPOINT Endpoint)
struct _USBPORT_IRP_TABLE USBPORT_IRP_TABLE
VOID NTAPI USBPORT_DoIdleNotificationCallback(IN PVOID Context)
NTSTATUS NTAPI USBPORT_PdoQueryInterface(IN PDEVICE_OBJECT FdoDevice, IN PDEVICE_OBJECT PdoDevice, IN PIRP Irp)
struct _USB2_HC_EXTENSION USB2_HC_EXTENSION
NTSTATUS NTAPI USBPORT_SendSetupPacket(IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PDEVICE_OBJECT FdoDevice, IN PUSB_DEFAULT_PIPE_SETUP_PACKET SetupPacket, IN PVOID Buffer, IN ULONG Length, IN OUT PULONG TransferedLen, IN OUT PUSBD_STATUS pUSBDStatus)
struct _USBPORT_CONFIGURATION_HANDLE * PUSBPORT_CONFIGURATION_HANDLE
ULONG NTAPI USBPORT_CompleteIsoTransfer(IN PVOID MiniPortExtension, IN PVOID MiniPortEndpoint, IN PVOID TransferParameters, IN ULONG TransferLength)
NTSTATUS NTAPI USBPORT_Wait(IN PVOID MiniPortExtension, IN ULONG Milliseconds)
NTSTATUS NTAPI USBPORT_USBDStatusToNtStatus(IN PURB Urb, IN USBD_STATUS USBDStatus)
VOID NTAPI USBPORT_DpcHandler(IN PDEVICE_OBJECT FdoDevice)
BOOLEAN NTAPI USBPORT_StartTimer(IN PDEVICE_OBJECT FdoDevice, IN ULONG Time)
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFINTERRUPT * Interrupt
_Must_inspect_result_ _In_ WDFCMRESLIST List
_In_ NTSTATUS _In_ USBD_STATUS UsbdStatus
_Must_inspect_result_ _In_ WDFUSBDEVICE _Out_writes_bytes_to_opt_ ConfigDescriptorLength PVOID ConfigDescriptor
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET SetupPacket
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
_Must_inspect_result_ _In_ ULONG Flags
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID ServiceContext
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
_In_opt_ PVOID DeferredContext
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2