17 DPRINT(
"USBI_InterfaceReference\n");
24 DPRINT(
"USBI_InterfaceDereference\n");
42 DPRINT(
"USBHI_CreateUsbDevice: ...\n");
44 PdoDevice = BusContext;
53 *UsbdDeviceHandle = deviceHandle;
66 DPRINT(
"USBHI_InitializeUsbDevice\n");
68 PdoDevice = BusContext;
90 DPRINT(
"USBHI_GetUsbDescriptors ...\n");
92 PdoDevice = BusContext;
96 if (DeviceDescBuffer && *DeviceDescBufferLen)
103 *DeviceDescBufferLen);
110 ConfigDescBufferLen);
126 DPRINT(
"USBHI_RemoveUsbDevice: UsbdDeviceHandle - %p, Flags - %x\n",
130 PdoDevice = BusContext;
147 DPRINT(
"USBHI_RestoreUsbDevice: OldUsbdDeviceHandle - %p, NewUsbdDeviceHandle - %x\n",
149 NewUsbdDeviceHandle);
151 PdoDevice = BusContext;
171 ULONG NumberOfOpenPipes = 0;
178 DPRINT(
"USBHI_QueryDeviceInformation: ...\n");
180 *LenDataReturned = 0;
201 while (InterfaceEntry &&
210 InterfaceEntry = InterfaceEntry->
Flink;
217 if (DeviceInfoBufferLen < ActualLength)
230 DeviceInfo->NumberOfOpenPipes = NumberOfOpenPipes;
253 *LenDataReturned = ActualLength;
262 while (InterfaceEntry &&
285 PipeHandle->Endpoint->EndpointProperties.ScheduleOffset;
297 InterfaceEntry = InterfaceEntry->
Flink;
300 *LenDataReturned = ActualLength;
309 IN ULONG ControllerInfoBufferLen,
319 DPRINT(
"USBHI_GetControllerInformation: ControllerInfoBufferLen - %x\n",
320 ControllerInfoBufferLen);
322 PdoDevice = BusContext;
327 InfoBuffer = ControllerInfoBuffer;
329 *LenDataReturned = 0;
372 DPRINT(
"USBHI_ControllerSelectiveSuspend: Enable - %x\n",
Enable);
374 PdoDevice = BusContext;
400 L"HcDisableSelectiveSuspend",
434 DPRINT(
"USBHI_GetExtendedHubInformation: ...\n");
436 PdoDevice = BusContext;
442 HubInfoBuffer = HubInformationBuffer;
447 *LenDataReturned = 0;
453 *LenDataReturned = 0;
457 NumPorts =
PdoExtension->RootHubDescriptors->Descriptor.bNumberOfPorts;
482 if (
PortStatus.PortStatus.Usb20PortStatus.AsUshort16 & 0x8000)
509 sizeof(
L"PortAttrX"),
533 DPRINT(
"USBHI_GetRootHubSymbolicName: ...\n");
535 PdoDevice = BusContext;
539 if (HubInfoBufferLen < HubName.
Length)
541 InfoBuffer = HubInfoBuffer;
549 *HubNameActualLen = HubName.
Length;
562 DPRINT1(
"USBHI_GetDeviceBusContext: UNIMPLEMENTED. FIXME.\n");
575 DPRINT(
"USBHI_Initialize20Hub: UsbdHubDeviceHandle - %p, TtCount - %x\n",
579 PdoDevice = BusContext;
599 DPRINT(
"USBHI_RootHubInitNotification\n");
601 PdoDevice = BusContext;
622 DPRINT(
"USBHI_FlushTransfers: ...\n");
624 PdoDevice = BusContext;
636 DPRINT1(
"USBHI_SetDeviceHandleData: UNIMPLEMENTED. FIXME.\n");
647 DPRINT1(
"USBDI_GetUSBDIVersion: UNIMPLEMENTED. FIXME.\n");
655 DPRINT1(
"USBDI_QueryBusTime: UNIMPLEMENTED. FIXME.\n");
664 DPRINT1(
"USBDI_SubmitIsoOutUrb: UNIMPLEMENTED. FIXME.\n");
683 DPRINT(
"USBDI_QueryBusInformation: Level - %p\n",
Level);
687 DPRINT1(
"USBDI_QueryBusInformation: Level should be 0 or 1\n");
691 PdoDevice = BusContext;
698 if (BusInfoActualLen)
709 DPRINT1(
"USBDI_QueryBusInformation: LEVEL_0 UNIMPLEMENTED. FIXME\n");
721 if (BusInfoActualLen)
722 *BusInfoActualLen =
Length;
724 if (*BusInfoBufferLen <
Length)
729 *BusInfoBufferLen =
Length;
731 Buffer1 = BusInfoBuffer;
732 DPRINT1(
"USBDI_QueryBusInformation: LEVEL_1 UNIMPLEMENTED. FIXME\n");
757 DPRINT(
"USBDI_IsDeviceHighSpeed: ...\n");
759 PdoDevice = BusContext;
776 DPRINT1(
"USBDI_EnumLogEntry: UNIMPLEMENTED. FIXME.\n");
792 DPRINT(
"USBPORT_PdoQueryInterface: ...\n");
795 &USB_BUS_INTERFACE_HUB_GUID))
804 DPRINT1(
"USB_BUS_INTERFACE_HUB_GUID version %x not supported!\n",
807 return Irp->IoStatus.Status;
855 &USB_BUS_INTERFACE_USBDI_GUID))
864 DPRINT1(
"USB_BUS_INTERFACE_USBDI_GUID version %x not supported!\n",
867 return Irp->IoStatus.Status;
899 DPRINT1(
"HandleQueryInterface UNKNOWN INTERFACE GUID: %wZ Version %x\n",
907 return Irp->IoStatus.Status;
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
OSVERSIONINFOW VersionInfo
#define NT_SUCCESS(StatCode)
VOID NTAPI USBPORT_DumpingDeviceDescriptor(IN PUSB_DEVICE_DESCRIPTOR DeviceDescriptor)
NTSTATUS NTAPI USBPORT_RemoveDevice(IN PDEVICE_OBJECT FdoDevice, IN OUT PUSBPORT_DEVICE_HANDLE DeviceHandle, IN ULONG Flags)
NTSTATUS NTAPI USBPORT_GetUsbDescriptor(IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PDEVICE_OBJECT FdoDevice, IN UCHAR Type, IN PUCHAR ConfigDesc, IN PULONG ConfigDescSize)
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)
NTSTATUS NTAPI USBPORT_Initialize20Hub(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_DEVICE_HANDLE HubDeviceHandle, IN ULONG TtCount)
NTSTATUS NTAPI USBPORT_InitializeDevice(IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PDEVICE_OBJECT FdoDevice)
NTSTATUS NTAPI USBPORT_RestoreDevice(IN PDEVICE_OBJECT FdoDevice, IN OUT PUSBPORT_DEVICE_HANDLE OldDeviceHandle, IN OUT PUSBPORT_DEVICE_HANDLE NewDeviceHandle)
NTSTATUS NTAPI USBPORT_GetSymbolicName(IN PDEVICE_OBJECT RootHubPdo, IN PUNICODE_STRING DestinationString)
VOID NTAPI USBPORT_BadRequestFlush(IN PDEVICE_OBJECT FdoDevice)
#define KeReleaseSpinLock(sl, irql)
#define KeAcquireSpinLock(sl, irql)
struct _USB_BUS_INTERFACE_HUB_V5 * PUSB_BUS_INTERFACE_HUB_V5
_Inout_ PUSB_DEVICE_HANDLE DeviceHandle
RH_INIT_CALLBACK * PRH_INIT_CALLBACK
struct _USB_LEVEL_INFORMATION USB_LEVEL_INFORMATION
_Outptr_ PUSB_DEVICE_HANDLE _In_ PUSB_DEVICE_HANDLE _In_ USHORT PortStatus
_In_ PVOID _In_ PDEVICE_OBJECT UsbDevicePdo
struct _USB_PIPE_INFORMATION_0 USB_PIPE_INFORMATION_0
_In_ PUSB_DEVICE_HANDLE _In_ ULONG TtCount
struct _USB_CONTROLLER_INFORMATION_0 USB_CONTROLLER_INFORMATION_0
_In_ PDEVICE_OBJECT HubPhysicalDeviceObject
struct _USB_EXTHUB_INFORMATION_0 USB_EXTHUB_INFORMATION_0
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID, PUNICODE_STRING)
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ ULONG _In_ ULONG _In_ ULONG Length
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
#define STATUS_NOT_SUPPORTED
#define STATUS_BUFFER_TOO_SMALL
struct _IO_STACK_LOCATION::@3974::@4000 QueryInterface
union _IO_STACK_LOCATION::@1575 Parameters
struct _LIST_ENTRY * Flink
PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor
LIST_ENTRY InterfaceHandleList
USBPORT_PIPE_HANDLE PipeHandle[1]
USB_INTERFACE_DESCRIPTOR InterfaceDescriptor
PUSB_BUSIFFN_GET_DEVICE_BUSCONTEXT GetDeviceBusContext
PUSB_BUSIFFN_GET_EXTENDED_HUB_INFO GetExtendedHubInformation
PUSB_BUSIFFN_INITIALIZE_USB_DEVICE InitializeUsbDevice
PUSB_BUSIFFN_GET_USB_DESCRIPTORS GetUsbDescriptors
PUSB_BUSIFFN_FLUSH_TRANSFERS FlushTransfers
PUSB_BUSIFFN_GET_DEVICE_INFORMATION QueryDeviceInformation
PUSB_BUSIFFN_SET_DEVHANDLE_DATA SetDeviceHandleData
PUSB_BUSIFFN_INITIALIZE_20HUB Initialize20Hub
PUSB_BUSIFFN_GET_CONTROLLER_INFORMATION GetControllerInformation
PUSB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND ControllerSelectiveSuspend
PUSB_BUSIFFN_REMOVE_USB_DEVICE RemoveUsbDevice
PINTERFACE_DEREFERENCE InterfaceDereference
PUSB_BUSIFFN_CREATE_USB_DEVICE CreateUsbDevice
PUSB_BUSIFFN_RESTORE_DEVICE RestoreUsbDevice
PINTERFACE_REFERENCE InterfaceReference
PUSB_BUSIFFN_ROOTHUB_INIT_NOTIFY RootHubInitNotification
PUSB_BUSIFFN_GET_ROOTHUB_SYM_NAME GetRootHubSymbolicName
PUSB_BUSIFFN_IS_DEVICE_HIGH_SPEED IsDeviceHighSpeed
PINTERFACE_REFERENCE InterfaceReference
PUSB_BUSIFFN_QUERY_BUS_TIME QueryBusTime
PUSB_BUSIFFN_ENUM_LOG_ENTRY EnumLogEntry
PUSB_BUSIFFN_SUBMIT_ISO_OUT_URB SubmitIsoOutUrb
PUSB_BUSIFFN_GETUSBDI_VERSION GetUSBDIVersion
PINTERFACE_DEREFERENCE InterfaceDereference
PUSB_BUSIFFN_QUERY_BUS_INFORMATION QueryBusInformation
UCHAR bConfigurationValue
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define USB_CONFIGURATION_DESCRIPTOR_TYPE
NTSTATUS USB_BUSIFFN USBHI_RootHubInitNotification(IN PVOID BusContext, IN PVOID CallbackContext, IN PRH_INIT_CALLBACK CallbackFunction)
NTSTATUS USB_BUSIFFN USBHI_InitializeUsbDevice(IN PVOID BusContext, OUT PUSB_DEVICE_HANDLE UsbdDeviceHandle)
NTSTATUS USB_BUSIFFN USBHI_GetControllerInformation(IN PVOID BusContext, OUT PVOID ControllerInfoBuffer, IN ULONG ControllerInfoBufferLen, OUT PULONG LenDataReturned)
NTSTATUS USB_BUSIFFN USBDI_SubmitIsoOutUrb(IN PVOID BusContext, IN PURB Urb)
NTSTATUS USB_BUSIFFN USBHI_GetExtendedHubInformation(IN PVOID BusContext, IN PDEVICE_OBJECT HubPhysicalDeviceObject, IN OUT PVOID HubInformationBuffer, IN ULONG HubInfoLen, IN OUT PULONG LenDataReturned)
NTSTATUS USB_BUSIFFN USBHI_QueryDeviceInformation(IN PVOID BusContext, IN PUSB_DEVICE_HANDLE UsbdDeviceHandle, OUT PVOID DeviceInfoBuffer, IN ULONG DeviceInfoBufferLen, OUT PULONG LenDataReturned)
VOID USB_BUSIFFN USBHI_FlushTransfers(IN PVOID BusContext, OUT PUSB_DEVICE_HANDLE UsbdDeviceHandle)
VOID USB_BUSIFFN USBI_InterfaceDereference(IN PVOID BusContext)
NTSTATUS USB_BUSIFFN USBHI_GetRootHubSymbolicName(IN PVOID BusContext, IN OUT PVOID HubInfoBuffer, IN ULONG HubInfoBufferLen, OUT PULONG HubNameActualLen)
NTSTATUS USB_BUSIFFN USBHI_ControllerSelectiveSuspend(IN PVOID BusContext, IN BOOLEAN Enable)
NTSTATUS USB_BUSIFFN USBHI_GetUsbDescriptors(IN PVOID BusContext, IN PUSB_DEVICE_HANDLE UsbdDeviceHandle, IN PUCHAR DeviceDescBuffer, IN PULONG DeviceDescBufferLen, IN PUCHAR ConfigDescBuffer, IN PULONG ConfigDescBufferLen)
VOID USB_BUSIFFN USBDI_GetUSBDIVersion(IN PVOID BusContext, OUT PUSBD_VERSION_INFORMATION VersionInfo, OUT PULONG HcdCapabilities)
NTSTATUS USB_BUSIFFN USBHI_RemoveUsbDevice(IN PVOID BusContext, IN OUT PUSB_DEVICE_HANDLE UsbdDeviceHandle, IN ULONG Flags)
VOID USB_BUSIFFN USBHI_SetDeviceHandleData(IN PVOID BusContext, IN PVOID DeviceHandle, IN PDEVICE_OBJECT UsbDevicePdo)
NTSTATUS USB_BUSIFFN USBHI_Initialize20Hub(IN PVOID BusContext, IN PUSB_DEVICE_HANDLE UsbdHubDeviceHandle, IN ULONG TtCount)
NTSTATUS USB_BUSIFFN USBDI_EnumLogEntry(IN PVOID BusContext, IN ULONG DriverTag, IN ULONG EnumTag, IN ULONG P1, IN ULONG P2)
VOID USB_BUSIFFN USBI_InterfaceReference(IN PVOID BusContext)
NTSTATUS USB_BUSIFFN USBHI_CreateUsbDevice(IN PVOID BusContext, IN OUT PUSB_DEVICE_HANDLE *UsbdDeviceHandle, IN PUSB_DEVICE_HANDLE UsbdHubDeviceHandle, IN USHORT PortStatus, IN USHORT PortNumber)
NTSTATUS USB_BUSIFFN USBDI_QueryBusTime(IN PVOID BusContext, OUT PULONG CurrentFrame)
PVOID USB_BUSIFFN USBHI_GetDeviceBusContext(IN PVOID BusContext, IN PVOID DeviceHandle)
NTSTATUS USB_BUSIFFN USBDI_QueryBusInformation(IN PVOID BusContext, IN ULONG Level, OUT PVOID BusInfoBuffer, OUT PULONG BusInfoBufferLen, OUT PULONG BusInfoActualLen)
BOOLEAN USB_BUSIFFN USBDI_IsDeviceHighSpeed(IN PVOID BusContext)
NTSTATUS NTAPI USBPORT_PdoQueryInterface(IN PDEVICE_OBJECT FdoDevice, IN PDEVICE_OBJECT PdoDevice, IN PIRP Irp)
NTSTATUS USB_BUSIFFN USBHI_RestoreUsbDevice(IN PVOID BusContext, OUT PUSB_DEVICE_HANDLE OldUsbdDeviceHandle, OUT PUSB_DEVICE_HANDLE NewUsbdDeviceHandle)
#define USB_PORTATTR_NO_OVERCURRENT_UI
#define USB_PORTATTR_SHARED_USB2
#define USB_PORTATTR_OWNED_BY_CC
struct _USB_BUS_INTERFACE_USBDI_V2 * PUSB_BUS_INTERFACE_USBDI_V2
struct _USB_BUS_INFORMATION_LEVEL_0 USB_BUS_INFORMATION_LEVEL_0
struct _USB_BUS_INFORMATION_LEVEL_1 USB_BUS_INFORMATION_LEVEL_1
#define USB_MINIPORT_FLAGS_USB2
PDEVICE_OBJECT NTAPI USBPORT_FindUSB2Controller(IN PDEVICE_OBJECT FdoDevice)
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)
NTSTATUS NTAPI USBPORT_SetRegistryKeyValue(IN PDEVICE_OBJECT DeviceObject, IN BOOL UseDriverKey, IN ULONG Type, IN PCWSTR ValueNameString, IN PVOID Data, IN ULONG DataSize)
struct _USBPORT_DEVICE_HANDLE * PUSBPORT_DEVICE_HANDLE
#define PIPE_HANDLE_FLAG_NULL_PACKET_SIZE
#define USBPORT_FLAG_BIOS_DISABLE_SS
#define USBPORT_FLAG_COMPANION_HC
#define USBPORT_FLAG_SELECTIVE_SUSPEND
_In_ WDFUSBINTERFACE _In_ UCHAR _Out_opt_ PWDF_USB_PIPE_INFORMATION PipeInfo
#define IsEqualGUIDAligned(guid1, guid2)
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR _In_ ULONGLONG _In_ ULONGLONG _In_opt_ PEVENT_FILTER_DESCRIPTOR _Inout_opt_ PVOID CallbackContext
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
_Must_inspect_result_ _In_ ULONG Flags
_In_ PCALLBACK_FUNCTION CallbackFunction
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql