ReactOS 0.4.16-dev-336-gb667d82
|
#include <ntifs.h>
#include <windef.h>
#include <stdio.h>
#include <wdmguid.h>
#include <ntstrsafe.h>
#include <usb.h>
#include <hubbusif.h>
#include <usbbusif.h>
#include <usbdlib.h>
#include <usbuser.h>
#include <drivers/usbport/usbmport.h>
Go to the source code of this file.
Classes | |
struct | _USBPORT_COMMON_BUFFER_HEADER |
struct | _USBPORT_PIPE_HANDLE |
struct | _USBPORT_CONFIGURATION_HANDLE |
struct | _USBPORT_INTERFACE_HANDLE |
struct | _USBPORT_DEVICE_HANDLE |
struct | _USBPORT_ENDPOINT |
struct | _USBPORT_TRANSFER |
struct | _USBPORT_IRP_TABLE |
struct | _USBPORT_COMMON_DEVICE_EXTENSION |
struct | _USBPORT_DEVICE_EXTENSION |
struct | _USBPORT_RH_DESCRIPTORS |
struct | _USBPORT_RHDEVICE_EXTENSION |
struct | _USBPORT_ASYNC_CALLBACK_DATA |
struct | _TIMER_WORK_QUEUE_ITEM |
union | _USB2_TT_ENDPOINT_PARAMS |
union | _USB2_TT_ENDPOINT_NUMS |
struct | _USB2_TT_ENDPOINT |
struct | _USB2_FRAME_BUDGET |
struct | _USB2_TT |
struct | _USB2_TT_EXTENSION |
struct | _USB2_HC_EXTENSION |
struct | _USB2_REBALANCE |
Variables | |
KSPIN_LOCK | USBPORT_SpinLock |
LIST_ENTRY | USBPORT_MiniPortDrivers |
#define USB2_MAX_MICROFRAMES (USB2_FRAMES * USB2_MICROFRAMES) |
#define USBPORT_RECIPIENT_HUB BMREQUEST_TO_DEVICE |
#define USBPORT_RECIPIENT_PORT BMREQUEST_TO_OTHER |
typedef struct _USB2_FRAME_BUDGET * PUSB2_FRAME_BUDGET |
typedef struct _USB2_HC_EXTENSION * PUSB2_HC_EXTENSION |
typedef struct _USB2_REBALANCE * PUSB2_REBALANCE |
typedef struct _USB2_TT_ENDPOINT * PUSB2_TT_ENDPOINT |
typedef struct _USB2_TT_EXTENSION * PUSB2_TT_EXTENSION |
typedef USBD_STATUS* PUSBD_STATUS |
typedef struct _USBPORT_ENDPOINT * PUSBPORT_ENDPOINT |
typedef struct _USBPORT_IRP_TABLE * PUSBPORT_IRP_TABLE |
typedef struct _USBPORT_ISO_BLOCK* PUSBPORT_ISO_BLOCK |
typedef struct _USBPORT_PIPE_HANDLE * PUSBPORT_PIPE_HANDLE |
typedef struct _USBPORT_TRANSFER * PUSBPORT_TRANSFER |
typedef struct _USB2_REBALANCE USB2_REBALANCE |
typedef struct _USB2_TT_ENDPOINT USB2_TT_ENDPOINT |
typedef union _USB2_TT_ENDPOINT_NUMS USB2_TT_ENDPOINT_NUMS |
typedef union _USB2_TT_ENDPOINT_PARAMS USB2_TT_ENDPOINT_PARAMS |
typedef struct _USBPORT_ENDPOINT USBPORT_ENDPOINT |
typedef struct _USBPORT_TRANSFER USBPORT_TRANSFER |
C_ASSERT | ( | sizeof(USB2_TT_ENDPOINT_NUMS) | = =sizeof(ULONG) | ) |
C_ASSERT | ( | sizeof(USB2_TT_ENDPOINT_PARAMS) | = =sizeof(ULONG) | ) |
C_ASSERT | ( | sizeof(USBPORT_ASYNC_CALLBACK_DATA) | = =16+18 *sizeof(PVOID) | ) |
C_ASSERT | ( | sizeof(USBPORT_DEVICE_EXTENSION) | = =0x500 | ) |
VOID NTAPI MiniportCloseEndpoint | ( | IN PDEVICE_OBJECT | FdoDevice, |
IN PUSBPORT_ENDPOINT | Endpoint | ||
) |
Definition at line 549 of file endpoint.c.
Referenced by USBPORT_DeleteEndpoint(), USBPORT_ReopenPipe(), and USBPORT_RestoreDevice().
MPSTATUS NTAPI MiniportOpenEndpoint | ( | IN PDEVICE_OBJECT | FdoDevice, |
IN PUSBPORT_ENDPOINT | Endpoint | ||
) |
Definition at line 722 of file endpoint.c.
Referenced by USBPORT_OpenPipe(), USBPORT_ReopenPipe(), and USBPORT_RestoreDevice().
VOID NTAPI USB2_InitController | ( | IN PUSB2_HC_EXTENSION | HcExtension | ) |
Definition at line 2217 of file usb2.c.
Referenced by USBPORT_AddDevice().
Definition at line 2160 of file usb2.c.
Referenced by USB2_InitController(), and USBPORT_InitializeTT().
VOID NTAPI USBPORT_AbortEndpoint | ( | IN PDEVICE_OBJECT | FdoDevice, |
IN PUSBPORT_ENDPOINT | Endpoint, | ||
IN PIRP | Irp | ||
) |
Definition at line 1354 of file queue.c.
Referenced by USBPORT_AbortPipe(), and USBPORT_AbortTransfers().
Definition at line 214 of file queue.c.
Referenced by USBPORT_StartDevice().
Definition at line 91 of file queue.c.
Referenced by USBPORT_StartDevice().
VOID NTAPI USBPORT_AddDeviceHandle | ( | IN PDEVICE_OBJECT | FdoDevice, |
IN PUSBPORT_DEVICE_HANDLE | DeviceHandle | ||
) |
Definition at line 769 of file device.c.
Referenced by USBPORT_CreateDevice(), and USBPORT_RootHubCreateDevice().
VOID NTAPI USBPORT_AddPipeHandle | ( | IN PUSBPORT_DEVICE_HANDLE | DeviceHandle, |
IN PUSBPORT_PIPE_HANDLE | PipeHandle | ||
) |
Definition at line 444 of file endpoint.c.
Referenced by USBPORT_OpenPipe(), and USBPORT_RestoreDevice().
VOID NTAPI USBPORT_AddUSB1Fdo | ( | IN PDEVICE_OBJECT | FdoDevice | ) |
Definition at line 66 of file usbport.c.
Referenced by USBPORT_FdoPnP().
VOID NTAPI USBPORT_AddUSB2Fdo | ( | IN PDEVICE_OBJECT | FdoDevice | ) |
Definition at line 82 of file usbport.c.
Referenced by USBPORT_FdoPnP().
VOID NTAPI USBPORT_AdjustDeviceCapabilities | ( | IN PDEVICE_OBJECT | FdoDevice, |
IN PDEVICE_OBJECT | PdoDevice | ||
) |
Definition at line 668 of file power.c.
Referenced by USBPORT_CreatePdo().
BOOLEAN NTAPI USBPORT_AllocateBandwidthUSB2 | ( | IN PDEVICE_OBJECT | FdoDevice, |
IN PUSBPORT_ENDPOINT | Endpoint | ||
) |
Definition at line 1799 of file usb2.c.
Referenced by USBPORT_OpenPipe().
PUSBPORT_COMMON_BUFFER_HEADER NTAPI USBPORT_AllocateCommonBuffer | ( | IN PDEVICE_OBJECT | FdoDevice, |
IN SIZE_T | BufferLength | ||
) |
Definition at line 1708 of file usbport.c.
Referenced by USBPORT_OpenPipe(), USBPORT_ReopenPipe(), and USBPORT_StartDevice().
USBD_STATUS NTAPI USBPORT_AllocateTransfer | ( | IN PDEVICE_OBJECT | FdoDevice, |
IN PURB | Urb, | ||
IN PUSBPORT_DEVICE_HANDLE | DeviceHandle, | ||
IN PIRP | Irp, | ||
IN PRKEVENT | Event | ||
) |
Definition at line 2543 of file usbport.c.
Referenced by USBPORT_SendSetupPacket(), and USBPORT_ValidateURB().
ULONG NTAPI USBPORT_AssertFailure | ( | PVOID | MiniPortExtension, |
PVOID | FailedAssertion, | ||
PVOID | FileName, | ||
ULONG | LineNumber, | ||
PCHAR | Message | ||
) |
Definition at line 38 of file debug.c.
Referenced by USBPORT_RegisterUSBPortDriver().
VOID NTAPI USBPORT_BadRequestFlush | ( | IN PDEVICE_OBJECT | FdoDevice | ) |
Definition at line 1328 of file queue.c.
Referenced by USBHI_FlushTransfers(), and USBPORT_TimerDpc().
Definition at line 529 of file queue.c.
Referenced by USBPORT_FlushPendingTransfers().
VOID NTAPI USBPORT_CancelSplitTransfer | ( | IN PUSBPORT_TRANSFER | SplitTransfer | ) |
Definition at line 314 of file trfsplit.c.
Referenced by USBPORT_DmaEndpointPaused().
VOID NTAPI USBPORT_ClosePipe | ( | IN PUSBPORT_DEVICE_HANDLE | DeviceHandle, |
IN PDEVICE_OBJECT | FdoDevice, | ||
IN PUSBPORT_PIPE_HANDLE | PipeHandle | ||
) |
Definition at line 590 of file endpoint.c.
Referenced by USBPORT_CloseConfiguration(), USBPORT_CreateDevice(), USBPORT_HandleSelectInterface(), USBPORT_RemoveDevice(), and USBPORT_RestoreDevice().
Definition at line 246 of file queue.c.
Referenced by USBPORT_StartDevice().
Definition at line 123 of file queue.c.
Referenced by USBPORT_StartDevice().
ULONG NTAPI USBPORT_CompleteIsoTransfer | ( | IN PVOID | MiniPortExtension, |
IN PVOID | MiniPortEndpoint, | ||
IN PVOID | TransferParameters, | ||
IN ULONG | TransferLength | ||
) |
Definition at line 25 of file iso.c.
Referenced by USBPORT_RegisterUSBPortDriver().
VOID NTAPI USBPORT_CompletePdoWaitWake | ( | IN PDEVICE_OBJECT | FdoDevice | ) |
Definition at line 15 of file power.c.
Referenced by USBPORT_HcWakeDpc(), USBPORT_IsrDpc(), and USBPORT_PdoDevicePowerState().
Definition at line 2198 of file usbport.c.
Referenced by USBPORT_CancelPendingTransferIrp(), USBPORT_DoneTransfer(), USBPORT_FlushCancelList(), USBPORT_FlushPendingTransfers(), and USBPORT_QueuePendingTransferIrp().
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 | ||
) |
Definition at line 982 of file device.c.
Referenced by USBHI_CreateUsbDevice().
NTSTATUS NTAPI USBPORT_CreateWorkerThread | ( | IN PDEVICE_OBJECT | FdoDevice | ) |
Definition at line 1427 of file usbport.c.
Referenced by USBPORT_StartDevice().
Definition at line 19 of file debug.c.
Referenced by USBPORT_RegisterUSBPortDriver().
Definition at line 545 of file power.c.
Referenced by USBPORT_TimerDpc().
VOID NTAPI USBPORT_DoneSplitTransfer | ( | IN PUSBPORT_TRANSFER | SplitTransfer | ) |
Definition at line 278 of file trfsplit.c.
Referenced by USBPORT_FlushDoneTransfers().
VOID NTAPI USBPORT_DoneTransfer | ( | IN PUSBPORT_TRANSFER | Transfer | ) |
Definition at line 724 of file usbport.c.
Referenced by USBPORT_DoneSplitTransfer(), and USBPORT_FlushDoneTransfers().
VOID NTAPI USBPORT_DoSetPowerD0 | ( | IN PDEVICE_OBJECT | FdoDevice | ) |
Definition at line 104 of file power.c.
Referenced by USBPORT_WorkerThread().
VOID NTAPI USBPORT_DpcHandler | ( | IN PDEVICE_OBJECT | FdoDevice | ) |
Definition at line 864 of file usbport.c.
Referenced by USBPORT_IsrDpcHandler(), and USBPORT_WorkerRequestDpc().
VOID NTAPI USBPORT_DumpingCapabilities | ( | IN PDEVICE_CAPABILITIES | Capabilities | ) |
Definition at line 170 of file debug.c.
Referenced by USBPORT_QueryCapabilities().
VOID NTAPI USBPORT_DumpingConfiguration | ( | IN PUSB_CONFIGURATION_DESCRIPTOR | ConfigDescriptor | ) |
Definition at line 105 of file debug.c.
Referenced by USBPORT_HandleSelectConfiguration().
VOID NTAPI USBPORT_DumpingDeviceDescriptor | ( | IN PUSB_DEVICE_DESCRIPTOR | DeviceDescriptor | ) |
Definition at line 79 of file debug.c.
Referenced by USBHI_GetUsbDescriptors(), and USBHI_QueryDeviceInformation().
VOID NTAPI USBPORT_DumpingEndpointProperties | ( | IN PUSBPORT_ENDPOINT_PROPERTIES | EndpointProperties | ) |
Definition at line 257 of file debug.c.
Referenced by USBPORT_GetDeviceHwIds().
VOID NTAPI USBPORT_DumpingSetupPacket | ( | IN PUSB_DEFAULT_PIPE_SETUP_PACKET | SetupPacket | ) |
Definition at line 212 of file debug.c.
Referenced by USBPORT_DumpingURB(), USBPORT_HandleGetConfiguration(), USBPORT_HandleGetSetDescriptor(), USBPORT_HandleGetStatus(), USBPORT_HandleSetOrClearFeature(), and USBPORT_HandleVendorOrClass().
VOID NTAPI USBPORT_DumpingTtEndpoint | ( | IN PUSB2_TT_ENDPOINT | TtEndpoint | ) |
Definition at line 224 of file debug.c.
Referenced by USBPORT_CompleteTransfer(), USBPORT_ValidateTransferParametersURB(), and USBPORT_ValidateURB().
BOOLEAN NTAPI USBPORT_EndpointHasQueuedTransfers | ( | IN PDEVICE_OBJECT | FdoDevice, |
IN PUSBPORT_ENDPOINT | Endpoint, | ||
IN PULONG | TransferCount | ||
) |
Definition at line 254 of file endpoint.c.
Referenced by USBPORT_DeviceHasTransfers(), and USBPORT_FlushDoneTransfers().
Definition at line 1656 of file endpoint.c.
Referenced by USBPORT_DpcHandler(), USBPORT_FlushPendingTransfers(), USBPORT_MapTransfer(), and USBPORT_WorkerThreadHandler().
NTSTATUS NTAPI USBPORT_FdoDeviceControl | ( | PDEVICE_OBJECT | FdoDevice, |
PIRP | Irp | ||
) |
Definition at line 454 of file ioctl.c.
Referenced by USBPORT_Dispatch().
Definition at line 1110 of file pnp.c.
Referenced by USBPORT_Dispatch().
Definition at line 489 of file power.c.