13#define NDEBUG_USBPORT_CORE
39 DPRINT(
"USBPORT_RegisterDeviceInterface: Enable - %x\n",
Enable);
64 DPRINT(
"USBPORT_RegisterDeviceInterface: LinkName - %wZ\n",
93 DPRINT(
"USBPORT_IsSelectiveSuspendEnabled: ... \n");
100 L"HcDisableSelectiveSuspend",
101 sizeof(
L"HcDisableSelectiveSuspend"),
119 DPRINT(
"USBPORT_GetConfigValue \n");
145 DPRINT(
"USBPORT_GetDefaultBIOS_X: ... \n");
221 DPRINT(
"USBPORT_IsCompanionController: ... \n");
223 *IsCompanion =
FALSE;
247 Irp->IoStatus.Information = 0;
267 DPRINT1(
"USBPORT_IsCompanionController: query interface failed\\n");
272 DPRINT(
"USBPORT_IsCompanionController: query interface succeeded\n");
276 DPRINT1(
"USBPORT_IsCompanionController: old version\n");
297 DPRINT(
"USBPORT_IsCompanionController: Present EHCI controller for FDO - %p\n",
302 DPRINT(
"USBPORT_IsCompanionController: No EHCI controller for FDO - %p\n",
328 DPRINT(
"USBPORT_QueryPciBusInterface: ... \n");
350 Irp->IoStatus.Information = 0;
375 DPRINT(
"USBPORT_QueryPciBusInterface: return Status - %x\n",
Status);
391 DPRINT(
"USBPORT_QueryCapabilities: ... \n");
393 FdoExtention = FdoDevice->DeviceExtension;
407 DPRINT1(
"USBPORT_QueryCapabilities: No resources - IoAllocateIrp!\n");
452 WCHAR CharName[255] = {0};
453 WCHAR CharDosName[255] = {0};
461 L"\\Device\\USBFDO-%d",
468 L"\\DosDevices\\HCD%d",
473 DPRINT(
"USBPORT_CreateLegacySymbolicLink: DeviceName - %wZ, DosSymbolicName - %wZ\n",
492 DPRINT1(
"USBPORT_StopDevice: UNIMPLEMENTED. FIXME\n");
508 ULONG MiniPortStatus;
511 ULONG DisableSelectiveSuspend = 0;
512 ULONG DisableCcDetect = 0;
513 ULONG IdleEpSupport = 0;
514 ULONG IdleEpSupportEx = 0;
517 ULONG TotalBusBandwidth = 0;
523 DPRINT(
"USBPORT_StartDevice: FdoDevice - %p, UsbPortResources - %p\n",
542 DPRINT1(
"USBPORT_StartDevice: Failed to get pci config information!\n");
572 DPRINT1(
"USBPORT_StartDevice: Failed to get DmaAdapter!\n");
660 &DisableSelectiveSuspend,
666 if (DisableSelectiveSuspend)
669 if (!DisableSelectiveSuspend &&
675 MiniportFlags =
Packet->MiniPortFlags;
690 L"EnIdleEndpointSupport",
692 sizeof(IdleEpSupport));
697 L"EnIdleEndpointSupportEx",
699 sizeof(IdleEpSupportEx));
711 L"CommonBuffer2GBLimit",
712 sizeof(
L"CommonBuffer2GBLimit"),
742 TotalBusBandwidth =
Packet->MiniPortBusBandwidth;
748 L"TotalBusBandwidth",
749 sizeof(
L"TotalBusBandwidth"),
751 sizeof(TotalBusBandwidth));
753 if (TotalBusBandwidth !=
FdoExtension->TotalBusBandwidth)
770 DPRINT1(
"USBPORT_StartDevice: Allocate ActiveIrpTable failed!\n");
782 DPRINT1(
"USBPORT_StartDevice: Allocate PendingIrpTable failed!\n");
792 UsbPortResources->InterruptVector,
793 UsbPortResources->InterruptLevel,
794 UsbPortResources->InterruptLevel,
795 UsbPortResources->InterruptMode,
796 UsbPortResources->ShareVector,
797 UsbPortResources->InterruptAffinity,
803 DPRINT1(
"USBPORT_StartDevice: IoConnectInterrupt failed!\n");
809 if (
Packet->MiniPortExtensionSize)
814 if (
Packet->MiniPortResourcesSize)
817 Packet->MiniPortResourcesSize);
821 DPRINT1(
"USBPORT_StartDevice: Failed to AllocateCommonBuffer!\n");
839 if (UsbPortResources->LegacySupport)
852 L"DetectedLegacyBIOS",
858 DPRINT1(
"USBPORT_StartDevice: Failed to Start MiniPort. MiniPortStatus - %x\n",
886 &GUID_DEVINTERFACE_USB_HOST_CONTROLLER,
891 DPRINT1(
"USBPORT_StartDevice: RegisterDeviceInterface failed!\n");
899 DPRINT(
"USBPORT_StartDevice: Exit Status - %p\n",
Status);
906 DPRINT1(
"USBPORT_StartDevice: ExitWithError Status - %lx\n",
Status);
926 DPRINT(
"USBPORT_ParseResources: ... \n");
937 PartialDescriptor = &
ResourceList->PartialDescriptors[0];
944 PortDescriptor = PartialDescriptor;
948 if (!InterruptDescriptor)
949 InterruptDescriptor = PartialDescriptor;
957 PartialDescriptor += 1;
969 PortDescriptor->
u.
Port.Length,
973 UsbPortResources->IoSpaceLength = PortDescriptor->
u.
Port.Length;
975 if (UsbPortResources->ResourceBase)
993 if (UsbPortResources->ResourceBase)
1007 UsbPortResources->InterruptVector = InterruptDescriptor->
u.
Interrupt.Vector;
1008 UsbPortResources->InterruptLevel = InterruptDescriptor->
u.
Interrupt.Level;
1009 UsbPortResources->InterruptAffinity = InterruptDescriptor->
u.
Interrupt.Affinity;
1014 UsbPortResources->InterruptMode = InterruptDescriptor->
Flags ==
1036 WCHAR CharDeviceName[64];
1039 DPRINT(
"USBPORT_CreatePdo: FdoDevice - %p, RootHubPdo - %p\n",
1048 sizeof(CharDeviceName),
1049 L"\\Device\\USBPDO-%d",
1071 DPRINT1(
"USBPORT_CreatePdo: Filed create HubPdo!\n");
1133 DPRINT(
"USBPORT_FdoPnP: FdoDevice - %p, Minor - %x\n", FdoDevice,
Minor);
1140 DPRINT(
"IRP_MN_START_DEVICE\n");
1190 FdoCommonExtension->
PnpStateFlags &= ~USBPORT_PNP_STATE_NOT_INIT;
1210 DPRINT(
"IRP_MN_QUERY_REMOVE_DEVICE\n");
1213 DPRINT1(
"USBPORT_FdoPnP: Haction registry write FIXME\n");
1220 DPRINT(
"USBPORT_FdoPnP: IRP_MN_REMOVE_DEVICE\n");
1226 DPRINT1(
"USBPORT_FdoPnP: stop fdo FIXME\n");
1248 DPRINT(
"IRP_MN_CANCEL_REMOVE_DEVICE\n");
1253 DPRINT(
"IRP_MN_STOP_DEVICE\n");
1256 DPRINT1(
"USBPORT_FdoPnP: stop fdo FIXME\n");
1258 FdoCommonExtension->
PnpStateFlags &= ~USBPORT_PNP_STATE_STARTED;
1266 DPRINT(
"IRP_MN_QUERY_STOP_DEVICE\n");
1271 DPRINT(
"IRP_MN_CANCEL_STOP_DEVICE\n");
1276 DPRINT(
"IRP_MN_QUERY_DEVICE_RELATIONS\n");
1283 if (!DeviceRelations)
1291 DeviceRelations->
Count = 0;
1310 DeviceRelations->
Count = 1;
1314 Irp->IoStatus.Information = (
ULONG_PTR)DeviceRelations;
1320 DPRINT1(
"USBPORT_FdoPnP: FIXME IRP_MN_QUERY_DEVICE_RELATIONS/RemovalRelations\n");
1330 DPRINT(
"IRP_MN_QUERY_INTERFACE\n");
1334 DPRINT(
"IRP_MN_QUERY_CAPABILITIES\n");
1338 DPRINT(
"IRP_MN_QUERY_RESOURCES\n");
1342 DPRINT(
"IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n");
1346 DPRINT(
"IRP_MN_QUERY_DEVICE_TEXT\n");
1350 DPRINT(
"IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n");
1354 DPRINT(
"IRP_MN_READ_CONFIG\n");
1358 DPRINT(
"IRP_MN_WRITE_CONFIG\n");
1362 DPRINT(
"IRP_MN_EJECT\n");
1366 DPRINT(
"IRP_MN_SET_LOCK\n");
1370 DPRINT(
"IRP_MN_QUERY_ID\n");
1374 DPRINT(
"IRP_MN_QUERY_PNP_DEVICE_STATE\n");
1378 DPRINT(
"IRP_MN_QUERY_BUS_INFORMATION\n");
1382 DPRINT(
"IRP_MN_DEVICE_USAGE_NOTIFICATION\n");
1386 DPRINT1(
"IRP_MN_SURPRISE_REMOVAL\n");
1395 DPRINT(
"unknown IRP_MN_???\n");
1417 size_t Remaining =
sizeof(
Buffer);
1423 DPRINT(
"USBPORT_GetDeviceHwIds: FdoDevice - %p, Packet->MiniPortFlags - %p\n",
1434 L"USB\\ROOT_HUB20&VID%04x&PID%04x&REV%04x",
1447 L"USB\\ROOT_HUB20&VID%04x&PID%04x",
1459 L"USB\\ROOT_HUB20");
1468 L"USB\\ROOT_HUB&VID%04x&PID%04x&REV%04x",
1481 L"USB\\ROOT_HUB&VID%04x&PID%04x",
1501 DPRINT(
"Hardware IDs:\n");
1541 DPRINT(
"USBPORT_PdoPnP: PdoDevice - %p, Minor - %x\n", PdoDevice,
Minor);
1546 DPRINT(
"IRP_MN_START_DEVICE\n");
1554 &GUID_DEVINTERFACE_USB_HUB,
1567 DPRINT(
"USBPORT_PdoPnP: IRP_MN_QUERY_REMOVE_DEVICE\n");
1572 DPRINT1(
"USBPORT_PdoPnP: IRP_MN_REMOVE_DEVICE UNIMPLEMENTED. FIXME. \n");
1578 DPRINT(
"IRP_MN_CANCEL_REMOVE_DEVICE\n");
1583 DPRINT1(
"USBPORT_PdoPnP: IRP_MN_STOP_DEVICE UNIMPLEMENTED. FIXME. \n");
1589 DPRINT(
"IRP_MN_QUERY_STOP_DEVICE\n");
1594 DPRINT(
"IRP_MN_CANCEL_STOP_DEVICE\n");
1602 DPRINT(
"IRP_MN_QUERY_DEVICE_RELATIONS\n");
1612 if (!DeviceRelations)
1615 Irp->IoStatus.Information = 0;
1619 DeviceRelations->
Count = 1;
1620 DeviceRelations->
Objects[0] = PdoDevice;
1625 Irp->IoStatus.Information = (
ULONG_PTR)DeviceRelations;
1630 DPRINT(
"IRP_MN_QUERY_INTERFACE\n");
1635 DPRINT(
"IRP_MN_QUERY_CAPABILITIES\n");
1647 DPRINT(
"USBPORT_PdoPnP: IRP_MN_QUERY_RESOURCES\n");
1651 DPRINT(
"IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n");
1655 DPRINT(
"IRP_MN_QUERY_DEVICE_TEXT\n");
1659 DPRINT(
"IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n");
1663 DPRINT(
"IRP_MN_READ_CONFIG\n");
1668 DPRINT(
"IRP_MN_WRITE_CONFIG\n");
1673 DPRINT(
"IRP_MN_EJECT\n");
1678 DPRINT(
"IRP_MN_SET_LOCK\n");
1703 L"USB\\ROOT_HUB20");
1723 DPRINT(
"BusQueryDeviceID - %S, TotalLength - %hu\n",
1746 Irp->IoStatus.Information = 0;
1756 DPRINT(
"IRP_MN_QUERY_PNP_DEVICE_STATE\n");
1761 DPRINT(
"IRP_MN_QUERY_BUS_INFORMATION\n");
1791 DPRINT(
"IRP_MN_DEVICE_USAGE_NOTIFICATION\n");
1795 DPRINT(
"USBPORT_PdoPnP: IRP_MN_SURPRISE_REMOVAL\n");
1800 DPRINT(
"unknown IRP_MN_???\n");
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
_In_ BUS_QUERY_ID_TYPE IdType
_In_ PCHAR _In_ ULONG DeviceNumber
NTKERNELAPI NTSTATUS NTAPI IoCsqInitialize(_Out_ PIO_CSQ Csq, _In_ PIO_CSQ_INSERT_IRP CsqInsertIrp, _In_ PIO_CSQ_REMOVE_IRP CsqRemoveIrp, _In_ PIO_CSQ_PEEK_NEXT_IRP CsqPeekNextIrp, _In_ PIO_CSQ_ACQUIRE_LOCK CsqAcquireLock, _In_ PIO_CSQ_RELEASE_LOCK CsqReleaseLock, _In_ PIO_CSQ_COMPLETE_CANCELED_IRP CsqCompleteCanceledIrp)
Set up a CSQ struct to initialize the queue.
#define NT_SUCCESS(StatCode)
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
VOID NTAPI USBPORT_DumpingIDs(IN PVOID Buffer)
VOID NTAPI USBPORT_DumpingCapabilities(IN PDEVICE_CAPABILITIES Capabilities)
NTSTATUS NTAPI USBPORT_StartDevice(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_RESOURCES UsbPortResources)
NTSTATUS NTAPI USBPORT_IsCompanionController(IN PDEVICE_OBJECT DeviceObject, IN BOOLEAN *IsCompanion)
NTSTATUS NTAPI USBPORT_ParseResources(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp, IN PUSBPORT_RESOURCES UsbPortResources)
BOOLEAN NTAPI USBPORT_IsSelectiveSuspendEnabled(IN PDEVICE_OBJECT FdoDevice)
NTSTATUS NTAPI USBPORT_QueryCapabilities(IN PDEVICE_OBJECT FdoDevice, IN PDEVICE_CAPABILITIES Capabilities)
PVOID NTAPI USBPORT_GetDeviceHwIds(IN PDEVICE_OBJECT FdoDevice, IN USHORT VendorID, IN USHORT DeviceID, IN USHORT RevisionID)
NTSTATUS NTAPI USBPORT_PdoPnP(IN PDEVICE_OBJECT PdoDevice, IN PIRP Irp)
NTSTATUS NTAPI USBPORT_GetConfigValue(IN PWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, IN ULONG ValueLength, IN PVOID Context, IN PVOID EntryContext)
NTSTATUS NTAPI USBPORT_CreatePdo(IN PDEVICE_OBJECT FdoDevice, OUT PDEVICE_OBJECT *RootHubPdo)
NTSTATUS NTAPI USBPORT_FdoPnP(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
NTSTATUS NTAPI USBPORT_QueryPciBusInterface(IN PDEVICE_OBJECT FdoDevice)
NTSTATUS NTAPI USBPORT_GetDefaultBIOSx(IN PDEVICE_OBJECT FdoDevice, IN PULONG UsbBIOSx, IN PULONG DisableSelectiveSuspend, IN PULONG DisableCcDetect, IN PULONG IdleEpSupport, IN PULONG IdleEpSupportEx, IN PULONG SoftRetry)
IO_COMPLETION_ROUTINE USBPORT_FdoStartCompletion
NTSTATUS NTAPI USBPORT_CreateLegacySymbolicLink(IN PDEVICE_OBJECT FdoDevice)
NTSTATUS NTAPI USBPORT_StopDevice(IN PDEVICE_OBJECT FdoDevice)
NTSTATUS NTAPI USBPORT_RegisterDeviceInterface(IN PDEVICE_OBJECT PdoDevice, IN PDEVICE_OBJECT DeviceObject, IN CONST GUID *InterfaceClassGuid, IN BOOLEAN Enable)
VOID NTAPI USBPORT_HcWakeDpc(IN PRKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
VOID NTAPI USBPORT_AdjustDeviceCapabilities(IN PDEVICE_OBJECT FdoDevice, IN PDEVICE_OBJECT PdoDevice)
VOID NTAPI USBPORT_ReleaseIdleLock(IN PIO_CSQ Csq, IN KIRQL Irql)
VOID NTAPI USBPORT_RemoveBadRequest(IN PIO_CSQ Csq, IN PIRP Irp)
VOID NTAPI USBPORT_InsertIdleIrp(IN PIO_CSQ Csq, IN PIRP Irp)
PIRP NTAPI USBPORT_PeekNextBadRequest(IN PIO_CSQ Csq, IN PIRP Irp, IN PVOID PeekContext)
PIRP NTAPI USBPORT_PeekNextIdleIrp(IN PIO_CSQ Csq, IN PIRP Irp, IN PVOID PeekContext)
VOID NTAPI USBPORT_InsertBadRequest(IN PIO_CSQ Csq, IN PIRP Irp)
VOID NTAPI USBPORT_CompleteCanceledBadRequest(IN PIO_CSQ Csq, IN PIRP Irp)
VOID NTAPI USBPORT_ReleaseBadRequestLock(IN PIO_CSQ Csq, IN KIRQL Irql)
VOID NTAPI USBPORT_CompleteCanceledIdleIrp(IN PIO_CSQ Csq, IN PIRP Irp)
VOID NTAPI USBPORT_AcquireBadRequestLock(IN PIO_CSQ Csq, IN PKIRQL Irql)
VOID NTAPI USBPORT_AcquireIdleLock(IN PIO_CSQ Csq, IN PKIRQL Irql)
VOID NTAPI USBPORT_RemoveIdleIrp(IN PIO_CSQ Csq, IN PIRP Irp)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeSetEvent(pEvt, foo, foo2)
#define KeInitializeSpinLock(sl)
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN IsPresent
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
_In_ GUID _In_ PVOID ValueData
#define CmResourceTypeMemory
#define CmResourceTypePort
#define CmResourceTypeInterrupt
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
PVOID NTAPI MmMapIoSpace(IN PHYSICAL_ADDRESS PhysicalAddress, IN SIZE_T NumberOfBytes, IN MEMORY_CACHING_TYPE CacheType)
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
#define ExFreePoolWithTag(_P, _T)
static OUT PIO_STATUS_BLOCK IoStatusBlock
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
_Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PCM_RESOURCE_LIST _Inout_opt_ PCM_RESOURCE_LIST * AllocatedResourcesTranslated
#define CM_RESOURCE_PORT_IO
#define CM_RESOURCE_INTERRUPT_LATCHED
_In_ PCWSTR _Inout_ _At_ QueryTable EntryContext
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE QueryTable
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RTL_REGISTRY_SERVICES
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ ULONG _In_ ULONG _In_ ULONG Length
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
#define IRP_MN_SURPRISE_REMOVAL
#define IoSkipCurrentIrpStackLocation(Irp)
#define IoCopyCurrentIrpStackLocationToNext(Irp)
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
VOID NTAPI IoDetachDevice(IN PDEVICE_OBJECT TargetDevice)
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
PDEVICE_OBJECT NTAPI IoGetAttachedDeviceReference(PDEVICE_OBJECT DeviceObject)
NTSTATUS NTAPI IoRegisterDeviceInterface(IN PDEVICE_OBJECT PhysicalDeviceObject, IN CONST GUID *InterfaceClassGuid, IN PUNICODE_STRING ReferenceString OPTIONAL, OUT PUNICODE_STRING SymbolicLinkName)
NTSTATUS NTAPI IoSetDeviceInterfaceState(IN PUNICODE_STRING SymbolicLinkName, IN BOOLEAN Enable)
PIRP NTAPI IoBuildSynchronousFsdRequest(IN ULONG MajorFunction, IN PDEVICE_OBJECT DeviceObject, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER StartingOffset, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
#define IoCompleteRequest
PIRP NTAPI IoAllocateIrp(IN CCHAR StackSize, IN BOOLEAN ChargeQuota)
VOID NTAPI IoFreeIrp(IN PIRP Irp)
VOID NTAPI IoDisconnectInterrupt(PKINTERRUPT InterruptObject)
NTSTATUS NTAPI IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject, IN PKSERVICE_ROUTINE ServiceRoutine, IN PVOID ServiceContext, IN PKSPIN_LOCK SpinLock, IN ULONG Vector, IN KIRQL Irql, IN KIRQL SynchronizeIrql, IN KINTERRUPT_MODE InterruptMode, IN BOOLEAN ShareVector, IN KAFFINITY ProcessorEnableMask, IN BOOLEAN FloatingSave)
NTSTATUS NTAPI IoCreateSymbolicLink(IN PUNICODE_STRING SymbolicLinkName, IN PUNICODE_STRING DeviceName)
#define STATUS_NONE_MAPPED
#define STATUS_NOT_SUPPORTED
NTSTRSAFEAPI RtlStringCbCopyW(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, _In_ NTSTRSAFE_PCWSTR pszSrc)
NTSTRSAFEVAPI RtlStringCbPrintfExW(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, _Outptr_opt_result_bytebuffer_(*pcbRemaining) NTSTRSAFE_PWSTR *ppszDestEnd, _Out_opt_ size_t *pcbRemaining, _In_ STRSAFE_DWORD dwFlags, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,...)
NTSTRSAFEVAPI RtlStringCbPrintfW(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,...)
PDMA_ADAPTER NTAPI IoGetDmaAdapter(IN PDEVICE_OBJECT PhysicalDeviceObject, IN PDEVICE_DESCRIPTION DeviceDescription, IN OUT PULONG NumberOfMapRegisters)
NTSTATUS NTAPI IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_REGISTRY_PROPERTY DeviceProperty, IN ULONG BufferLength, OUT PVOID PropertyBuffer, OUT PULONG ResultLength)
#define FILE_DEVICE_BUS_EXTENDER
struct _INTERFACE * PINTERFACE
#define STATUS_MORE_PROCESSING_REQUIRED
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@391::@393 Port
union _CM_PARTIAL_RESOURCE_DESCRIPTOR::@391 u
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@391::@394 Interrupt
PDEVICE_OBJECT Objects[1]
struct _IO_STACK_LOCATION::@3974::@4001 DeviceCapabilities
struct _IO_STACK_LOCATION::@3974::@4011 StartDevice
struct _IO_STACK_LOCATION::@3974::@4000 QueryInterface
struct _IO_STACK_LOCATION::@3974::@4005 QueryId
struct _IO_STACK_LOCATION::@3974::@3999 QueryDeviceRelations
union _IO_STACK_LOCATION::@1575 Parameters
PINTERFACE_DEREFERENCE InterfaceDereference
PPCI_IS_DEVICE_PRESENT_EX IsDevicePresentEx
PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine
DEVICE_POWER_STATE DevicePowerState
UNICODE_STRING SymbolicLinkName
PDEVICE_OBJECT LowerDevice
USBPORT_COMMON_DEVICE_EXTENSION CommonExtension
USBPORT_COMMON_DEVICE_EXTENSION CommonExtension
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_OBJECT_NAME_COLLISION
#define STATUS_INSUFFICIENT_RESOURCES
NTSTATUS NTAPI USBPORT_PdoQueryInterface(IN PDEVICE_OBJECT FdoDevice, IN PDEVICE_OBJECT PdoDevice, IN PIRP Irp)
#define USB_MINIPORT_FLAGS_USB2
#define USBPORT_RESOURCES_PORT
#define USB_MINIPORT_FLAGS_POLLING
#define USBPORT_RESOURCES_MEMORY
#define USB_MINIPORT_FLAGS_DISABLE_SS
#define USB_MINIPORT_FLAGS_WAKE_SUPPORT
#define USBPORT_RESOURCES_INTERRUPT
#define USBPORT_INVALIDATE_CONTROLLER_SURPRISE_REMOVE
NTSTATUS NTAPI USBPORT_RootHubCreateDevice(IN PDEVICE_OBJECT FdoDevice, IN PDEVICE_OBJECT PdoDevice)
VOID NTAPI USBPORT_TransferFlushDpc(IN PRKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
VOID NTAPI USBPORT_AddUSB2Fdo(IN PDEVICE_OBJECT FdoDevice)
VOID NTAPI USBPORT_AddUSB1Fdo(IN PDEVICE_OBJECT FdoDevice)
PUSBPORT_COMMON_BUFFER_HEADER NTAPI USBPORT_AllocateCommonBuffer(IN PDEVICE_OBJECT FdoDevice, IN SIZE_T BufferLength)
VOID NTAPI USBPORT_IsrDpc(IN PRKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
VOID NTAPI USBPORT_StopWorkerThread(IN PDEVICE_OBJECT FdoDevice)
VOID NTAPI USBPORT_InvalidateControllerHandler(IN PDEVICE_OBJECT FdoDevice, IN ULONG Type)
BOOLEAN NTAPI USBPORT_InterruptService(IN PKINTERRUPT Interrupt, IN PVOID ServiceContext)
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 BufferLength)
VOID NTAPI USBPORT_FreeCommonBuffer(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_COMMON_BUFFER_HEADER HeaderBuffer)
NTSTATUS NTAPI USBPORT_SetRegistryKeyValue(IN PDEVICE_OBJECT DeviceObject, IN BOOL UseDriverKey, IN ULONG Type, IN PCWSTR ValueNameString, IN PVOID Data, IN ULONG DataSize)
NTSTATUS NTAPI USBPORT_CreateWorkerThread(IN PDEVICE_OBJECT FdoDevice)
VOID NTAPI USBPORT_MiniportInterrupts(IN PDEVICE_OBJECT FdoDevice, IN BOOLEAN IsEnable)
VOID NTAPI USBPORT_WorkerRequestDpc(IN PRKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
BOOLEAN NTAPI USBPORT_StartTimer(IN PDEVICE_OBJECT FdoDevice, IN ULONG Time)
#define USBPORT_FLAG_HC_WAKE_SUPPORT
#define USBPORT_MPFLAG_INTERRUPTS_ENABLED
#define USBPORT_FLAG_HC_POLLING
#define USBPORT_FLAG_LEGACY_SUPPORT
#define PCI_INTERFACE_USB_ID_EHCI
#define USBPORT_FLAG_BIOS_DISABLE_SS
#define USBPORT_PNP_STATE_STARTED
#define USBPORT_FLAG_HC_STARTED
#define USBPORT_PNP_STATE_FAILED
#define USBPORT_FLAG_COMPANION_HC
#define USBPORT_PNP_STATE_STOPPED
#define USBPORT_FLAG_SELECTIVE_SUSPEND
#define USBPORT_FLAG_INT_CONNECTED
#define USBPORT_FLAG_DOS_SYMBOLIC_NAME
#define USBPORT_PNP_STATE_NOT_INIT
_In_ PDEVICE_OBJECT DeviceObject
_In_ DEVICE_RELATION_TYPE RelationType
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING SymbolicLinkName
_In_ WDFDEVICE _In_ PPNP_BUS_INFORMATION BusInformation
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING DeviceDescription
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING DeviceID
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG _Out_opt_ PULONG _Out_opt_ PULONG ValueType
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG ValueLength
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ PWDF_MEMORY_DESCRIPTOR MemoryDescriptor
#define DeviceCapabilities
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
_In_ CONST GUID * InterfaceClassGuid
#define IRP_MN_CANCEL_STOP_DEVICE
#define IRP_MN_QUERY_PNP_DEVICE_STATE
#define PCI_WHICHSPACE_CONFIG
#define IRP_MN_QUERY_INTERFACE
#define DEVICE_DESCRIPTION_VERSION
#define IRP_MN_START_DEVICE
#define IRP_MN_DEVICE_USAGE_NOTIFICATION
#define IRP_MN_READ_CONFIG
#define IRP_MN_WRITE_CONFIG
struct _PCI_DEVICE_PRESENT_INTERFACE PCI_DEVICE_PRESENT_INTERFACE
#define IRP_MN_QUERY_RESOURCE_REQUIREMENTS
#define IRP_MN_REMOVE_DEVICE
#define PCI_USE_CLASS_SUBCLASS
#define IRP_MN_FILTER_RESOURCE_REQUIREMENTS
@ DevicePropertyBusNumber
struct _BUS_INTERFACE_STANDARD BUS_INTERFACE_STANDARD
#define PCI_SUBCLASS_SB_USB
#define IRP_MN_QUERY_DEVICE_RELATIONS
#define PCI_COMMON_HDR_LENGTH
#define IRP_MN_QUERY_STOP_DEVICE
#define IRP_MN_QUERY_DEVICE_TEXT
#define IRP_MN_QUERY_CAPABILITIES
#define IRP_MN_QUERY_RESOURCES
#define IRP_MN_CANCEL_REMOVE_DEVICE
#define PCI_CLASS_SERIAL_BUS_CTLR
#define PCI_USE_LOCAL_DEVICE
#define IRP_MN_STOP_DEVICE
_In_ USHORT _In_ UCHAR RevisionID
enum _DEVICE_RELATION_TYPE DEVICE_RELATION_TYPE
#define PCI_USE_LOCAL_BUS
#define IRP_MN_QUERY_BUS_INFORMATION
#define IRP_MN_QUERY_REMOVE_DEVICE
#define ObDereferenceObject
#define ObReferenceObject