[1166] | 1 | #pragma once
|
---|
| 2 |
|
---|
| 3 | #define _HUBBUSIF_
|
---|
| 4 |
|
---|
| 5 | #include "usbdi.h"
|
---|
| 6 |
|
---|
| 7 | #if (NTDDI_VERSION >= NTDDI_WINXP)
|
---|
| 8 |
|
---|
| 9 | #if !defined(_USBBUSIF_)
|
---|
| 10 | typedef PVOID PUSB_DEVICE_HANDLE;
|
---|
| 11 | #endif
|
---|
| 12 |
|
---|
| 13 | typedef struct _ROOTHUB_PDO_EXTENSION {
|
---|
| 14 | ULONG Signature;
|
---|
| 15 | } ROOTHUB_PDO_EXTENSION, *PROOTHUB_PDO_EXTENSION;
|
---|
| 16 |
|
---|
| 17 | #define USBD_DEVHACK_SLOW_ENUMERATION 0x00000001
|
---|
| 18 | #define USBD_DEVHACK_DISABLE_SN 0x00000002
|
---|
| 19 | #define USBD_DEVHACK_SET_DIAG_ID 0x00000004
|
---|
| 20 |
|
---|
| 21 | #ifndef USB_BUSIFFN
|
---|
| 22 | #if defined(_ARM_)
|
---|
| 23 | #define USB_BUSIFFN
|
---|
| 24 | #else
|
---|
| 25 | #define USB_BUSIFFN __stdcall
|
---|
| 26 | #endif
|
---|
| 27 | #endif
|
---|
| 28 |
|
---|
| 29 | #define CD_ERR_V1 0x00000001
|
---|
| 30 |
|
---|
| 31 | #define ID_ERR_V1 0x00000001
|
---|
| 32 |
|
---|
| 33 | #define USBD_KEEP_DEVICE_DATA 0x00000001
|
---|
| 34 | #define USBD_MARK_DEVICE_BUSY 0x00000002
|
---|
| 35 |
|
---|
| 36 | #define USB_IDLE_NOT_READY 0
|
---|
| 37 | #define USB_IDLE_READY 1
|
---|
| 38 |
|
---|
| 39 | typedef
|
---|
| 40 | NTSTATUS
|
---|
| 41 | USB_BUSIFFN
|
---|
| 42 | USB_BUSIFFN_CREATE_USB_DEVICE (
|
---|
| 43 | IN PVOID BusContext,
|
---|
| 44 | OUT PUSB_DEVICE_HANDLE *NewDeviceHandle,
|
---|
| 45 | IN PUSB_DEVICE_HANDLE HubDeviceHandle,
|
---|
| 46 | IN USHORT PortStatus,
|
---|
| 47 | IN USHORT PortNumber);
|
---|
| 48 |
|
---|
| 49 | typedef USB_BUSIFFN_CREATE_USB_DEVICE *PUSB_BUSIFFN_CREATE_USB_DEVICE;
|
---|
| 50 |
|
---|
| 51 | typedef enum _USBPORT_CREATEDEV_ERROR {
|
---|
| 52 | CreateDevErrNotSet = 0,
|
---|
| 53 | CreateDevBadHubDevHandle,
|
---|
| 54 | CreateDevFailedAllocDevHandle,
|
---|
| 55 | CreateDevFailedOpenEndpoint,
|
---|
| 56 | CreateDevFailedAllocDsBuff,
|
---|
| 57 | CreateDevFailedGetDs,
|
---|
| 58 | CreateDevTtNotFound,
|
---|
| 59 | CreateDevBadDevHandlePtr
|
---|
| 60 | } USBPORT_CREATEDEV_ERROR;
|
---|
| 61 |
|
---|
| 62 | typedef struct _USB_CD_ERROR_INFORMATION {
|
---|
| 63 | ULONG Version;
|
---|
| 64 | USBPORT_CREATEDEV_ERROR PathError;
|
---|
| 65 | ULONG UlongArg1;
|
---|
| 66 | ULONG UlongArg2;
|
---|
| 67 | NTSTATUS NtStatus;
|
---|
| 68 | UCHAR XtraInfo[64];
|
---|
| 69 | } USB_CD_ERROR_INFORMATION, *PUSB_CD_ERROR_INFORMATION;
|
---|
| 70 |
|
---|
| 71 | typedef
|
---|
| 72 | NTSTATUS
|
---|
| 73 | USB_BUSIFFN
|
---|
| 74 | USB_BUSIFFN_CREATE_USB_DEVICE_EX (
|
---|
| 75 | IN PVOID BusContext,
|
---|
| 76 | OUT PUSB_DEVICE_HANDLE *NewDeviceHandle,
|
---|
| 77 | IN PUSB_DEVICE_HANDLE HsHubDeviceHandle,
|
---|
| 78 | IN USHORT PortStatus,
|
---|
| 79 | IN USHORT PortNumber,
|
---|
| 80 | OUT PUSB_CD_ERROR_INFORMATION CdErrorInfo,
|
---|
| 81 | IN USHORT TtPortNumber);
|
---|
| 82 |
|
---|
| 83 | typedef USB_BUSIFFN_CREATE_USB_DEVICE_EX *PUSB_BUSIFFN_CREATE_USB_DEVICE_EX;
|
---|
| 84 |
|
---|
| 85 | typedef struct _USB_PORT_PATH {
|
---|
| 86 | ULONG PortPathDepth;
|
---|
| 87 | ULONG PortPath[6];
|
---|
| 88 | } USB_PORT_PATH, *PUSB_PORT_PATH;
|
---|
| 89 |
|
---|
| 90 | typedef
|
---|
| 91 | NTSTATUS
|
---|
| 92 | USB_BUSIFFN
|
---|
| 93 | USB_BUSIFFN_CREATE_USB_DEVICE_V7 (
|
---|
| 94 | IN PVOID BusContext,
|
---|
| 95 | OUT PUSB_DEVICE_HANDLE *NewDeviceHandle,
|
---|
| 96 | IN PUSB_DEVICE_HANDLE HsHubDeviceHandle,
|
---|
| 97 | IN USHORT PortStatus,
|
---|
| 98 | IN PUSB_PORT_PATH PortPath,
|
---|
| 99 | OUT PUSB_CD_ERROR_INFORMATION CdErrorInfo,
|
---|
| 100 | IN USHORT TtPortNumber,
|
---|
| 101 | IN PDEVICE_OBJECT PdoDeviceObject,
|
---|
| 102 | IN PUNICODE_STRING PhysicalDeviceObjectName);
|
---|
| 103 |
|
---|
| 104 | typedef USB_BUSIFFN_CREATE_USB_DEVICE_V7 *PUSB_BUSIFFN_CREATE_USB_DEVICE_V7;
|
---|
| 105 |
|
---|
| 106 | typedef enum _USBPORT_INITDEV_ERROR {
|
---|
| 107 | InitDevErrNotSet = 0,
|
---|
| 108 | InitDevFailedSetAddress,
|
---|
| 109 | InitDevFailedPokeEndpoint,
|
---|
| 110 | InitDevBadDeviceDescriptor
|
---|
| 111 | } USBPORT_INITDEV_ERROR;
|
---|
| 112 |
|
---|
| 113 | typedef struct _USB_ID_ERROR_INFORMATION {
|
---|
| 114 | ULONG Version;
|
---|
| 115 | USBPORT_INITDEV_ERROR PathError;
|
---|
| 116 | ULONG Arg1;
|
---|
| 117 | ULONG UsbAddress;
|
---|
| 118 | NTSTATUS NtStatus;
|
---|
| 119 | USBD_STATUS UsbdStatus;
|
---|
| 120 | UCHAR XtraInfo[64];
|
---|
| 121 | } USB_ID_ERROR_INFORMATION, *PUSB_ID_ERROR_INFORMATION;
|
---|
| 122 |
|
---|
| 123 | typedef
|
---|
| 124 | NTSTATUS
|
---|
| 125 | USB_BUSIFFN
|
---|
| 126 | USB_BUSIFFN_INITIALIZE_USB_DEVICE (
|
---|
| 127 | IN PVOID BusContext,
|
---|
| 128 | IN OUT PUSB_DEVICE_HANDLE DeviceHandle);
|
---|
| 129 |
|
---|
| 130 | typedef USB_BUSIFFN_INITIALIZE_USB_DEVICE *PUSB_BUSIFFN_INITIALIZE_USB_DEVICE;
|
---|
| 131 |
|
---|
| 132 | typedef
|
---|
| 133 | NTSTATUS
|
---|
| 134 | USB_BUSIFFN
|
---|
| 135 | USB_BUSIFFN_INITIALIZE_USB_DEVICE_EX (
|
---|
| 136 | IN PVOID BusContext,
|
---|
| 137 | IN OUT PUSB_DEVICE_HANDLE DeviceHandle,
|
---|
| 138 | OUT PUSB_ID_ERROR_INFORMATION IdErrInfo);
|
---|
| 139 |
|
---|
| 140 | typedef USB_BUSIFFN_INITIALIZE_USB_DEVICE_EX *PUSB_BUSIFFN_INITIALIZE_USB_DEVICE_EX;
|
---|
| 141 |
|
---|
| 142 | typedef
|
---|
| 143 | NTSTATUS
|
---|
| 144 | USB_BUSIFFN
|
---|
| 145 | USB_BUSIFFN_REMOVE_USB_DEVICE (
|
---|
| 146 | IN PVOID BusContext,
|
---|
| 147 | IN OUT PUSB_DEVICE_HANDLE DeviceHandle,
|
---|
| 148 | IN ULONG Flags);
|
---|
| 149 |
|
---|
| 150 | typedef USB_BUSIFFN_REMOVE_USB_DEVICE *PUSB_BUSIFFN_REMOVE_USB_DEVICE;
|
---|
| 151 |
|
---|
| 152 | typedef
|
---|
| 153 | NTSTATUS
|
---|
| 154 | USB_BUSIFFN
|
---|
| 155 | USB_BUSIFFN_GET_USB_DESCRIPTORS (
|
---|
| 156 | IN PVOID BusContext,
|
---|
| 157 | IN OUT PUSB_DEVICE_HANDLE DeviceHandle,
|
---|
| 158 | OUT PUCHAR DeviceDescriptorBuffer,
|
---|
| 159 | IN OUT PULONG DeviceDescriptorBufferLength,
|
---|
| 160 | OUT PUCHAR ConfigDescriptorBuffer,
|
---|
| 161 | IN OUT PULONG ConfigDescriptorBufferLength);
|
---|
| 162 |
|
---|
| 163 | typedef USB_BUSIFFN_GET_USB_DESCRIPTORS *PUSB_BUSIFFN_GET_USB_DESCRIPTORS;
|
---|
| 164 |
|
---|
| 165 | typedef
|
---|
| 166 | NTSTATUS
|
---|
| 167 | USB_BUSIFFN
|
---|
| 168 | USB_BUSIFFN_RESTORE_DEVICE (
|
---|
| 169 | IN PVOID BusContext,
|
---|
| 170 | IN OUT PUSB_DEVICE_HANDLE OldDeviceHandle,
|
---|
| 171 | IN OUT PUSB_DEVICE_HANDLE NewDeviceHandle);
|
---|
| 172 |
|
---|
| 173 | typedef USB_BUSIFFN_RESTORE_DEVICE *PUSB_BUSIFFN_RESTORE_DEVICE;
|
---|
| 174 |
|
---|
| 175 | typedef
|
---|
| 176 | NTSTATUS
|
---|
| 177 | USB_BUSIFFN
|
---|
| 178 | USB_BUSIFFN_GET_POTRTHACK_FLAGS (
|
---|
| 179 | IN PVOID BusContext,
|
---|
| 180 | IN OUT PULONG Flags);
|
---|
| 181 |
|
---|
| 182 | typedef USB_BUSIFFN_GET_POTRTHACK_FLAGS *PUSB_BUSIFFN_GET_POTRTHACK_FLAGS;
|
---|
| 183 |
|
---|
| 184 | typedef
|
---|
| 185 | NTSTATUS
|
---|
| 186 | USB_BUSIFFN
|
---|
| 187 | USB_BUSIFFN_GET_DEVICE_INFORMATION (
|
---|
| 188 | IN PVOID BusContext,
|
---|
| 189 | IN PUSB_DEVICE_HANDLE DeviceHandle,
|
---|
| 190 | OUT PVOID DeviceInformationBuffer,
|
---|
| 191 | IN ULONG DeviceInformationBufferLength,
|
---|
| 192 | IN OUT PULONG LengthOfDataCopied);
|
---|
| 193 |
|
---|
| 194 | typedef USB_BUSIFFN_GET_DEVICE_INFORMATION *PUSB_BUSIFFN_GET_DEVICE_INFORMATION;
|
---|
| 195 |
|
---|
| 196 | typedef
|
---|
| 197 | NTSTATUS
|
---|
| 198 | USB_BUSIFFN
|
---|
| 199 | USB_BUSIFFN_GET_CONTROLLER_INFORMATION (
|
---|
| 200 | IN PVOID BusContext,
|
---|
| 201 | IN OUT PVOID ControllerInformationBuffer,
|
---|
| 202 | IN ULONG ControllerInformationBufferLength,
|
---|
| 203 | IN OUT PULONG LengthOfDataCopied);
|
---|
| 204 |
|
---|
| 205 | typedef USB_BUSIFFN_GET_CONTROLLER_INFORMATION *PUSB_BUSIFFN_GET_CONTROLLER_INFORMATION;
|
---|
| 206 |
|
---|
| 207 | typedef
|
---|
| 208 | NTSTATUS
|
---|
| 209 | USB_BUSIFFN
|
---|
| 210 | USB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND (
|
---|
| 211 | IN PVOID BusContext,
|
---|
| 212 | IN BOOLEAN Enable);
|
---|
| 213 |
|
---|
| 214 | typedef USB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND *PUSB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND;
|
---|
| 215 |
|
---|
| 216 | typedef
|
---|
| 217 | NTSTATUS
|
---|
| 218 | USB_BUSIFFN
|
---|
| 219 | USB_BUSIFFN_GET_EXTENDED_HUB_INFO (
|
---|
| 220 | IN PVOID BusContext,
|
---|
| 221 | IN PDEVICE_OBJECT HubPhysicalDeviceObject,
|
---|
| 222 | IN PVOID HubInformationBuffer,
|
---|
| 223 | IN ULONG HubInformationBufferLength,
|
---|
| 224 | OUT PULONG LengthOfDataCopied);
|
---|
| 225 |
|
---|
| 226 | typedef USB_BUSIFFN_GET_EXTENDED_HUB_INFO *PUSB_BUSIFFN_GET_EXTENDED_HUB_INFO;
|
---|
| 227 |
|
---|
| 228 | typedef
|
---|
| 229 | NTSTATUS
|
---|
| 230 | USB_BUSIFFN
|
---|
| 231 | USB_BUSIFFN_GET_ROOTHUB_SYM_NAME (
|
---|
| 232 | IN PVOID BusContext,
|
---|
| 233 | IN PVOID HubSymNameBuffer,
|
---|
| 234 | IN ULONG HubSymNameBufferLength,
|
---|
| 235 | OUT PULONG HubSymNameActualLength);
|
---|
| 236 |
|
---|
| 237 | typedef USB_BUSIFFN_GET_ROOTHUB_SYM_NAME *PUSB_BUSIFFN_GET_ROOTHUB_SYM_NAME;
|
---|
| 238 |
|
---|
| 239 | typedef
|
---|
| 240 | PVOID
|
---|
| 241 | USB_BUSIFFN
|
---|
| 242 | USB_BUSIFFN_GET_DEVICE_BUSCONTEXT (
|
---|
| 243 | IN PVOID HubBusContext,
|
---|
| 244 | IN PVOID DeviceHandle);
|
---|
| 245 |
|
---|
| 246 | typedef USB_BUSIFFN_GET_DEVICE_BUSCONTEXT *PUSB_BUSIFFN_GET_DEVICE_BUSCONTEXT;
|
---|
| 247 |
|
---|
| 248 | typedef
|
---|
| 249 | NTSTATUS
|
---|
| 250 | USB_BUSIFFN
|
---|
| 251 | USB_BUSIFFN_INITIALIZE_20HUB (
|
---|
| 252 | IN PVOID BusContext,
|
---|
| 253 | IN PUSB_DEVICE_HANDLE HubDeviceHandle,
|
---|
| 254 | IN ULONG TtCount);
|
---|
| 255 |
|
---|
| 256 | typedef USB_BUSIFFN_INITIALIZE_20HUB *PUSB_BUSIFFN_INITIALIZE_20HUB;
|
---|
| 257 |
|
---|
| 258 | typedef
|
---|
| 259 | BOOLEAN
|
---|
| 260 | USB_BUSIFFN
|
---|
| 261 | USB_BUSIFFN_IS_ROOT (
|
---|
| 262 | IN PVOID BusContext,
|
---|
| 263 | IN PVOID DeviceObject);
|
---|
| 264 |
|
---|
| 265 | typedef USB_BUSIFFN_IS_ROOT *PUSB_BUSIFFN_IS_ROOT;
|
---|
| 266 |
|
---|
| 267 | typedef
|
---|
| 268 | VOID
|
---|
| 269 | USB_BUSIFFN
|
---|
| 270 | USB_BUSIFFN_ACQUIRE_SEMAPHORE (
|
---|
| 271 | IN PVOID BusContext);
|
---|
| 272 |
|
---|
| 273 | typedef USB_BUSIFFN_ACQUIRE_SEMAPHORE *PUSB_BUSIFFN_ACQUIRE_SEMAPHORE;
|
---|
| 274 |
|
---|
| 275 | typedef
|
---|
| 276 | VOID
|
---|
| 277 | USB_BUSIFFN
|
---|
| 278 | USB_BUSIFFN_RELEASE_SEMAPHORE (
|
---|
| 279 | IN PVOID BusContext);
|
---|
| 280 |
|
---|
| 281 | typedef USB_BUSIFFN_RELEASE_SEMAPHORE *PUSB_BUSIFFN_RELEASE_SEMAPHORE;
|
---|
| 282 |
|
---|
| 283 | typedef
|
---|
| 284 | VOID
|
---|
| 285 | __stdcall
|
---|
| 286 | RH_INIT_CALLBACK (
|
---|
| 287 | IN PVOID CallBackContext);
|
---|
| 288 |
|
---|
| 289 | typedef RH_INIT_CALLBACK *PRH_INIT_CALLBACK;
|
---|
| 290 |
|
---|
| 291 | typedef
|
---|
| 292 | NTSTATUS
|
---|
| 293 | USB_BUSIFFN
|
---|
| 294 | USB_BUSIFFN_ROOTHUB_INIT_NOTIFY (
|
---|
| 295 | IN PVOID BusContext,
|
---|
| 296 | IN PVOID CallbackContext,
|
---|
| 297 | IN PRH_INIT_CALLBACK CallbackRoutine);
|
---|
| 298 |
|
---|
| 299 | typedef USB_BUSIFFN_ROOTHUB_INIT_NOTIFY *PUSB_BUSIFFN_ROOTHUB_INIT_NOTIFY;
|
---|
| 300 |
|
---|
| 301 | typedef
|
---|
| 302 | VOID
|
---|
| 303 | USB_BUSIFFN
|
---|
| 304 | USB_BUSIFFN_FLUSH_TRANSFERS (
|
---|
| 305 | IN PVOID BusContext,
|
---|
| 306 | IN PVOID DeviceHandle);
|
---|
| 307 |
|
---|
| 308 | typedef USB_BUSIFFN_FLUSH_TRANSFERS *PUSB_BUSIFFN_FLUSH_TRANSFERS;
|
---|
| 309 |
|
---|
| 310 | typedef
|
---|
| 311 | ULONG
|
---|
| 312 | USB_BUSIFFN
|
---|
| 313 | USB_BUSIFFN_CALC_PIPE_BANDWIDTH (
|
---|
| 314 | IN PVOID BusContext,
|
---|
| 315 | IN PUSBD_PIPE_INFORMATION PipeInfo,
|
---|
| 316 | IN USB_DEVICE_SPEED DeviceSpeed);
|
---|
| 317 |
|
---|
| 318 | typedef USB_BUSIFFN_CALC_PIPE_BANDWIDTH *PUSB_BUSIFFN_CALC_PIPE_BANDWIDTH;
|
---|
| 319 |
|
---|
| 320 | typedef
|
---|
| 321 | VOID
|
---|
| 322 | USB_BUSIFFN
|
---|
| 323 | USB_BUSIFFN_SET_BUS_WAKE_MODE (
|
---|
| 324 | IN PVOID BusContext,
|
---|
| 325 | IN ULONG Mode);
|
---|
| 326 |
|
---|
| 327 | typedef USB_BUSIFFN_SET_BUS_WAKE_MODE *PUSB_BUSIFFN_SET_BUS_WAKE_MODE;
|
---|
| 328 |
|
---|
| 329 | typedef
|
---|
| 330 | VOID
|
---|
| 331 | USB_BUSIFFN
|
---|
| 332 | USB_BUSIFFN_SET_DEVICE_FLAG (
|
---|
| 333 | IN PVOID BusContext,
|
---|
| 334 | IN GUID *DeviceFlagGuid,
|
---|
| 335 | IN PVOID ValueData,
|
---|
| 336 | IN ULONG ValueLength);
|
---|
| 337 |
|
---|
| 338 | typedef USB_BUSIFFN_SET_DEVICE_FLAG *PUSB_BUSIFFN_SET_DEVICE_FLAG;
|
---|
| 339 |
|
---|
| 340 | typedef
|
---|
| 341 | VOID
|
---|
| 342 | USB_BUSIFFN
|
---|
| 343 | USB_BUSIFFN_SET_DEVHANDLE_DATA (
|
---|
| 344 | IN PVOID BusContext,
|
---|
| 345 | IN PVOID DeviceHandle,
|
---|
| 346 | IN PDEVICE_OBJECT UsbDevicePdo);
|
---|
| 347 |
|
---|
| 348 | typedef USB_BUSIFFN_SET_DEVHANDLE_DATA *PUSB_BUSIFFN_SET_DEVHANDLE_DATA;
|
---|
| 349 |
|
---|
| 350 | typedef
|
---|
| 351 | NTSTATUS
|
---|
| 352 | USB_BUSIFFN
|
---|
| 353 | USB_BUSIFFN_TEST_POINT (
|
---|
| 354 | IN PVOID BusContext,
|
---|
| 355 | IN PVOID DeviceHandle,
|
---|
| 356 | IN ULONG Opcode,
|
---|
| 357 | IN PVOID TestData);
|
---|
| 358 |
|
---|
| 359 | typedef USB_BUSIFFN_TEST_POINT *PUSB_BUSIFFN_TEST_POINT;
|
---|
| 360 |
|
---|
| 361 | typedef
|
---|
| 362 | NTSTATUS
|
---|
| 363 | USB_BUSIFFN
|
---|
| 364 | USB_BUSIFFN_GET_DEVICE_PERFORMANCE_INFO (
|
---|
| 365 | IN PVOID BusContext,
|
---|
| 366 | IN PUSB_DEVICE_HANDLE DeviceHandle,
|
---|
| 367 | OUT PVOID DeviceInformationBuffer,
|
---|
| 368 | IN ULONG DeviceInformationBufferLength,
|
---|
| 369 | IN OUT PULONG LengthOfDataCopied);
|
---|
| 370 |
|
---|
| 371 | typedef USB_BUSIFFN_GET_DEVICE_PERFORMANCE_INFO *PUSB_BUSIFFN_GET_DEVICE_PERFORMANCE_INFO;
|
---|
| 372 |
|
---|
| 373 | typedef
|
---|
| 374 | NTSTATUS
|
---|
| 375 | USB_BUSIFFN
|
---|
| 376 | USB_BUSIFFN_WAIT_ASYNC_POWERUP (
|
---|
| 377 | IN PVOID BusContext);
|
---|
| 378 |
|
---|
| 379 | typedef USB_BUSIFFN_WAIT_ASYNC_POWERUP *PUSB_BUSIFFN_WAIT_ASYNC_POWERUP;
|
---|
| 380 |
|
---|
| 381 | typedef
|
---|
| 382 | NTSTATUS
|
---|
| 383 | USB_BUSIFFN
|
---|
| 384 | USB_BUSIFFN_GET_DEVICE_ADDRESS (
|
---|
| 385 | IN PVOID BusContext,
|
---|
| 386 | IN PUSB_DEVICE_HANDLE DeviceHandle,
|
---|
| 387 | OUT PUSHORT DeviceAddress);
|
---|
| 388 |
|
---|
| 389 | typedef USB_BUSIFFN_GET_DEVICE_ADDRESS *PUSB_BUSIFFN_GET_DEVICE_ADDRESS;
|
---|
| 390 |
|
---|
| 391 | typedef
|
---|
| 392 | VOID
|
---|
| 393 | USB_BUSIFFN
|
---|
| 394 | USB_BUSIFFN_DEREF_DEVICE_HANDLE (
|
---|
| 395 | IN PVOID BusContext,
|
---|
| 396 | IN PUSB_DEVICE_HANDLE DeviceHandle,
|
---|
| 397 | IN PVOID Object,
|
---|
| 398 | IN ULONG Tag);
|
---|
| 399 |
|
---|
| 400 | typedef USB_BUSIFFN_DEREF_DEVICE_HANDLE *PUSB_BUSIFFN_DEREF_DEVICE_HANDLE;
|
---|
| 401 |
|
---|
| 402 | typedef
|
---|
| 403 | NTSTATUS
|
---|
| 404 | USB_BUSIFFN
|
---|
| 405 | USB_BUSIFFN_REF_DEVICE_HANDLE (
|
---|
| 406 | IN PVOID BusContext,
|
---|
| 407 | IN PUSB_DEVICE_HANDLE DeviceHandle,
|
---|
| 408 | IN PVOID Object,
|
---|
| 409 | IN ULONG Tag);
|
---|
| 410 |
|
---|
| 411 | typedef USB_BUSIFFN_REF_DEVICE_HANDLE *PUSB_BUSIFFN_REF_DEVICE_HANDLE;
|
---|
| 412 |
|
---|
| 413 | typedef
|
---|
| 414 | ULONG
|
---|
| 415 | USB_BUSIFFN
|
---|
| 416 | USB_BUSIFFN_SET_DEVICE_HANDLE_IDLE_READY_STATE (
|
---|
| 417 | IN PVOID BusContext,
|
---|
| 418 | IN PUSB_DEVICE_HANDLE DeviceHandle,
|
---|
| 419 | IN ULONG NewIdleReadyState);
|
---|
| 420 |
|
---|
| 421 | typedef USB_BUSIFFN_SET_DEVICE_HANDLE_IDLE_READY_STATE *PUSB_BUSIFFN_SET_DEVICE_HANDLE_IDLE_READY_STATE;
|
---|
| 422 |
|
---|
| 423 | typedef
|
---|
| 424 | NTSTATUS
|
---|
| 425 | USB_BUSIFFN
|
---|
| 426 | USB_BUSIFFN_GET_CONTAINER_ID_FOR_PORT (
|
---|
| 427 | IN PVOID BusContext,
|
---|
| 428 | IN USHORT PortNumber,
|
---|
| 429 | OUT LPGUID ContainerId);
|
---|
| 430 |
|
---|
| 431 | typedef USB_BUSIFFN_GET_CONTAINER_ID_FOR_PORT *PUSB_BUSIFFN_GET_CONTAINER_ID_FOR_PORT;
|
---|
| 432 |
|
---|
| 433 | typedef
|
---|
| 434 | VOID
|
---|
| 435 | USB_BUSIFFN
|
---|
| 436 | USB_BUSIFFN_SET_CONTAINER_ID_FOR_PORT (
|
---|
| 437 | IN PVOID BusContext,
|
---|
| 438 | IN USHORT PortNumber,
|
---|
| 439 | IN LPGUID ContainerId);
|
---|
| 440 |
|
---|
| 441 | typedef USB_BUSIFFN_SET_CONTAINER_ID_FOR_PORT *PUSB_BUSIFFN_SET_CONTAINER_ID_FOR_PORT;
|
---|
| 442 |
|
---|
| 443 | typedef
|
---|
| 444 | NTSTATUS
|
---|
| 445 | USB_BUSIFFN
|
---|
| 446 | USB_BUSIFFN_ABORT_ALL_DEVICE_PIPES (
|
---|
| 447 | IN PVOID BusContext,
|
---|
| 448 | IN PUSB_DEVICE_HANDLE DeviceHandle);
|
---|
| 449 |
|
---|
| 450 | typedef USB_BUSIFFN_ABORT_ALL_DEVICE_PIPES *PUSB_BUSIFFN_ABORT_ALL_DEVICE_PIPES;
|
---|
| 451 |
|
---|
| 452 | #define ERRATA_FLAG_RESET_TT_ON_CANCEL 1
|
---|
| 453 | #define ERRATA_FLAG_NO_CLEAR_TT_BUFFER_ON_CANCEL 2
|
---|
| 454 |
|
---|
| 455 | #define USB_BUSIF_HUB_VERSION_0 0x0000
|
---|
| 456 | #define USB_BUSIF_HUB_VERSION_1 0x0001
|
---|
| 457 | #define USB_BUSIF_HUB_VERSION_2 0x0002
|
---|
| 458 | #define USB_BUSIF_HUB_VERSION_3 0x0003
|
---|
| 459 | #define USB_BUSIF_HUB_VERSION_4 0x0004
|
---|
| 460 | #define USB_BUSIF_HUB_VERSION_5 0x0005
|
---|
| 461 | #define USB_BUSIF_HUB_VERSION_6 0x0006
|
---|
| 462 | #define USB_BUSIF_HUB_VERSION_7 0x0007
|
---|
| 463 |
|
---|
| 464 | #define USB_BUSIF_HUB_MIDUMP_VERSION_0 0x0000
|
---|
| 465 |
|
---|
| 466 | #define USB_BUSIF_HUB_SS_VERSION_0 0x0000
|
---|
| 467 |
|
---|
| 468 | typedef
|
---|
| 469 | VOID
|
---|
| 470 | USB_BUSIFFN
|
---|
| 471 | USB_BUSIFFN_SET_DEVICE_ERRATA_FLAG (
|
---|
| 472 | IN PVOID BusContext,
|
---|
| 473 | IN PUSB_DEVICE_HANDLE DeviceHandle,
|
---|
| 474 | IN ULONG DeviceErrataFlag);
|
---|
| 475 |
|
---|
| 476 | typedef USB_BUSIFFN_SET_DEVICE_ERRATA_FLAG *PUSB_BUSIFFN_SET_DEVICE_ERRATA_FLAG;
|
---|
| 477 |
|
---|
| 478 | DEFINE_GUID(USB_BUS_INTERFACE_HUB_GUID,
|
---|
| 479 | 0xb2bb8c0a, 0x5ab4, 0x11d3, 0xa8, 0xcd, 0x0, 0xc0, 0x4f, 0x68, 0x74, 0x7a);
|
---|
| 480 |
|
---|
| 481 | typedef struct _USB_BUS_INTERFACE_HUB_V0 {
|
---|
| 482 | USHORT Size;
|
---|
| 483 | USHORT Version;
|
---|
| 484 | PVOID BusContext;
|
---|
| 485 | PINTERFACE_REFERENCE InterfaceReference;
|
---|
| 486 | PINTERFACE_DEREFERENCE InterfaceDereference;
|
---|
| 487 | } USB_BUS_INTERFACE_HUB_V0, *PUSB_BUS_INTERFACE_HUB_V0;
|
---|
| 488 |
|
---|
| 489 | typedef struct _USB_BUS_INTERFACE_HUB_V1 {
|
---|
| 490 | USHORT Size;
|
---|
| 491 | USHORT Version;
|
---|
| 492 | PVOID BusContext;
|
---|
| 493 | PINTERFACE_REFERENCE InterfaceReference;
|
---|
| 494 | PINTERFACE_DEREFERENCE InterfaceDereference;
|
---|
| 495 | PUSB_BUSIFFN_CREATE_USB_DEVICE CreateUsbDevice;
|
---|
| 496 | PUSB_BUSIFFN_INITIALIZE_USB_DEVICE InitializeUsbDevice;
|
---|
| 497 | PUSB_BUSIFFN_GET_USB_DESCRIPTORS GetUsbDescriptors;
|
---|
| 498 | PUSB_BUSIFFN_REMOVE_USB_DEVICE RemoveUsbDevice;
|
---|
| 499 | PUSB_BUSIFFN_RESTORE_DEVICE RestoreUsbDevice;
|
---|
| 500 | PUSB_BUSIFFN_GET_POTRTHACK_FLAGS GetPortHackFlags;
|
---|
| 501 | PUSB_BUSIFFN_GET_DEVICE_INFORMATION QueryDeviceInformation;
|
---|
| 502 | } USB_BUS_INTERFACE_HUB_V1, *PUSB_BUS_INTERFACE_HUB_V1;
|
---|
| 503 |
|
---|
| 504 | typedef struct _USB_BUS_INTERFACE_HUB_V2 {
|
---|
| 505 | USHORT Size;
|
---|
| 506 | USHORT Version;
|
---|
| 507 | PVOID BusContext;
|
---|
| 508 | PINTERFACE_REFERENCE InterfaceReference;
|
---|
| 509 | PINTERFACE_DEREFERENCE InterfaceDereference;
|
---|
| 510 | PUSB_BUSIFFN_CREATE_USB_DEVICE CreateUsbDevice;
|
---|
| 511 | PUSB_BUSIFFN_INITIALIZE_USB_DEVICE InitializeUsbDevice;
|
---|
| 512 | PUSB_BUSIFFN_GET_USB_DESCRIPTORS GetUsbDescriptors;
|
---|
| 513 | PUSB_BUSIFFN_REMOVE_USB_DEVICE RemoveUsbDevice;
|
---|
| 514 | PUSB_BUSIFFN_RESTORE_DEVICE RestoreUsbDevice;
|
---|
| 515 | PUSB_BUSIFFN_GET_POTRTHACK_FLAGS GetPortHackFlags;
|
---|
| 516 | PUSB_BUSIFFN_GET_DEVICE_INFORMATION QueryDeviceInformation;
|
---|
| 517 | PUSB_BUSIFFN_GET_CONTROLLER_INFORMATION GetControllerInformation;
|
---|
| 518 | PUSB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND ControllerSelectiveSuspend;
|
---|
| 519 | PUSB_BUSIFFN_GET_EXTENDED_HUB_INFO GetExtendedHubInformation;
|
---|
| 520 | PUSB_BUSIFFN_GET_ROOTHUB_SYM_NAME GetRootHubSymbolicName;
|
---|
| 521 | PUSB_BUSIFFN_GET_DEVICE_BUSCONTEXT GetDeviceBusContext;
|
---|
| 522 | PUSB_BUSIFFN_INITIALIZE_20HUB Initialize20Hub;
|
---|
| 523 | } USB_BUS_INTERFACE_HUB_V2, *PUSB_BUS_INTERFACE_HUB_V2;
|
---|
| 524 |
|
---|
| 525 | typedef struct _USB_BUS_INTERFACE_HUB_V3 {
|
---|
| 526 | USHORT Size;
|
---|
| 527 | USHORT Version;
|
---|
| 528 | PVOID BusContext;
|
---|
| 529 | PINTERFACE_REFERENCE InterfaceReference;
|
---|
| 530 | PINTERFACE_DEREFERENCE InterfaceDereference;
|
---|
| 531 | PUSB_BUSIFFN_CREATE_USB_DEVICE CreateUsbDevice;
|
---|
| 532 | PUSB_BUSIFFN_INITIALIZE_USB_DEVICE InitializeUsbDevice;
|
---|
| 533 | PUSB_BUSIFFN_GET_USB_DESCRIPTORS GetUsbDescriptors;
|
---|
| 534 | PUSB_BUSIFFN_REMOVE_USB_DEVICE RemoveUsbDevice;
|
---|
| 535 | PUSB_BUSIFFN_RESTORE_DEVICE RestoreUsbDevice;
|
---|
| 536 | PUSB_BUSIFFN_GET_POTRTHACK_FLAGS GetPortHackFlags;
|
---|
| 537 | PUSB_BUSIFFN_GET_DEVICE_INFORMATION QueryDeviceInformation;
|
---|
| 538 | PUSB_BUSIFFN_GET_CONTROLLER_INFORMATION GetControllerInformation;
|
---|
| 539 | PUSB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND ControllerSelectiveSuspend;
|
---|
| 540 | PUSB_BUSIFFN_GET_EXTENDED_HUB_INFO GetExtendedHubInformation;
|
---|
| 541 | PUSB_BUSIFFN_GET_ROOTHUB_SYM_NAME GetRootHubSymbolicName;
|
---|
| 542 | PUSB_BUSIFFN_GET_DEVICE_BUSCONTEXT GetDeviceBusContext;
|
---|
| 543 | PUSB_BUSIFFN_INITIALIZE_20HUB Initialize20Hub;
|
---|
| 544 | PUSB_BUSIFFN_ROOTHUB_INIT_NOTIFY RootHubInitNotification;
|
---|
| 545 | } USB_BUS_INTERFACE_HUB_V3, *PUSB_BUS_INTERFACE_HUB_V3;
|
---|
| 546 |
|
---|
| 547 | typedef struct _USB_BUS_INTERFACE_HUB_V4 {
|
---|
| 548 | USHORT Size;
|
---|
| 549 | USHORT Version;
|
---|
| 550 | PVOID BusContext;
|
---|
| 551 | PINTERFACE_REFERENCE InterfaceReference;
|
---|
| 552 | PINTERFACE_DEREFERENCE InterfaceDereference;
|
---|
| 553 | PUSB_BUSIFFN_CREATE_USB_DEVICE CreateUsbDevice;
|
---|
| 554 | PUSB_BUSIFFN_INITIALIZE_USB_DEVICE InitializeUsbDevice;
|
---|
| 555 | PUSB_BUSIFFN_GET_USB_DESCRIPTORS GetUsbDescriptors;
|
---|
| 556 | PUSB_BUSIFFN_REMOVE_USB_DEVICE RemoveUsbDevice;
|
---|
| 557 | PUSB_BUSIFFN_RESTORE_DEVICE RestoreUsbDevice;
|
---|
| 558 | PUSB_BUSIFFN_GET_POTRTHACK_FLAGS GetPortHackFlags;
|
---|
| 559 | PUSB_BUSIFFN_GET_DEVICE_INFORMATION QueryDeviceInformation;
|
---|
| 560 | PUSB_BUSIFFN_GET_CONTROLLER_INFORMATION GetControllerInformation;
|
---|
| 561 | PUSB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND ControllerSelectiveSuspend;
|
---|
| 562 | PUSB_BUSIFFN_GET_EXTENDED_HUB_INFO GetExtendedHubInformation;
|
---|
| 563 | PUSB_BUSIFFN_GET_ROOTHUB_SYM_NAME GetRootHubSymbolicName;
|
---|
| 564 | PUSB_BUSIFFN_GET_DEVICE_BUSCONTEXT GetDeviceBusContext;
|
---|
| 565 | PUSB_BUSIFFN_INITIALIZE_20HUB Initialize20Hub;
|
---|
| 566 | PUSB_BUSIFFN_ROOTHUB_INIT_NOTIFY RootHubInitNotification;
|
---|
| 567 | PUSB_BUSIFFN_FLUSH_TRANSFERS FlushTransfers;
|
---|
| 568 | } USB_BUS_INTERFACE_HUB_V4, *PUSB_BUS_INTERFACE_HUB_V4;
|
---|
| 569 |
|
---|
| 570 | typedef struct _USB_BUS_INTERFACE_HUB_V5 {
|
---|
| 571 | USHORT Size;
|
---|
| 572 | USHORT Version;
|
---|
| 573 | PVOID BusContext;
|
---|
| 574 | PINTERFACE_REFERENCE InterfaceReference;
|
---|
| 575 | PINTERFACE_DEREFERENCE InterfaceDereference;
|
---|
| 576 | PUSB_BUSIFFN_CREATE_USB_DEVICE CreateUsbDevice;
|
---|
| 577 | PUSB_BUSIFFN_INITIALIZE_USB_DEVICE InitializeUsbDevice;
|
---|
| 578 | PUSB_BUSIFFN_GET_USB_DESCRIPTORS GetUsbDescriptors;
|
---|
| 579 | PUSB_BUSIFFN_REMOVE_USB_DEVICE RemoveUsbDevice;
|
---|
| 580 | PUSB_BUSIFFN_RESTORE_DEVICE RestoreUsbDevice;
|
---|
| 581 | PUSB_BUSIFFN_GET_POTRTHACK_FLAGS GetPortHackFlags;
|
---|
| 582 | PUSB_BUSIFFN_GET_DEVICE_INFORMATION QueryDeviceInformation;
|
---|
| 583 | PUSB_BUSIFFN_GET_CONTROLLER_INFORMATION GetControllerInformation;
|
---|
| 584 | PUSB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND ControllerSelectiveSuspend;
|
---|
| 585 | PUSB_BUSIFFN_GET_EXTENDED_HUB_INFO GetExtendedHubInformation;
|
---|
| 586 | PUSB_BUSIFFN_GET_ROOTHUB_SYM_NAME GetRootHubSymbolicName;
|
---|
| 587 | PUSB_BUSIFFN_GET_DEVICE_BUSCONTEXT GetDeviceBusContext;
|
---|
| 588 | PUSB_BUSIFFN_INITIALIZE_20HUB Initialize20Hub;
|
---|
| 589 | PUSB_BUSIFFN_ROOTHUB_INIT_NOTIFY RootHubInitNotification;
|
---|
| 590 | PUSB_BUSIFFN_FLUSH_TRANSFERS FlushTransfers;
|
---|
| 591 | PUSB_BUSIFFN_SET_DEVHANDLE_DATA SetDeviceHandleData;
|
---|
| 592 | } USB_BUS_INTERFACE_HUB_V5, *PUSB_BUS_INTERFACE_HUB_V5;
|
---|
| 593 |
|
---|
| 594 | typedef struct _USB_BUS_INTERFACE_HUB_V6 {
|
---|
| 595 | USHORT Size;
|
---|
| 596 | USHORT Version;
|
---|
| 597 | PVOID BusContext;
|
---|
| 598 | PINTERFACE_REFERENCE InterfaceReference;
|
---|
| 599 | PINTERFACE_DEREFERENCE InterfaceDereference;
|
---|
| 600 | PUSB_BUSIFFN_CREATE_USB_DEVICE_EX CreateUsbDevice;
|
---|
| 601 | PUSB_BUSIFFN_INITIALIZE_USB_DEVICE_EX InitializeUsbDevice;
|
---|
| 602 | PUSB_BUSIFFN_GET_USB_DESCRIPTORS GetUsbDescriptors;
|
---|
| 603 | PUSB_BUSIFFN_REMOVE_USB_DEVICE RemoveUsbDevice;
|
---|
| 604 | PUSB_BUSIFFN_RESTORE_DEVICE RestoreUsbDevice;
|
---|
| 605 | PUSB_BUSIFFN_GET_POTRTHACK_FLAGS GetPortHackFlags;
|
---|
| 606 | PUSB_BUSIFFN_GET_DEVICE_INFORMATION QueryDeviceInformation;
|
---|
| 607 | PUSB_BUSIFFN_GET_CONTROLLER_INFORMATION GetControllerInformation;
|
---|
| 608 | PUSB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND ControllerSelectiveSuspend;
|
---|
| 609 | PUSB_BUSIFFN_GET_EXTENDED_HUB_INFO GetExtendedHubInformation;
|
---|
| 610 | PUSB_BUSIFFN_GET_ROOTHUB_SYM_NAME GetRootHubSymbolicName;
|
---|
| 611 | PUSB_BUSIFFN_GET_DEVICE_BUSCONTEXT GetDeviceBusContext;
|
---|
| 612 | PUSB_BUSIFFN_INITIALIZE_20HUB Initialize20Hub;
|
---|
| 613 | PUSB_BUSIFFN_ROOTHUB_INIT_NOTIFY RootHubInitNotification;
|
---|
| 614 | PUSB_BUSIFFN_FLUSH_TRANSFERS FlushTransfers;
|
---|
| 615 | PUSB_BUSIFFN_SET_DEVHANDLE_DATA SetDeviceHandleData;
|
---|
| 616 | PUSB_BUSIFFN_IS_ROOT HubIsRoot;
|
---|
| 617 | PUSB_BUSIFFN_ACQUIRE_SEMAPHORE AcquireBusSemaphore;
|
---|
| 618 | PUSB_BUSIFFN_RELEASE_SEMAPHORE ReleaseBusSemaphore;
|
---|
| 619 | PUSB_BUSIFFN_CALC_PIPE_BANDWIDTH CaculatePipeBandwidth;
|
---|
| 620 | PUSB_BUSIFFN_SET_BUS_WAKE_MODE SetBusSystemWakeMode;
|
---|
| 621 | PUSB_BUSIFFN_SET_DEVICE_FLAG SetDeviceFlag;
|
---|
| 622 | PUSB_BUSIFFN_TEST_POINT HubTestPoint;
|
---|
| 623 | PUSB_BUSIFFN_GET_DEVICE_PERFORMANCE_INFO GetDevicePerformanceInfo;
|
---|
| 624 | PUSB_BUSIFFN_WAIT_ASYNC_POWERUP WaitAsyncPowerUp;
|
---|
| 625 | PUSB_BUSIFFN_GET_DEVICE_ADDRESS GetDeviceAddress;
|
---|
| 626 | PUSB_BUSIFFN_REF_DEVICE_HANDLE RefDeviceHandle;
|
---|
| 627 | PUSB_BUSIFFN_DEREF_DEVICE_HANDLE DerefDeviceHandle;
|
---|
| 628 | PUSB_BUSIFFN_SET_DEVICE_HANDLE_IDLE_READY_STATE SetDeviceHandleIdleReadyState;
|
---|
| 629 | } USB_BUS_INTERFACE_HUB_V6, *PUSB_BUS_INTERFACE_HUB_V6;
|
---|
| 630 |
|
---|
| 631 | typedef struct _USB_BUS_INTERFACE_HUB_V7 {
|
---|
| 632 | USHORT Size;
|
---|
| 633 | USHORT Version;
|
---|
| 634 | PVOID BusContext;
|
---|
| 635 | PINTERFACE_REFERENCE InterfaceReference;
|
---|
| 636 | PINTERFACE_DEREFERENCE InterfaceDereference;
|
---|
| 637 | PUSB_BUSIFFN_CREATE_USB_DEVICE_EX CreateUsbDevice;
|
---|
| 638 | PUSB_BUSIFFN_INITIALIZE_USB_DEVICE_EX InitializeUsbDevice;
|
---|
| 639 | PUSB_BUSIFFN_GET_USB_DESCRIPTORS GetUsbDescriptors;
|
---|
| 640 | PUSB_BUSIFFN_REMOVE_USB_DEVICE RemoveUsbDevice;
|
---|
| 641 | PUSB_BUSIFFN_RESTORE_DEVICE RestoreUsbDevice;
|
---|
| 642 | PUSB_BUSIFFN_GET_POTRTHACK_FLAGS GetPortHackFlags;
|
---|
| 643 | PUSB_BUSIFFN_GET_DEVICE_INFORMATION QueryDeviceInformation;
|
---|
| 644 | PUSB_BUSIFFN_GET_CONTROLLER_INFORMATION GetControllerInformation;
|
---|
| 645 | PUSB_BUSIFFN_CONTROLLER_SELECTIVE_SUSPEND ControllerSelectiveSuspend;
|
---|
| 646 | PUSB_BUSIFFN_GET_EXTENDED_HUB_INFO GetExtendedHubInformation;
|
---|
| 647 | PUSB_BUSIFFN_GET_ROOTHUB_SYM_NAME GetRootHubSymbolicName;
|
---|
| 648 | PUSB_BUSIFFN_GET_DEVICE_BUSCONTEXT GetDeviceBusContext;
|
---|
| 649 | PUSB_BUSIFFN_INITIALIZE_20HUB Initialize20Hub;
|
---|
| 650 | PUSB_BUSIFFN_ROOTHUB_INIT_NOTIFY RootHubInitNotification;
|
---|
| 651 | PUSB_BUSIFFN_FLUSH_TRANSFERS FlushTransfers;
|
---|
| 652 | PUSB_BUSIFFN_SET_DEVHANDLE_DATA SetDeviceHandleData;
|
---|
| 653 | PUSB_BUSIFFN_IS_ROOT HubIsRoot;
|
---|
| 654 | PUSB_BUSIFFN_ACQUIRE_SEMAPHORE AcquireBusSemaphore;
|
---|
| 655 | PUSB_BUSIFFN_RELEASE_SEMAPHORE ReleaseBusSemaphore;
|
---|
| 656 | PUSB_BUSIFFN_CALC_PIPE_BANDWIDTH CaculatePipeBandwidth;
|
---|
| 657 | PUSB_BUSIFFN_SET_BUS_WAKE_MODE SetBusSystemWakeMode;
|
---|
| 658 | PUSB_BUSIFFN_SET_DEVICE_FLAG SetDeviceFlag;
|
---|
| 659 | PUSB_BUSIFFN_TEST_POINT HubTestPoint;
|
---|
| 660 | PUSB_BUSIFFN_GET_DEVICE_PERFORMANCE_INFO GetDevicePerformanceInfo;
|
---|
| 661 | PUSB_BUSIFFN_WAIT_ASYNC_POWERUP WaitAsyncPowerUp;
|
---|
| 662 | PUSB_BUSIFFN_GET_DEVICE_ADDRESS GetDeviceAddress;
|
---|
| 663 | PUSB_BUSIFFN_REF_DEVICE_HANDLE RefDeviceHandle;
|
---|
| 664 | PUSB_BUSIFFN_DEREF_DEVICE_HANDLE DerefDeviceHandle;
|
---|
| 665 | PUSB_BUSIFFN_SET_DEVICE_HANDLE_IDLE_READY_STATE SetDeviceHandleIdleReadyState;
|
---|
| 666 | PUSB_BUSIFFN_CREATE_USB_DEVICE_V7 CreateUsbDeviceV7;
|
---|
| 667 | PUSB_BUSIFFN_GET_CONTAINER_ID_FOR_PORT GetContainerIdForPort;
|
---|
| 668 | PUSB_BUSIFFN_SET_CONTAINER_ID_FOR_PORT SetContainerIdForPort;
|
---|
| 669 | PUSB_BUSIFFN_ABORT_ALL_DEVICE_PIPES AbortAllDevicePipes;
|
---|
| 670 | PUSB_BUSIFFN_SET_DEVICE_ERRATA_FLAG SetDeviceErrataFlag;
|
---|
| 671 | } USB_BUS_INTERFACE_HUB_V7, *PUSB_BUS_INTERFACE_HUB_V7;
|
---|
| 672 |
|
---|
| 673 | DEFINE_GUID(USB_BUS_INTERFACE_HUB_MINIDUMP_GUID,
|
---|
| 674 | 0xc5485f21, 0x4e81, 0x4a23, 0xa8, 0xf9, 0xd8, 0x51, 0x8a, 0xf4, 0x5c, 0x38);
|
---|
| 675 |
|
---|
| 676 | typedef VOID
|
---|
| 677 | (USB_BUSIFFN *PUSB_BUSIFFN_SET_MINIDUMP_FLAGS) (
|
---|
| 678 | IN PVOID);
|
---|
| 679 |
|
---|
| 680 | typedef struct _USB_BUS_INTERFACE_HUB_MINIDUMP {
|
---|
| 681 | USHORT Size;
|
---|
| 682 | USHORT Version;
|
---|
| 683 | PVOID BusContext;
|
---|
| 684 | PINTERFACE_REFERENCE InterfaceReference;
|
---|
| 685 | PINTERFACE_DEREFERENCE InterfaceDereference;
|
---|
| 686 | PUSB_BUSIFFN_SET_MINIDUMP_FLAGS SetUsbPortMiniDumpFlags;
|
---|
| 687 | } USB_BUS_INTERFACE_HUB_MINIDUMP, *PUSB_BUS_INTERFACE_HUB_MINIDUMP;
|
---|
| 688 |
|
---|
| 689 | DEFINE_GUID(USB_BUS_INTERFACE_HUB_SS_GUID,
|
---|
| 690 | 0xbfc3f363, 0x8ba1, 0x4c7b, 0x97, 0xba, 0x9b, 0x12, 0xb1, 0xca, 0x13, 0x2f);
|
---|
| 691 |
|
---|
| 692 | typedef NTSTATUS
|
---|
| 693 | (USB_BUSIFFN *PUSB_BUSIFFN_SUSPEND_HUB) (
|
---|
| 694 | PDEVICE_OBJECT Pdo);
|
---|
| 695 |
|
---|
| 696 | typedef NTSTATUS
|
---|
| 697 | (USB_BUSIFFN *PUSB_BUSIFFN_RESUME_HUB) (
|
---|
| 698 | PDEVICE_OBJECT Pdo);
|
---|
| 699 |
|
---|
| 700 | typedef struct _USB_BUS_INTERFACE_HUB_SELECTIVE_SUSPEND {
|
---|
| 701 | USHORT Size;
|
---|
| 702 | USHORT Version;
|
---|
| 703 | PVOID BusContext;
|
---|
| 704 | PINTERFACE_REFERENCE InterfaceReference;
|
---|
| 705 | PINTERFACE_DEREFERENCE InterfaceDereference;
|
---|
| 706 | PUSB_BUSIFFN_SUSPEND_HUB SuspendHub;
|
---|
| 707 | PUSB_BUSIFFN_RESUME_HUB ResumeHub;
|
---|
| 708 | } USB_BUS_INTERFACE_HUB_SELECTIVE_SUSPEND, *PUSB_BUS_INTERFACE_HUB_SELECTIVE_SUSPEND;
|
---|
| 709 |
|
---|
| 710 | #include <pshpack1.h>
|
---|
| 711 |
|
---|
| 712 | typedef struct _USB_PIPE_INFORMATION_0 {
|
---|
| 713 | USB_ENDPOINT_DESCRIPTOR EndpointDescriptor;
|
---|
| 714 | UCHAR ED_Pad[1];
|
---|
| 715 | ULONG ScheduleOffset;
|
---|
| 716 | } USB_PIPE_INFORMATION_0, *PUSB_PIPE_INFORMATION_0;
|
---|
| 717 |
|
---|
| 718 | typedef struct _USB_LEVEL_INFORMATION {
|
---|
| 719 | ULONG InformationLevel;
|
---|
| 720 | ULONG ActualLength;
|
---|
| 721 | } USB_LEVEL_INFORMATION, *PUSB_LEVEL_INFORMATION;
|
---|
| 722 |
|
---|
| 723 | typedef struct _USB_DEVICE_INFORMATION_0 {
|
---|
| 724 | ULONG InformationLevel;
|
---|
| 725 | ULONG ActualLength;
|
---|
| 726 | ULONG PortNumber;
|
---|
| 727 | USB_DEVICE_DESCRIPTOR DeviceDescriptor;
|
---|
| 728 | UCHAR DD_pad[2];
|
---|
| 729 | UCHAR CurrentConfigurationValue;
|
---|
| 730 | UCHAR ReservedMBZ;
|
---|
| 731 | USHORT DeviceAddress;
|
---|
| 732 | ULONG HubAddress;
|
---|
| 733 | USB_DEVICE_SPEED DeviceSpeed;
|
---|
| 734 | USB_DEVICE_TYPE DeviceType;
|
---|
| 735 | ULONG NumberOfOpenPipes;
|
---|
| 736 | USB_PIPE_INFORMATION_0 PipeList[1];
|
---|
| 737 | } USB_DEVICE_INFORMATION_0, *PUSB_DEVICE_INFORMATION_0;
|
---|
| 738 |
|
---|
| 739 | typedef struct _USB_CONTROLLER_INFORMATION_0 {
|
---|
| 740 | ULONG InformationLevel;
|
---|
| 741 | ULONG ActualLength;
|
---|
| 742 | BOOLEAN SelectiveSuspendEnabled;
|
---|
| 743 | BOOLEAN IsHighSpeedController;
|
---|
| 744 | } USB_CONTROLLER_INFORMATION_0, *PUSB_CONTROLLER_INFORMATION_0;
|
---|
| 745 |
|
---|
| 746 | typedef struct _USB_CONTROLLER_INFORMATION_1 {
|
---|
| 747 | ULONG InformationLevel;
|
---|
| 748 | ULONG ActualLength;
|
---|
| 749 | BOOLEAN SelectiveSuspendEnabled;
|
---|
| 750 | BOOLEAN IsHighSpeedController;
|
---|
| 751 | ULONG HcBusNumber;
|
---|
| 752 | ULONG HcBusDevice;
|
---|
| 753 | ULONG HcBusFunction;
|
---|
| 754 | } USB_CONTROLLER_INFORMATION_1, *PUSB_CONTROLLER_INFORMATION_1;
|
---|
| 755 |
|
---|
| 756 | typedef struct _USB_EXTPORT_INFORMATION_0 {
|
---|
| 757 | ULONG PhysicalPortNumber;
|
---|
| 758 | ULONG PortLabelNumber;
|
---|
| 759 | USHORT VidOverride;
|
---|
| 760 | USHORT PidOverride;
|
---|
| 761 | ULONG PortAttributes;
|
---|
| 762 | } USB_EXTPORT_INFORMATION_0, *PUSB_EXTPORT_INFORMATION;
|
---|
| 763 |
|
---|
| 764 | typedef struct _USB_EXTHUB_INFORMATION_0 {
|
---|
| 765 | ULONG InformationLevel;
|
---|
| 766 | ULONG NumberOfPorts;
|
---|
| 767 | USB_EXTPORT_INFORMATION_0 Port[255];
|
---|
| 768 | } USB_EXTHUB_INFORMATION_0, *PUSB_EXTHUB_INFORMATION_0;
|
---|
| 769 |
|
---|
| 770 | typedef struct _USB_DEVICE_PERFORMANCE_INFO_0 {
|
---|
| 771 | ULONG InformationLevel;
|
---|
| 772 | ULONG ActualLength;
|
---|
| 773 | ULONG BulkBytes;
|
---|
| 774 | ULONG BulkUrbCount;
|
---|
| 775 | ULONG ControlDataBytes;
|
---|
| 776 | ULONG ControlUrbCount;
|
---|
| 777 | ULONG IsoBytes;
|
---|
| 778 | ULONG IsoUrbCount;
|
---|
| 779 | ULONG InterruptBytes;
|
---|
| 780 | ULONG InterruptUrbCount;
|
---|
| 781 | ULONG AllocedInterrupt[6];
|
---|
| 782 | ULONG AllocedIso;
|
---|
| 783 | ULONG Total32secBandwidth;
|
---|
| 784 | ULONG TotalTtBandwidth;
|
---|
| 785 | ULONG TotalIsoLatency;
|
---|
| 786 | ULONG DroppedIsoPackets;
|
---|
| 787 | ULONG TransferErrors;
|
---|
| 788 | } USB_DEVICE_PERFORMANCE_INFO_0, *PUSB_DEVICE_PERFORMANCE_INFO_0;
|
---|
| 789 |
|
---|
| 790 | #include <poppack.h>
|
---|
| 791 |
|
---|
| 792 | #endif /* NTDDI_VERSION >= NTDDI_WINXP */
|
---|
| 793 |
|
---|