ReactOS 0.4.16-dev-297-gc569aee
|
#include <ntddk.h>
#include <windef.h>
#include <stdio.h>
#include <wmistr.h>
#include <wmilib.h>
#include <wdmguid.h>
#include <ntstrsafe.h>
#include <usb.h>
#include <usbioctl.h>
#include <hubbusif.h>
#include <usbbusif.h>
#include <usbdlib.h>
#include <ks.h>
#include <drivers/usbport/usbmport.h>
Go to the source code of this file.
Classes | |
struct | _USBHUB_PORT_DATA |
struct | _USBHUB_IO_WORK_ITEM |
struct | _COMMON_DEVICE_EXTENSION |
struct | _USBHUB_FDO_EXTENSION |
struct | _USBHUB_PORT_PDO_EXTENSION |
struct | _USBHUB_URB_TIMEOUT_CONTEXT |
struct | _USBHUB_STATUS_CHANGE_CONTEXT |
struct | _USBHUB_IDLE_HUB_CONTEXT |
struct | _USBHUB_IDLE_PORT_CONTEXT |
struct | _USBHUB_IDLE_PORT_CANCEL_CONTEXT |
struct | _USBHUB_RESET_PORT_CONTEXT |
Variables | |
PWSTR | GenericUSBDeviceString |
typedef struct _USBHUB_FDO_EXTENSION * PUSBHUB_FDO_EXTENSION |
typedef struct _USBHUB_IO_WORK_ITEM * PUSBHUB_IO_WORK_ITEM |
typedef struct _USBHUB_PORT_DATA * PUSBHUB_PORT_DATA |
typedef struct _USBHUB_PORT_DATA USBHUB_PORT_DATA |
NTSTATUS NTAPI DriverEntry | ( | IN PDRIVER_OBJECT | DriverObject, |
IN PUNICODE_STRING | RegistryPath | ||
) |
Definition at line 367 of file beep.c.
PUSBHUB_PORT_PDO_EXTENSION NTAPI PdoExt | ( | IN PDEVICE_OBJECT | DeviceObject | ) |
Definition at line 133 of file usbhub.c.
Referenced by _Requires_lock_held_(), DrvTestResources(), IsaPdoFilterResourceRequirements(), IsaPdoPnp(), IsaPdoQueryBusInformation(), IsaPdoQueryCapabilities(), IsaPdoQueryDeviceRelations(), IsaPdoQueryDeviceText(), IsaPdoQueryDeviceUsageNotification(), IsaPdoQueryId(), IsaPdoQueryPnpDeviceState(), IsaPdoQueryResourceRequirements(), IsaPdoQueryResources(), IsaPdoRemoveDevice(), IsaPdoStartReadPort(), IsaPnpCreateLogicalDeviceRequirements(), IsaPnpCreateLogicalDeviceResources(), IsaPnpCreateReadPortDO(), IsaPnpFillDeviceRelations(), IsaPnpRemoveLogicalDeviceDO(), IsaReadPortRemoveDevice(), PcmciaPdoPlugPlay(), PcmciaPdoSetPowerState(), USBH_FdoQueryBusRelations(), USBH_FdoSurpriseRemoveDevice(), and USBH_PdoRemoveDevice().
NTSTATUS NTAPI USBD_CreateDeviceEx | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension, |
IN PUSB_DEVICE_HANDLE * | OutDeviceHandle, | ||
IN USB_PORT_STATUS | UsbPortStatus, | ||
IN USHORT | Port | ||
) |
Definition at line 2508 of file usbhub.c.
Referenced by USBH_CreateDevice(), and USBH_ResetDevice().
NTSTATUS NTAPI USBD_GetDeviceInformationEx | ( | IN PUSBHUB_PORT_PDO_EXTENSION | PortExtension, |
IN PUSBHUB_FDO_EXTENSION | HubExtension, | ||
IN PUSB_NODE_CONNECTION_INFORMATION_EX | Info, | ||
IN ULONG | Length, | ||
IN PUSB_DEVICE_HANDLE | DeviceHandle | ||
) |
Definition at line 2639 of file usbhub.c.
Referenced by USBH_IoctlGetNodeConnectionInformation().
NTSTATUS NTAPI USBD_InitializeDeviceEx | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension, |
IN PUSB_DEVICE_HANDLE | DeviceHandle, | ||
IN PUCHAR | DeviceDescriptorBuffer, | ||
IN ULONG | DeviceDescriptorBufferLength, | ||
IN PUCHAR | ConfigDescriptorBuffer, | ||
IN ULONG | ConfigDescriptorBufferLength | ||
) |
Definition at line 2562 of file usbhub.c.
Referenced by USBH_CreateDevice(), and USBH_ResetDevice().
NTSTATUS NTAPI USBD_RegisterRootHubCallBack | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension | ) |
Definition at line 2986 of file usbhub.c.
Referenced by USBH_StartHubFdoDevice().
NTSTATUS NTAPI USBD_RemoveDeviceEx | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension, |
IN PUSB_DEVICE_HANDLE | DeviceHandle, | ||
IN ULONG | Flags | ||
) |
Definition at line 2538 of file usbhub.c.
Referenced by USBH_CreateDevice(), USBH_FdoCleanup(), USBH_FdoQueryBusRelations(), USBH_PdoRemoveDevice(), USBH_ProcessPortStateChange(), USBH_ResetDevice(), and USBH_ResetPortWorker().
NTSTATUS NTAPI USBD_RestoreDeviceEx | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension, |
IN OUT PUSB_DEVICE_HANDLE | OldDeviceHandle, | ||
IN OUT PUSB_DEVICE_HANDLE | NewDeviceHandle | ||
) |
Definition at line 2761 of file usbhub.c.
Referenced by USBH_ResetDevice().
NTSTATUS NTAPI USBD_UnRegisterRootHubCallBack | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension | ) |
Definition at line 3008 of file usbhub.c.
Referenced by USBH_FdoCleanup().
NTSTATUS NTAPI USBH_AllocateWorkItem | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension, |
OUT PUSBHUB_IO_WORK_ITEM * | OutHubIoWorkItem, | ||
IN PUSBHUB_WORKER_ROUTINE | WorkerRoutine, | ||
IN SIZE_T | BufferLength, | ||
OUT PVOID * | OutHubWorkItemBuffer, | ||
IN WORK_QUEUE_TYPE | Type | ||
) |
Definition at line 4242 of file usbhub.c.
Referenced by USBH_GetSerialNumberString(), and USBH_PdoQueryDeviceText().
VOID NTAPI USBH_CheckHubIdle | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension | ) |
Definition at line 3808 of file usbhub.c.
Referenced by USBH_ChangeIndicationWorker(), USBH_CheckIdleWorker(), and USBH_DeviceControl().
BOOLEAN NTAPI USBH_CheckIdleAbort | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension, |
IN BOOLEAN | IsWait, | ||
IN BOOLEAN | IsExtCheck | ||
) |
Definition at line 3221 of file usbhub.c.
Referenced by USBH_FdoIdleNotificationCallback(), and USBH_FdoPower().
VOID NTAPI USBH_CheckIdleDeferred | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension | ) |
Definition at line 3957 of file usbhub.c.
Referenced by USBH_FdoDeferPoRequestCompletion(), USBH_FdoPnP(), USBH_FdoPower(), USBH_PdoRemoveDevice(), and USBH_PortIdleNotificationRequest().
Definition at line 63 of file usbhub.c.
Referenced by USBH_DeviceControl(), USBH_FdoDispatch(), USBH_FdoQueryBusRelations(), USBH_FdoStartDevice(), USBH_IoctlGetDescriptor(), USBH_IoctlGetHubCapabilities(), USBH_IoctlGetNodeConnectionAttributes(), USBH_IoctlGetNodeConnectionDriverKeyName(), USBH_IoctlGetNodeConnectionInformation(), USBH_IoctlGetNodeInformation(), USBH_IoctlGetNodeName(), USBH_PdoDispatch(), USBH_PdoInternalControl(), USBH_PdoIoctlGetPortStatus(), USBH_PdoIoctlResetPort(), USBH_PdoUrbFilter(), USBH_ResetPortWorker(), and USBH_StartHubFdoDevice().
VOID NTAPI USBH_CompletePowerIrp | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension, |
IN PIRP | Irp, | ||
IN NTSTATUS | NtStatus | ||
) |
Definition at line 18 of file power.c.
Referenced by USBH_FdoCleanup(), and USBH_PdoRemoveDevice().
NTSTATUS NTAPI USBH_CreateDevice | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension, |
IN USHORT | Port, | ||
IN USB_PORT_STATUS | UsbPortStatus, | ||
IN ULONG | IsWait | ||
) |
Definition at line 4379 of file usbhub.c.
Referenced by USBH_FdoQueryBusRelations().
Definition at line 1136 of file ioctl.c.
Referenced by USBH_FdoDispatch().
Definition at line 2362 of file pnp.c.
Referenced by USBH_FdoDispatch().
Definition at line 460 of file power.c.
Referenced by USBH_FdoDispatch().
Definition at line 355 of file usbhub.c.
Referenced by USBH_AbortInterruptPipe(), USBH_GetDeviceDescriptor(), USBH_OpenConfiguration(), USBH_ResetInterruptPipe(), USBH_SyncGetDeviceConfigurationDescriptor(), USBH_SyncGetStatus(), and USBH_Transact().
VOID NTAPI USBH_FreeWorkItem | ( | IN PUSBHUB_IO_WORK_ITEM | HubIoWorkItem | ) |
Definition at line 2937 of file usbhub.c.
Referenced by USBH_ChangeIndicationProcessChange().
NTSTATUS NTAPI USBH_GetConfigurationDescriptor | ( | IN PDEVICE_OBJECT | DeviceObject, |
IN PUSB_CONFIGURATION_DESCRIPTOR * | pConfigurationDescriptor | ||
) |
Definition at line 974 of file usbhub.c.
Referenced by USBH_ProcessDeviceInformation(), and USBH_StartHubFdoDevice().
NTSTATUS NTAPI USBH_GetDeviceDescriptor | ( | IN PDEVICE_OBJECT | DeviceObject, |
IN PUSB_DEVICE_DESCRIPTOR | HubDeviceDescriptor | ||
) |
Definition at line 877 of file usbhub.c.
Referenced by USBH_StartHubFdoDevice().
NTSTATUS NTAPI USBH_GetDeviceType | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension, |
IN PUSB_DEVICE_HANDLE | DeviceHandle, | ||
OUT USB_DEVICE_TYPE * | OutDeviceType | ||
) |
Definition at line 608 of file usbhub.c.
Referenced by USBH_StartHubFdoDevice().
PUSBHUB_FDO_EXTENSION NTAPI USBH_GetRootHubExtension | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension | ) |
Definition at line 699 of file usbhub.c.
Referenced by USBH_CheckHubIdle(), USBH_FdoPower(), and USBH_HubSetD0().
Definition at line 3206 of file usbhub.c.
Referenced by USBH_FdoCleanup(), USBH_FdoIdleNotificationCallback(), USBH_HubQueuePortIdleIrps(), and USBH_PortIdleNotificationCancelRoutine().
Definition at line 43 of file power.c.
Referenced by USBH_FdoCleanup().
VOID NTAPI USBH_HubCompletePortWakeIrps | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension, |
IN NTSTATUS | NtStatus | ||
) |
Definition at line 217 of file power.c.
Referenced by USBH_FdoCleanup(), and USBH_FdoPoRequestD0Completion().
BOOLEAN NTAPI USBH_HubIsBusPowered | ( | IN PDEVICE_OBJECT | DeviceObject, |
IN PUSB_CONFIGURATION_DESCRIPTOR | HubConfigDescriptor | ||
) |
Definition at line 1589 of file usbhub.c.
Referenced by USBH_IoctlGetNodeInformation(), and USBH_StartHubFdoDevice().
NTSTATUS NTAPI USBH_HubSetD0 | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension | ) |
Definition at line 77 of file power.c.
Referenced by USBH_DeviceControl(), USBH_FdoPnP(), USBH_IdleCancelPowerHubWorker(), USBH_IdleCompletePowerHubWorker(), and USBH_PdoRemoveDevice().
VOID NTAPI USBH_IdleCancelPowerHubWorker | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension, |
IN PVOID | Context | ||
) |
Definition at line 135 of file power.c.
Referenced by USBH_PortIdleNotificationCancelRoutine().
Definition at line 79 of file usbhub.c.
Referenced by USBH_DeviceControl(), USBH_FdoDispatch(), USBH_FdoPnP(), USBH_FdoQueryBusRelations(), USBH_FdoRemoveDevice(), USBH_PdoInternalControl(), USBH_PdoIoctlSubmitUrb(), USBH_PdoPnP(), and USBH_PdoUrbFilter().
Definition at line 1280 of file ioctl.c.
Referenced by USBH_PdoDispatch().
NTSTATUS NTAPI USBH_PdoPnP | ( | IN PUSBHUB_PORT_PDO_EXTENSION | PortExtension, |
IN PIRP | Irp, | ||
IN UCHAR | Minor, | ||
OUT BOOLEAN * | IsCompleteIrp | ||
) |
Definition at line 2594 of file pnp.c.
Referenced by USBH_PdoDispatch().
NTSTATUS NTAPI USBH_PdoPower | ( | IN PUSBHUB_PORT_PDO_EXTENSION | PortExtension, |
IN PIRP | Irp, | ||
IN UCHAR | Minor | ||
) |
NTSTATUS NTAPI USBH_PdoRemoveDevice | ( | IN PUSBHUB_PORT_PDO_EXTENSION | PortExtension, |
IN PUSBHUB_FDO_EXTENSION | HubExtension | ||
) |
Definition at line 2180 of file pnp.c.
Referenced by USBH_FdoRemoveDevice(), and USBH_PdoPnP().
VOID NTAPI USBH_QueueWorkItem | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension, |
IN PUSBHUB_IO_WORK_ITEM | HubIoWorkItem | ||
) |
Definition at line 2917 of file usbhub.c.
Referenced by USBH_ChangeIndicationProcessChange(), USBH_ChangeIndicationQueryChange(), USBH_CheckIdleDeferred(), USBH_FdoIdleNotificationRequestComplete(), USBH_PdoIoctlResetPort(), and USBH_PortIdleNotificationCancelRoutine().
NTSTATUS NTAPI USBH_ResetDevice | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension, |
IN USHORT | Port, | ||
IN BOOLEAN | IsKeepDeviceData, | ||
IN BOOLEAN | IsWait | ||
) |
Definition at line 4615 of file usbhub.c.
Referenced by USBH_ResetPortWorker(), and USBH_RestoreDevice().
NTSTATUS NTAPI USBH_SetPdoRegistryParameter | ( | IN PDEVICE_OBJECT | DeviceObject, |
IN PCWSTR | SourceString, | ||
IN PVOID | Data, | ||
IN ULONG | DataSize, | ||
IN ULONG | Type, | ||
IN ULONG | DevInstKeyType | ||
) |
Definition at line 213 of file usbhub.c.
Referenced by USBH_SymbolicLink().
NTSTATUS NTAPI USBH_SubmitStatusChangeTransfer | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension | ) |
Definition at line 2442 of file usbhub.c.
Referenced by USBH_ChangeIndicationAckChangeComplete(), USBH_ChangeIndicationWorker(), USBH_FdoPower(), USBH_PowerIrpCompletion(), USBH_StartHubFdoDevice(), and USBHUB_RootHubCallBack().
NTSTATUS NTAPI USBH_SyncClearPortStatus | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension, |
IN USHORT | Port, | ||
IN USHORT | RequestValue | ||
) |
Definition at line 1442 of file usbhub.c.
Referenced by USBH_ProcessPortStateChange(), and USBH_StartHubFdoDevice().
Definition at line 1553 of file usbhub.c.
Referenced by USBH_FdoCleanup(), USBH_FdoQueryBusRelations(), USBH_PdoRemoveDevice(), USBH_ProcessPortStateChange(), and USBH_ResetDevice().
PUSB_DEVICE_HANDLE NTAPI USBH_SyncGetDeviceHandle | ( | IN PDEVICE_OBJECT | DeviceObject | ) |
Definition at line 832 of file usbhub.c.
Referenced by USBD_CreateDeviceEx(), USBD_Initialize20Hub(), and USBH_StartHubFdoDevice().
Definition at line 781 of file usbhub.c.
Referenced by USBH_PdoInternalControl(), and USBH_StartHubFdoDevice().
NTSTATUS NTAPI USBH_SyncGetHubDescriptor | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension | ) |
Definition at line 1048 of file usbhub.c.
Referenced by USBH_StartHubFdoDevice().
NTSTATUS NTAPI USBH_SyncGetPortStatus | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension, |
IN USHORT | Port, | ||
IN PUSB_PORT_STATUS_AND_CHANGE | PortStatus, | ||
IN ULONG | Length | ||
) |
Definition at line 1414 of file usbhub.c.
Referenced by USBH_ChangeIndicationWorker(), USBH_FdoQueryBusRelations(), USBH_PdoIoctlGetPortStatus(), USBH_ResetDevice(), USBH_RestoreDevice(), and USBH_SyncResetPort().
NTSTATUS NTAPI USBH_SyncGetRootHubPdo | ( | IN PDEVICE_OBJECT | DeviceObject, |
IN OUT PDEVICE_OBJECT * | OutPdo1, | ||
IN OUT PDEVICE_OBJECT * | OutPdo2 | ||
) |
Definition at line 728 of file usbhub.c.
Referenced by USBH_FdoStartDevice(), and USBH_StartHubFdoDevice().
NTSTATUS NTAPI USBH_SyncGetStringDescriptor | ( | IN PDEVICE_OBJECT | DeviceObject, |
IN UCHAR | Index, | ||
IN USHORT | LanguageId, | ||
IN PUSB_STRING_DESCRIPTOR | Descriptor, | ||
IN ULONG | NumberOfBytes, | ||
IN PULONG | OutLength, | ||
IN BOOLEAN | IsValidateLength | ||
) |
Definition at line 1248 of file usbhub.c.
Referenced by USBH_CheckDeviceLanguage(), USBH_GetSerialNumberString(), and USBH_PdoQueryDeviceText().
NTSTATUS NTAPI USBH_SyncPowerOnPorts | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension | ) |
Definition at line 1522 of file usbhub.c.
Referenced by USBH_StartHubFdoDevice().
Definition at line 471 of file usbhub.c.
Referenced by USBH_CreateDevice(), USBH_FdoQueryBusRelations(), and USBH_ResetDevice().
Definition at line 250 of file usbhub.c.
Referenced by USBH_FdoSyncSubmitUrb(), USBH_IoctlGetDescriptor(), USBH_SyncGetDeviceConfigurationDescriptor(), and USBH_SyncGetStringDescriptor().
Definition at line 23 of file usbhub.c.
Referenced by USBH_CreateDevice(), USBH_FdoQueryBusRelations(), USBH_HubSetD0(), USBH_ResetDevice(), USBH_RestoreDevice(), USBH_SyncPowerOnPort(), USBH_SyncPowerOnPorts(), and USBH_SyncResetPort().
Definition at line 153 of file usbhub.c.
Referenced by USBH_StartHubFdoDevice().
VOID NTAPI USBHUB_DumpingConfiguration | ( | IN PUSB_CONFIGURATION_DESCRIPTOR | ConfigDescriptor | ) |
Definition at line 41 of file debug.c.
Referenced by USBH_ProcessDeviceInformation().
VOID NTAPI USBHUB_DumpingDeviceDescriptor | ( | IN PUSB_DEVICE_DESCRIPTOR | DeviceDescriptor | ) |
Definition at line 15 of file debug.c.
Referenced by USBH_ProcessDeviceInformation().
Definition at line 112 of file debug.c.
Referenced by USBH_PdoQueryId().
VOID NTAPI USBHUB_FlushAllTransfers | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension | ) |
Definition at line 2623 of file usbhub.c.
Referenced by USBH_PdoRemoveDevice().
VOID NTAPI USBHUB_SetDeviceHandleData | ( | IN PUSBHUB_FDO_EXTENSION | HubExtension, |
IN PDEVICE_OBJECT | UsbDevicePdo, | ||
IN PVOID | DeviceHandle | ||
) |
Definition at line 2601 of file usbhub.c.
Referenced by USBH_PdoStartDevice().
|
extern |
Definition at line 19 of file usbhub.c.
Referenced by DriverEntry(), USBH_DriverUnload(), and USBH_PdoQueryDeviceText().