ReactOS  0.4.15-dev-3173-g40ee59d
usbport.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS USB Port Driver
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE: USBPort declarations
5  * COPYRIGHT: Copyright 2017 Vadim Galyant <vgal@rambler.ru>
6  */
7 
8 #ifndef USBPORT_H__
9 #define USBPORT_H__
10 
11 #include <ntifs.h>
12 #include <windef.h>
13 #include <stdio.h>
14 #include <wdmguid.h>
15 #include <ntstrsafe.h>
16 #include <usb.h>
17 #include <hubbusif.h>
18 #include <usbbusif.h>
19 #include <usbdlib.h>
20 #include <usbuser.h>
22 
23 #define PCI_INTERFACE_USB_ID_UHCI 0x00
24 #define PCI_INTERFACE_USB_ID_OHCI 0x10
25 #define PCI_INTERFACE_USB_ID_EHCI 0x20
26 #define PCI_INTERFACE_USB_ID_XHCI 0x30
27 
28 #ifdef USBD_TRANSFER_DIRECTION // due hubbusif.h included usbdi.h (Which overwrites...)
29 #undef USBD_TRANSFER_DIRECTION
30 #define USBD_TRANSFER_DIRECTION 0x00000001
31 #endif
32 
33 #define USBPORT_RECIPIENT_HUB BMREQUEST_TO_DEVICE
34 #define USBPORT_RECIPIENT_PORT BMREQUEST_TO_OTHER
35 
36 #define INVALIDATE_ENDPOINT_ONLY 0
37 #define INVALIDATE_ENDPOINT_WORKER_THREAD 1
38 #define INVALIDATE_ENDPOINT_WORKER_DPC 2
39 #define INVALIDATE_ENDPOINT_INT_NEXT_SOF 3
40 
41 #define USBPORT_DMA_DIRECTION_FROM_DEVICE 1
42 #define USBPORT_DMA_DIRECTION_TO_DEVICE 2
43 
44 #define USB_PORT_TAG 'pbsu'
45 #define URB_FUNCTION_MAX 0x31
46 
47 /* Hub Class Feature Selectors (Recipient - Port) */
48 #define FEATURE_PORT_CONNECTION 0
49 #define FEATURE_PORT_ENABLE 1
50 #define FEATURE_PORT_SUSPEND 2
51 #define FEATURE_PORT_OVER_CURRENT 3
52 #define FEATURE_PORT_RESET 4
53 #define FEATURE_PORT_POWER 8
54 #define FEATURE_PORT_LOW_SPEED 9
55 #define FEATURE_C_PORT_CONNECTION 16
56 #define FEATURE_C_PORT_ENABLE 17
57 #define FEATURE_C_PORT_SUSPEND 18
58 #define FEATURE_C_PORT_OVER_CURRENT 19
59 #define FEATURE_C_PORT_RESET 20
60 
61 /* Hub Class Feature Selectors (Recipient - Hub) */
62 #define FEATURE_C_HUB_LOCAL_POWER 0
63 #define FEATURE_C_HUB_OVER_CURRENT 1
64 
65 /* Flags */
66 #define USBPORT_FLAG_INT_CONNECTED 0x00000001
67 #define USBPORT_FLAG_HC_STARTED 0x00000002
68 #define USBPORT_FLAG_HC_POLLING 0x00000004
69 #define USBPORT_FLAG_WORKER_THREAD_ON 0x00000008
70 #define USBPORT_FLAG_WORKER_THREAD_EXIT 0x00000010
71 #define USBPORT_FLAG_HC_SUSPEND 0x00000100
72 #define USBPORT_FLAG_INTERRUPT_ENABLED 0x00000400
73 #define USBPORT_FLAG_SELECTIVE_SUSPEND 0x00000800
74 #define USBPORT_FLAG_DOS_SYMBOLIC_NAME 0x00010000
75 #define USBPORT_FLAG_LEGACY_SUPPORT 0x00080000
76 #define USBPORT_FLAG_HC_WAKE_SUPPORT 0x00200000
77 #define USBPORT_FLAG_DIAGNOSTIC_MODE 0x00800000 //IOCTL_USB_DIAGNOSTIC_MODE_ON
78 #define USBPORT_FLAG_COMPANION_HC 0x01000000
79 #define USBPORT_FLAG_REGISTERED_FDO 0x02000000
80 #define USBPORT_FLAG_NO_HACTION 0x04000000
81 #define USBPORT_FLAG_BIOS_DISABLE_SS 0x08000000 //Selective Suspend
82 #define USBPORT_FLAG_PWR_AND_CHIRP_LOCK 0x10000000
83 #define USBPORT_FLAG_POWER_AND_CHIRP_OK 0x40000000
84 #define USBPORT_FLAG_RH_INIT_CALLBACK 0x80000000
85 
86 /* PnP state Flags */
87 #define USBPORT_PNP_STATE_NOT_INIT 0x00000001
88 #define USBPORT_PNP_STATE_STARTED 0x00000002
89 #define USBPORT_PNP_STATE_FAILED 0x00000004
90 #define USBPORT_PNP_STATE_STOPPED 0x00000008
91 
92 /* Timer Flags */
93 #define USBPORT_TMFLAG_TIMER_QUEUED 0x00000001
94 #define USBPORT_TMFLAG_HC_SUSPENDED 0x00000002
95 #define USBPORT_TMFLAG_HC_RESUME 0x00000004
96 #define USBPORT_TMFLAG_RH_SUSPENDED 0x00000008
97 #define USBPORT_TMFLAG_TIMER_STARTED 0x00000010
98 #define USBPORT_TMFLAG_WAKE 0x00000020
99 #define USBPORT_TMFLAG_IDLE_QUEUEITEM_ON 0x00000040
100 
101 /* Miniport Flags */
102 #define USBPORT_MPFLAG_INTERRUPTS_ENABLED 0x00000001
103 #define USBPORT_MPFLAG_SUSPENDED 0x00000002
104 
105 /* Device handle Flags (USBPORT_DEVICE_HANDLE) */
106 #define DEVICE_HANDLE_FLAG_ROOTHUB 0x00000002
107 #define DEVICE_HANDLE_FLAG_REMOVED 0x00000008
108 #define DEVICE_HANDLE_FLAG_USB2HUB 0x00000010
109 
110 /* Endpoint Flags (USBPORT_ENDPOINT) */
111 #define ENDPOINT_FLAG_DMA_TYPE 0x00000001
112 #define ENDPOINT_FLAG_ROOTHUB_EP0 0x00000002
113 #define ENDPOINT_FLAG_NUKE 0x00000008
114 #define ENDPOINT_FLAG_QUEUENE_EMPTY 0x00000010
115 #define ENDPOINT_FLAG_ABORTING 0x00000020
116 #define ENDPOINT_FLAG_IDLE 0x00000100
117 #define ENDPOINT_FLAG_OPENED 0x00000200
118 #define ENDPOINT_FLAG_CLOSED 0x00000400
119 
120 /* UsbdFlags Flags (URB) */
121 #define USBD_FLAG_ALLOCATED_MDL 0x00000002
122 #define USBD_FLAG_NOT_ISO_TRANSFER 0x00000010
123 #define USBD_FLAG_ALLOCATED_TRANSFER 0x00000020
124 
125 /* Pipe handle Flags (USBPORT_PIPE_HANDLE) */
126 #define PIPE_HANDLE_FLAG_CLOSED 0x00000001
127 #define PIPE_HANDLE_FLAG_NULL_PACKET_SIZE 0x00000002
128 
129 /* Transfer Flags (USBPORT_TRANSFER) */
130 #define TRANSFER_FLAG_CANCELED 0x00000001
131 #define TRANSFER_FLAG_DMA_MAPPED 0x00000002
132 #define TRANSFER_FLAG_HIGH_SPEED 0x00000004
133 #define TRANSFER_FLAG_SUBMITED 0x00000008
134 #define TRANSFER_FLAG_ABORTED 0x00000010
135 #define TRANSFER_FLAG_ISO 0x00000020
136 #define TRANSFER_FLAG_DEVICE_GONE 0x00000080
137 #define TRANSFER_FLAG_SPLITED 0x00000100
138 #define TRANSFER_FLAG_COMPLETED 0x00000200
139 #define TRANSFER_FLAG_PARENT 0x00000400
140 
143 
145 
154 
156 
159 typedef struct _USB2_TT *PUSB2_TT;
161 
162 typedef struct _USBPORT_PIPE_HANDLE {
170 
174  //USB_CONFIGURATION_DESCRIPTOR CfgDescriptor; // Body.
176 
185 
186 typedef struct _USBPORT_DEVICE_HANDLE {
200  PUSB2_TT_EXTENSION TtExtension; // Transaction Translator
203 
204 typedef struct _USBPORT_ENDPOINT {
209  PUSB2_TT_EXTENSION TtExtension; // Transaction Translator
214  /* Locks */
221  /* State */
226  /* Transfer lists */
231  /* Links */
242 
243 typedef struct _USBPORT_ISO_BLOCK *PUSBPORT_ISO_BLOCK;
244 
245 typedef struct _USBPORT_TRANSFER {
251  SIZE_T PortTransferLength; // Only port part
252  SIZE_T FullTransferLength; // Port + miniport
266  LIST_ENTRY SplitTransfersList; // for parent transfers
267  LIST_ENTRY SplitLink; // for splitted transfers
269  PUSBPORT_ISO_BLOCK IsoBlockPtr; // pointer on IsoBlock
270  // SgList should be LAST field
272  //USBPORT_ISO_BLOCK IsoBlock; // variable length
274 
275 typedef struct _USBPORT_IRP_TABLE {
277  PIRP irp[0X200];
279 
282  PDEVICE_OBJECT LowerPdoDevice; // PhysicalDeviceObject
283  PDEVICE_OBJECT LowerDevice; // TopOfStackDeviceObject
290 
294  PDEVICE_OBJECT RootHubPdo; // RootHubDeviceObject
304  /* Miniport */
311  /* Bus Interface */
319  /* Dma Adapter */
322  /* Interrupt */
330  /* Endpoints */
339  /* Transfers */
347  /* Timer */
348  ULONG TimerValue; // Timer period (500) msec. default
353  /* Worker Thread */
358  /* Usb Devices */
363  /* Device Capabilities */
369  /* Idle */
375  /* Bad Requests */
380  /* Irp Queues */
383  /* Power */
389  /* Usb 2.0 HC Extension */
393 
394  /* Miniport extension should be aligned on 0x100 */
395 #if !defined(_M_X64)
397 #else
398  ULONG Padded[30];
399 #endif
400 
402 
403 #if !defined(_M_X64)
404 C_ASSERT(sizeof(USBPORT_DEVICE_EXTENSION) == 0x500);
405 #else
406 C_ASSERT(sizeof(USBPORT_DEVICE_EXTENSION) == 0x700);
407 #endif
408 
409 typedef struct _USBPORT_RH_DESCRIPTORS {
414  USB_HUB_DESCRIPTOR Descriptor; // Size may be: 7 + 2[1..32] (7 + 2..64)
416 
431 
437  ASYNC_TIMER_CALLBACK *CallbackFunction;
440 
441 C_ASSERT(sizeof(USBPORT_ASYNC_CALLBACK_DATA) == 16 + 18 * sizeof(PVOID));
442 
443 typedef struct _TIMER_WORK_QUEUE_ITEM {
448 
449 /* Transaction Translator */
450 /* See Chapter 5 - USB Data Flow Model and Chapter 11 - Hub Specification */
451 
452 #define USB2_FRAMES 32
453 #define USB2_MICROFRAMES 8
454 #define USB2_MAX_MICROFRAMES (USB2_FRAMES * USB2_MICROFRAMES)
455 #define USB2_PREV_MICROFRAME 0xFF
456 
457 #define USB2_MAX_MICROFRAME_ALLOCATION 7000 // bytes
458 #define USB2_CONTROLLER_DELAY 100
459 #define USB2_FS_MAX_PERIODIC_ALLOCATION 1157 // ((12000 / 8 bits) * 0.9) / (7/6) - 90% max, and bits stuffing
460 #define USB2_FS_SOF_TIME 6
461 #define USB2_HUB_DELAY 30
462 #define USB2_MAX_FS_LS_TRANSACTIONS_IN_UFRAME 16
463 #define USB2_FS_RAW_BYTES_IN_MICROFRAME 188 // (12000 / 8 bits / USB2_MICROFRAMES) = 187,5. But we use "best case budget"
464 
465 /* Overheads */
466 #define USB2_LS_INTERRUPT_OVERHEAD 117 // FS-bytes
467 #define USB2_FS_INTERRUPT_OVERHEAD 13
468 #define USB2_HS_INTERRUPT_OUT_OVERHEAD 45
469 #define USB2_HS_INTERRUPT_IN_OVERHEAD 25
470 #define USB2_FS_ISOCHRONOUS_OVERHEAD 9
471 #define USB2_HS_ISOCHRONOUS_OUT_OVERHEAD 38
472 #define USB2_HS_ISOCHRONOUS_IN_OVERHEAD 18
473 
474 #define USB2_HS_SS_INTERRUPT_OUT_OVERHEAD 58
475 #define USB2_HS_CS_INTERRUPT_OUT_OVERHEAD 36
476 #define USB2_HS_SS_INTERRUPT_IN_OVERHEAD 39
477 #define USB2_HS_CS_INTERRUPT_IN_OVERHEAD 38
478 
479 #define USB2_HS_SS_ISOCHRONOUS_OUT_OVERHEAD 58
480 #define USB2_HS_SS_ISOCHRONOUS_IN_OVERHEAD 39
481 #define USB2_HS_CS_ISOCHRONOUS_IN_OVERHEAD 38
482 
483 #define USB2_BIT_STUFFING_OVERHEAD (8 * (7/6)) // 7.1.9 Bit Stuffing
484 
486  struct {
492  };
495 
496 C_ASSERT(sizeof(USB2_TT_ENDPOINT_PARAMS) == sizeof(ULONG));
497 
498 typedef union _USB2_TT_ENDPOINT_NUMS {
499  struct {
503  };
506 
507 C_ASSERT(sizeof(USB2_TT_ENDPOINT_NUMS) == sizeof(ULONG));
508 
509 typedef struct _USB2_TT_ENDPOINT {
526 
527 typedef struct _USB2_FRAME_BUDGET {
534 
535 typedef struct _USB2_TT {
544 } USB2_TT, *PUSB2_TT;
545 
546 #define USB2_TT_EXTENSION_FLAG_DELETED 1
547 
548 typedef struct _USB2_TT_EXTENSION {
561 
562 typedef struct _USB2_HC_EXTENSION {
568 
569 typedef struct _USB2_REBALANCE {
572 
573 /* usbport.c */
574 NTSTATUS
575 NTAPI
577  IN PURB Urb,
578  IN USBD_STATUS USBDStatus);
579 
580 NTSTATUS
581 NTAPI
583  IN PVOID MiniPortExtension,
584  IN ULONG Milliseconds);
585 
586 VOID
587 NTAPI
589  IN PRKDPC Dpc,
593 
594 NTSTATUS
595 NTAPI
597  IN PDEVICE_OBJECT FdoDevice);
598 
599 VOID
600 NTAPI
602  IN PDEVICE_OBJECT FdoDevice);
603 
604 BOOLEAN
605 NTAPI
607  IN PDEVICE_OBJECT FdoDevice,
608  IN ULONG Time);
609 
611 NTAPI
613  IN PDEVICE_OBJECT FdoDevice,
615 
616 VOID
617 NTAPI
619  IN PDEVICE_OBJECT FdoDevice,
620  IN PUSBPORT_COMMON_BUFFER_HEADER HeaderBuffer);
621 
623 NTAPI
625  IN PDEVICE_OBJECT FdoDevice,
626  IN PURB Urb,
628  IN PIRP Irp,
629  IN PRKEVENT Event);
630 
631 VOID
632 NTAPI
634  IN PDEVICE_OBJECT FdoDevice);
635 
636 VOID
637 NTAPI
639  IN PRKDPC Dpc,
643 
644 BOOLEAN
645 NTAPI
649 
650 VOID
651 NTAPI
653  IN PDEVICE_OBJECT FdoDevice);
654 
655 VOID
656 NTAPI
658  IN PURB Urb,
659  IN USBD_STATUS TransferStatus);
660 
661 VOID
662 NTAPI
664  IN PDEVICE_OBJECT FdoDevice);
665 
666 VOID
667 NTAPI
669  IN PRKDPC Dpc,
673 
674 BOOLEAN
675 NTAPI
677  IN PUSBPORT_TRANSFER Transfer,
678  IN USBD_STATUS USBDStatus);
679 
680 VOID
681 NTAPI
683  IN PDEVICE_OBJECT FdoDevice,
684  IN BOOLEAN IsEnable);
685 
686 NTSTATUS
687 NTAPI
690  IN BOOL UseDriverKey,
691  IN ULONG Type,
692  IN PCWSTR ValueNameString,
693  IN PVOID Data,
694  IN ULONG DataSize);
695 
696 NTSTATUS
697 NTAPI
699  IN PDEVICE_OBJECT FdoDevice,
700  IN PDEVICE_OBJECT PdoDevice,
701  IN BOOL UseDriverKey,
703  IN ULONG LengthStr,
704  IN PVOID Buffer,
706 
707 VOID
708 NTAPI
710  IN PDEVICE_OBJECT FdoDevice);
711 
712 VOID
713 NTAPI
715  IN PDEVICE_OBJECT FdoDevice);
716 
717 VOID
718 NTAPI
720  IN PDEVICE_OBJECT FdoDevice);
721 
723 NTAPI
725  IN PDEVICE_OBJECT FdoDevice);
726 
728 NTAPI
730  IN PDEVICE_OBJECT USB2FdoDevice,
731  IN BOOLEAN IsObRefer,
732  IN BOOLEAN IsFDOsReturned);
733 
734 VOID
735 NTAPI
737  IN PDEVICE_OBJECT FdoDevice,
738  IN ULONG Type);
739 
740 VOID
741 NTAPI
743  IN PUSBPORT_TRANSFER Transfer);
744 
745 /* debug.c */
746 ULONG
747 NTAPI
749  IN PVOID MiniPortExtension,
750  IN ULONG Level,
751  IN PCH Format,
752  ...);
753 
754 ULONG
755 NTAPI
757  IN PVOID MiniPortExtension);
758 
759 ULONG
760 NTAPI
762  PVOID MiniPortExtension,
763  PVOID FailedAssertion,
764  PVOID FileName,
766  PCHAR Message);
767 
768 VOID
769 NTAPI
771  IN PVOID MiniPortExtension);
772 
773 ULONG
774 NTAPI
776  IN PVOID MiniPortExtension,
777  IN ULONG DriverTag,
778  IN ULONG EnumTag,
779  IN ULONG P1,
780  IN ULONG P2,
781  IN ULONG P3);
782 
783 VOID
784 NTAPI
787 
788 VOID
789 NTAPI
792 
793 VOID
794 NTAPI
797 
798 VOID
799 NTAPI
802 
803 VOID
804 NTAPI
806  IN PURB Urb);
807 
808 VOID
809 NTAPI
811  IN PVOID Buffer);
812 
813 /* device.c */
814 NTSTATUS
815 NTAPI
817  IN PDEVICE_OBJECT FdoDevice,
818  IN PIRP Irp,
819  IN PURB Urb);
820 
821 VOID
822 NTAPI
824  IN PDEVICE_OBJECT FdoDevice,
826 
827 VOID
828 NTAPI
830  IN PDEVICE_OBJECT FdoDevice,
832 
833 BOOLEAN
834 NTAPI
836  IN PDEVICE_OBJECT FdoDevice,
838 
839 NTSTATUS
840 NTAPI
842  IN OUT PUSB_DEVICE_HANDLE *pUsbdDeviceHandle,
843  IN PDEVICE_OBJECT FdoDevice,
846  IN USHORT Port);
847 
848 NTSTATUS
849 NTAPI
852  IN PDEVICE_OBJECT FdoDevice);
853 
854 NTSTATUS
855 NTAPI
858  IN PDEVICE_OBJECT FdoDevice,
859  IN UCHAR Type,
860  IN PUCHAR ConfigDesc,
861  IN PULONG ConfigDescSize);
862 
863 NTSTATUS
864 NTAPI
866  IN PDEVICE_OBJECT FdoDevice,
867  IN PIRP Irp,
868  IN PURB Urb);
869 
870 NTSTATUS
871 NTAPI
873  IN PDEVICE_OBJECT FdoDevice,
875  IN ULONG Flags);
876 
877 NTSTATUS
878 NTAPI
881  IN PDEVICE_OBJECT FdoDevice,
883  IN PVOID Buffer,
884  IN ULONG Length,
885  IN OUT PULONG TransferedLen,
886  IN OUT PUSBD_STATUS pUSBDStatus);
887 
888 NTSTATUS
889 NTAPI
891  IN PDEVICE_OBJECT FdoDevice,
894 
895 NTSTATUS
896 NTAPI
898  IN PDEVICE_OBJECT FdoDevice,
900  IN ULONG TtCount);
901 
902 /* endpoint.c */
903 NTSTATUS
904 NTAPI
906  IN PDEVICE_OBJECT FdoDevice,
910 
911 MPSTATUS
912 NTAPI
914  IN PDEVICE_OBJECT FdoDevice,
915  IN PUSBPORT_ENDPOINT Endpoint);
916 
917 NTSTATUS
918 NTAPI
920  IN PDEVICE_OBJECT FdoDevice,
921  IN PUSBPORT_ENDPOINT Endpoint);
922 
923 VOID
924 NTAPI
927  IN PDEVICE_OBJECT FdoDevice,
929 
930 VOID
931 NTAPI
933  IN PDEVICE_OBJECT FdoDevice,
934  IN PUSBPORT_ENDPOINT Endpoint);
935 
936 VOID
937 NTAPI
941 
942 VOID
943 NTAPI
947 
948 BOOLEAN
949 NTAPI
953 
954 VOID
955 NTAPI
957  IN PDEVICE_OBJECT FdoDevice);
958 
959 VOID
960 NTAPI
962  IN PUSBPORT_ENDPOINT Endpoint,
963  IN ULONG State);
964 
965 ULONG
966 NTAPI
968  IN PUSBPORT_ENDPOINT Endpoint);
969 
970 VOID
971 NTAPI
973  IN PDEVICE_OBJECT FdoDevice,
974  IN PUSBPORT_ENDPOINT Endpoint,
975  IN ULONG Type);
976 
977 BOOLEAN
978 NTAPI
980  IN PUSBPORT_ENDPOINT Endpoint,
981  IN BOOLEAN Flag);
982 
983 VOID
984 NTAPI
986  IN PDEVICE_OBJECT FdoDevice);
987 
988 BOOLEAN
989 NTAPI
991  IN PDEVICE_OBJECT FdoDevice,
992  IN PUSBPORT_ENDPOINT Endpoint,
993  IN PULONG TransferCount);
994 
995 /* iface.c */
996 NTSTATUS
997 NTAPI
999  IN PDEVICE_OBJECT FdoDevice,
1000  IN PDEVICE_OBJECT PdoDevice,
1001  IN PIRP Irp);
1002 
1003 /* ioctl.c */
1004 NTSTATUS
1005 NTAPI
1007  PDEVICE_OBJECT PdoDevice,
1008  PIRP Irp);
1009 
1010 NTSTATUS
1011 NTAPI
1013  PDEVICE_OBJECT FdoDevice,
1014  PIRP Irp);
1015 
1016 NTSTATUS
1017 NTAPI
1019  IN PDEVICE_OBJECT FdoDevice,
1020  IN PIRP Irp);
1021 
1022 NTSTATUS
1023 NTAPI
1025  IN PDEVICE_OBJECT FdoDevice,
1026  IN PIRP Irp);
1027 
1028 NTSTATUS
1029 NTAPI
1031  IN PDEVICE_OBJECT RootHubPdo,
1033 
1034 /* iso.c */
1036 NTAPI
1038  IN PDEVICE_OBJECT FdoDevice,
1039  IN struct _URB_ISOCH_TRANSFER * Urb,
1040  IN PUSBPORT_TRANSFER Transfer);
1041 
1042 ULONG
1043 NTAPI
1045  IN PVOID MiniPortExtension,
1046  IN PVOID MiniPortEndpoint,
1047  IN PVOID TransferParameters,
1048  IN ULONG TransferLength);
1049 
1050 /* pnp.c */
1051 NTSTATUS
1052 NTAPI
1054  IN PDEVICE_OBJECT FdoDevice,
1055  IN PIRP Irp);
1056 
1057 NTSTATUS
1058 NTAPI
1060  IN PDEVICE_OBJECT FdoDevice,
1061  IN PIRP Irp);
1062 
1063 /* power.c */
1064 NTSTATUS
1065 NTAPI
1067  IN PDEVICE_OBJECT PdoDevice,
1068  IN PIRP Irp);
1069 
1070 NTSTATUS
1071 NTAPI
1073  IN PDEVICE_OBJECT FdoDevice,
1074  IN PIRP Irp);
1075 
1076 NTSTATUS
1077 NTAPI
1079  IN PDEVICE_OBJECT PdoDevice,
1080  IN PIRP Irp);
1081 
1082 VOID
1083 NTAPI
1085  IN PDEVICE_OBJECT FdoDevice,
1086  IN PDEVICE_OBJECT PdoDevice);
1087 
1088 VOID
1089 NTAPI
1091  IN PVOID Context);
1092 
1093 VOID
1094 NTAPI
1096  IN PDEVICE_OBJECT FdoDevice);
1097 
1098 VOID
1099 NTAPI
1101  IN PDEVICE_OBJECT FdoDevice);
1102 
1103 VOID
1104 NTAPI
1106  IN PRKDPC Dpc,
1110 
1111 VOID
1112 NTAPI
1114  IN PDEVICE_OBJECT FdoDevice);
1115 
1116 /* queue.c */
1117 VOID
1118 NTAPI
1120  IN PIO_CSQ Csq,
1121  IN PIRP Irp);
1122 
1123 VOID
1124 NTAPI
1126  IN PIO_CSQ Csq,
1127  IN PIRP Irp);
1128 
1129 PIRP
1130 NTAPI
1132  IN PIO_CSQ Csq,
1133  IN PIRP Irp,
1134  IN PVOID PeekContext);
1135 
1136 VOID
1137 NTAPI
1139  IN PIO_CSQ Csq,
1140  IN PKIRQL Irql);
1141 
1142 VOID
1143 NTAPI
1145  IN PIO_CSQ Csq,
1146  IN KIRQL Irql);
1147 
1148 VOID
1149 NTAPI
1151  IN PIO_CSQ Csq,
1152  IN PIRP Irp);
1153 
1154 VOID
1155 NTAPI
1157  IN PIO_CSQ Csq,
1158  IN PIRP Irp);
1159 
1160 VOID
1161 NTAPI
1163  IN PIO_CSQ Csq,
1164  IN PIRP Irp);
1165 
1166 PIRP
1167 NTAPI
1169  IN PIO_CSQ Csq,
1170  IN PIRP Irp,
1171  IN PVOID PeekContext);
1172 
1173 VOID
1174 NTAPI
1176  IN PIO_CSQ Csq,
1177  IN PKIRQL Irql);
1178 
1179 VOID
1180 NTAPI
1182  IN PIO_CSQ Csq,
1183  IN KIRQL Irql);
1184 
1185 VOID
1186 NTAPI
1188  IN PIO_CSQ Csq,
1189  IN PIRP Irp);
1190 
1191 VOID
1192 NTAPI
1194  IN PUSBPORT_IRP_TABLE IrpTable,
1195  IN PIRP Irp);
1196 
1197 PIRP
1198 NTAPI
1200  IN PDEVICE_OBJECT FdoDevice,
1201  IN PIRP Irp);
1202 
1203 PIRP
1204 NTAPI
1206  IN PDEVICE_OBJECT FdoDevice,
1207  IN PIRP Irp);
1208 
1209 VOID
1210 NTAPI
1212  IN PUSBPORT_IRP_TABLE IrpTable,
1213  IN PURB Urb,
1214  IN PIRP Irp);
1215 
1216 VOID
1217 NTAPI
1220  IN PIRP Irp);
1221 
1222 VOID
1223 NTAPI
1225  IN PUSBPORT_ENDPOINT Endpoint);
1226 
1227 VOID
1228 NTAPI
1230  IN PUSBPORT_ENDPOINT Endpoint);
1231 
1232 VOID
1233 NTAPI
1235  IN PURB Urb);
1236 
1237 VOID
1238 NTAPI
1240  IN PDEVICE_OBJECT FdoDevice);
1241 
1242 VOID
1243 NTAPI
1245  IN PUSBPORT_ENDPOINT Endpoint);
1246 
1247 BOOLEAN
1248 NTAPI
1250  IN PUSBPORT_ENDPOINT Endpoint,
1251  IN PURB Urb);
1252 
1253 VOID
1254 NTAPI
1256  IN PDEVICE_OBJECT FdoDevice);
1257 
1258 VOID
1259 NTAPI
1261  IN PDEVICE_OBJECT FdoDevice);
1262 
1263 VOID
1264 NTAPI
1266  IN PDEVICE_OBJECT FdoDevice,
1267  IN PUSBPORT_ENDPOINT Endpoint,
1268  IN PIRP Irp);
1269 
1270 /* roothub.c */
1271 VOID
1272 NTAPI
1274  PUSBPORT_ENDPOINT Endpoint);
1275 
1276 NTSTATUS
1277 NTAPI
1279  IN PDEVICE_OBJECT FdoDevice,
1280  IN PDEVICE_OBJECT PdoDevice);
1281 
1282 ULONG
1283 NTAPI
1285  PVOID MiniPortExtension);
1286 
1287 VOID
1288 NTAPI
1290  IN PDEVICE_OBJECT FdoDevice);
1291 
1292 /* trfsplit.c */
1293 VOID
1294 NTAPI
1296  IN PDEVICE_OBJECT FdoDevice,
1297  IN PUSBPORT_ENDPOINT Endpoint,
1298  IN PUSBPORT_TRANSFER Transfer,
1299  IN PLIST_ENTRY List);
1300 
1301 VOID
1302 NTAPI
1304  IN PUSBPORT_TRANSFER SplitTransfer);
1305 
1306 VOID
1307 NTAPI
1309  IN PUSBPORT_TRANSFER SplitTransfer);
1310 
1311 /* urb.c */
1312 NTSTATUS
1313 NTAPI
1315  IN PDEVICE_OBJECT PdoDevice,
1316  IN PIRP Irp,
1317  IN PURB Urb);
1318 
1319 /* usb2.c */
1320 BOOLEAN
1321 NTAPI
1323  IN PDEVICE_OBJECT FdoDevice,
1324  IN PUSBPORT_ENDPOINT Endpoint);
1325 
1326 VOID
1327 NTAPI
1329  IN PDEVICE_OBJECT FdoDevice,
1330  IN PUSBPORT_ENDPOINT Endpoint);
1331 
1332 VOID
1333 NTAPI
1335  IN PUSB2_TT_EXTENSION TtExtension);
1336 
1337 VOID
1338 NTAPI
1339 USB2_InitTT(
1340  IN PUSB2_HC_EXTENSION HcExtension,
1341  IN PUSB2_TT Tt);
1342 
1343 VOID
1344 NTAPI
1346  IN PUSB2_HC_EXTENSION HcExtension);
1347 
1348 VOID
1349 NTAPI
1351  IN PUSBPORT_ENDPOINT_PROPERTIES EndpointProperties);
1352 
1353 VOID
1354 NTAPI
1356  IN PUSB2_TT_ENDPOINT TtEndpoint);
1357 
1358 #endif /* USBPORT_H__ */
ULONG NumberOfMapRegisters
Definition: usbport.h:260
ULONG MPSTATUS
Definition: usbmport.h:131
#define USB2_MICROFRAMES
Definition: usbport.h:453
USB2_FRAME_BUDGET FrameBudget[USB2_FRAMES]
Definition: usbport.h:541
KSPIN_LOCK SetPowerD0SpinLock
Definition: usbport.h:386
signed char * PCHAR
Definition: retypes.h:7
LIST_ENTRY SplitLink
Definition: usbport.h:267
MPSTATUS NTAPI MiniportOpenEndpoint(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint)
Definition: endpoint.c:722
BOOLEAN NTAPI USBPORT_EndpointWorker(IN PUSBPORT_ENDPOINT Endpoint, IN BOOLEAN Flag)
Definition: endpoint.c:1656
USBPORT_SCATTER_GATHER_LIST SgList
Definition: usbport.h:271
VOID NTAPI USBPORT_SetEndpointState(IN PUSBPORT_ENDPOINT Endpoint, IN ULONG State)
Definition: endpoint.c:363
struct _USB2_REBALANCE USB2_REBALANCE
BOOLEAN NTAPI USBPORT_InterruptService(IN PKINTERRUPT Interrupt, IN PVOID ServiceContext)
Definition: usbport.c:1077
CPPORT Port[4]
Definition: headless.c:35
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define IN
Definition: typedefs.h:39
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3767
NTSTATUS NTAPI USBPORT_OpenPipe(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PUSBPORT_PIPE_HANDLE PipeHandle, IN PUSBD_STATUS UsbdStatus)
PUSB2_TT_ENDPOINT TtEndpoint
Definition: usbport.h:210
PDEVICE_OBJECT FdoDevice
Definition: usbport.h:445
VOID NTAPI USBPORT_HcQueueWakeDpc(IN PDEVICE_OBJECT FdoDevice)
Definition: power.c:63
LIST_ENTRY EndpointLink
Definition: usbport.h:232
BOOLEAN NTAPI USBPORT_AllocateBandwidthUSB2(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint)
Definition: usb2.c:1799
struct _USBPORT_TRANSFER USBPORT_TRANSFER
NTSTATUS NTAPI USBPORT_CreateWorkerThread(IN PDEVICE_OBJECT FdoDevice)
Definition: usbport.c:1427
BOOLEAN NTAPI USBPORT_QueueDoneTransfer(IN PUSBPORT_TRANSFER Transfer, IN USBD_STATUS USBDStatus)
Definition: usbport.c:839
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_Inout_ PUSB_DEVICE_HANDLE DeviceHandle
Definition: hubbusif.h:121
LIST_ENTRY WorkerLink
Definition: usbport.h:233
NTSTATUS NTAPI USBPORT_RemoveDevice(IN PDEVICE_OBJECT FdoDevice, IN OUT PUSBPORT_DEVICE_HANDLE DeviceHandle, IN ULONG Flags)
Definition: device.c:1584
struct _USBPORT_ASYNC_CALLBACK_DATA * PUSBPORT_ASYNC_CALLBACK_DATA
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
Definition: wdfdpc.h:107
USBD_STATUS NTAPI USBPORT_AllocateTransfer(IN PDEVICE_OBJECT FdoDevice, IN PURB Urb, IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PIRP Irp, IN PRKEVENT Event)
Definition: usbport.c:2543
NTSTATUS NTAPI USBPORT_SendSetupPacket(IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PDEVICE_OBJECT FdoDevice, IN PUSB_DEFAULT_PIPE_SETUP_PACKET SetupPacket, IN PVOID Buffer, IN ULONG Length, IN OUT PULONG TransferedLen, IN OUT PUSBD_STATUS pUSBDStatus)
Definition: device.c:15
KSPIN_LOCK DeviceHandleSpinLock
Definition: usbport.h:361
LIST_ENTRY FlushLink
Definition: usbport.h:236
struct _TIMER_WORK_QUEUE_ITEM * PTIMER_WORK_QUEUE_ITEM
NTSTATUS NTAPI USBPORT_FdoDeviceControl(PDEVICE_OBJECT FdoDevice, PIRP Irp)
VOID NTAPI USBPORT_BadRequestFlush(IN PDEVICE_OBJECT FdoDevice)
Definition: queue.c:1328
ULONG MinBandwidth
Definition: usbport.h:554
LIST_ENTRY ControllerLink
Definition: usbport.h:302
VOID NTAPI USBPORT_RemovePipeHandle(IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PUSBPORT_PIPE_HANDLE PipeHandle)
Definition: endpoint.c:456
LARGE_INTEGER Time
Definition: usbport.h:263
VOID NTAPI USBPORT_FlushAllEndpoints(IN PDEVICE_OBJECT FdoDevice)
Definition: queue.c:1171
USB_CONFIGURATION_DESCRIPTOR ConfigDescriptor
Definition: usbport.h:411
LIST_ENTRY FlushAbortLink
Definition: usbport.h:238
LIST_ENTRY MapTransferList
Definition: usbport.h:340
VOID NTAPI USBPORT_DumpingDeviceDescriptor(IN PUSB_DEVICE_DESCRIPTOR DeviceDescriptor)
Definition: debug.c:80
ULONG TimeUsed[USB2_FRAMES][USB2_MICROFRAMES]
Definition: usbport.h:565
VOID NTAPI USBPORT_DoneSplitTransfer(IN PUSBPORT_TRANSFER SplitTransfer)
Definition: trfsplit.c:278
KSPIN_LOCK BadRequestIoCsqSpinLock
Definition: usbport.h:377
PUSBPORT_COMMON_BUFFER_HEADER NTAPI USBPORT_AllocateCommonBuffer(IN PDEVICE_OBJECT FdoDevice, IN SIZE_T BufferLength)
Definition: usbport.c:1708
USHORT StartTime
Definition: usbport.h:521
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET SetupPacket
Definition: wdfusb.h:1331
PDEVICE_OBJECT LowerPdoDevice
Definition: usbport.h:282
struct _USB2_TT_EXTENSION * PUSB2_TT_EXTENSION
Definition: usbport.h:158
NTSTATUS NTAPI USBPORT_Initialize20Hub(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_DEVICE_HANDLE HubDeviceHandle, IN ULONG TtCount)
Definition: device.c:2012
VOID NTAPI USBPORT_AdjustDeviceCapabilities(IN PDEVICE_OBJECT FdoDevice, IN PDEVICE_OBJECT PdoDevice)
Definition: power.c:668
NTSTATUS NTAPI USBPORT_Wait(IN PVOID MiniPortExtension, IN ULONG Milliseconds)
Definition: usbport.c:543
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFINTERRUPT * Interrupt
Definition: wdfinterrupt.h:372
PUSB2_HC_EXTENSION HcExtension
Definition: usbport.h:536
unsigned char * PUCHAR
Definition: retypes.h:3
NTSTATUS NTAPI USBPORT_HandleSelectConfiguration(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp, IN PURB Urb)
Definition: device.c:574
USBPORT_TRANSFER_PARAMETERS TransferParameters
Definition: usbport.h:254
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI USBPORT_InvalidateEndpointHandler(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint, IN ULONG Type)
Definition: endpoint.c:1317
struct _USBPORT_DEVICE_HANDLE * HubDeviceHandle
Definition: usbport.h:195
VOID NTAPI USBPORT_AbortEndpoint(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint, IN PIRP Irp)
Definition: queue.c:1354
UNICODE_STRING DosDeviceSymbolicName
Definition: usbport.h:300
LIST_ENTRY Link
Definition: usbport.h:558
struct _USBPORT_COMMON_DEVICE_EXTENSION * PUSBPORT_COMMON_DEVICE_EXTENSION
PDMA_ADAPTER DmaAdapter
Definition: usbport.h:320
NTSTATUS NTAPI USBPORT_PdoPnP(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
Definition: pnp.c:1517
VOID NTAPI USBPORT_AcquireIdleLock(IN PIO_CSQ Csq, IN PKIRQL Irql)
Definition: queue.c:91
_In_ NTSTATUS _In_ USBD_STATUS UsbdStatus
Definition: wdfusb.h:400
_Outptr_ PUSB_DEVICE_HANDLE _In_ PUSB_DEVICE_HANDLE HubDeviceHandle
Definition: hubbusif.h:40
struct _USBPORT_COMMON_BUFFER_HEADER USBPORT_COMMON_BUFFER_HEADER
LIST_ENTRY IdleIrpList
Definition: usbport.h:373
VOID NTAPI USBPORT_CompleteCanceledIdleIrp(IN PIO_CSQ Csq, IN PIRP Irp)
Definition: queue.c:123
struct _USBPORT_COMMON_BUFFER_HEADER * PUSBPORT_COMMON_BUFFER_HEADER
LIST_ENTRY DoneTransferList
Definition: usbport.h:342
DEVICE_CAPABILITIES Capabilities
Definition: usbport.h:428
ULONG MaxBandwidth
Definition: usbport.h:553
LIST_ENTRY DeviceHandleLink
Definition: usbport.h:197
PMDL TransferBufferMDL
Definition: usbport.h:255
NTSTATUS NTAPI USBPORT_SetRegistryKeyValue(IN PDEVICE_OBJECT DeviceObject, IN BOOL UseDriverKey, IN ULONG Type, IN PCWSTR ValueNameString, IN PVOID Data, IN ULONG DataSize)
Definition: usbport.c:248
DEVICE_CAPABILITIES
Definition: iotypes.h:965
VOID NTAPI USBPORT_DumpingURB(IN PURB Urb)
Definition: debug.c:225
PDEVICE_OBJECT FdoDevice
Definition: usbport.h:434
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:55
VOID NTAPI USBPORT_CancelActiveTransferIrp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: queue.c:529
VOID NTAPI USBPORT_RemoveUSBxFdo(IN PDEVICE_OBJECT FdoDevice)
Definition: usbport.c:98
BOOLEAN NTAPI USBPORT_ValidateDeviceHandle(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_DEVICE_HANDLE DeviceHandle)
Definition: device.c:801
VOID NTAPI USBPORT_TransferFlushDpc(IN PRKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: usbport.c:825
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: device.c:982
LARGE_INTEGER IdleTime
Definition: usbport.h:370
LIST_ENTRY AbortList
Definition: usbport.h:230
VOID NTAPI USBPORT_FreeBandwidthUSB2(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint)
Definition: usb2.c:2040
VOID NTAPI USBPORT_SignalWorkerThread(IN PDEVICE_OBJECT FdoDevice)
Definition: usbport.c:1111
struct _USB2_TT * PUSB2_TT
Definition: usbport.h:159
VOID NTAPI USBPORT_ReleaseBadRequestLock(IN PIO_CSQ Csq, IN KIRQL Irql)
Definition: queue.c:230
NTSTATUS NTAPI USBPORT_FdoPower(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
Definition: power.c:489
VOID NTAPI USBPORT_FreeCommonBuffer(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_COMMON_BUFFER_HEADER HeaderBuffer)
Definition: usbport.c:1770
PRH_INIT_CALLBACK RootHubInitCallback
Definition: usbport.h:426
ULONG NTAPI USBPORT_GetEndpointState(IN PUSBPORT_ENDPOINT Endpoint)
Definition: endpoint.c:332
PRKEVENT Event
Definition: usbport.h:249
LIST_ENTRY DeviceHandleList
Definition: usbport.h:360
ULONG NumStartSplits[USB2_FRAMES][USB2_MICROFRAMES]
Definition: usbport.h:542
_Out_ PKIRQL Irql
Definition: csq.h:179
USBPORT_COMMON_DEVICE_EXTENSION CommonExtension
Definition: usbport.h:292
ULONG NTAPI USBPORT_DbgPrint(IN PVOID MiniPortExtension, IN ULONG Level, IN PCH Format,...)
Definition: debug.c:20
VOID NTAPI USB2_InitController(IN PUSB2_HC_EXTENSION HcExtension)
Definition: usb2.c:2217
struct _USB2_HC_EXTENSION USB2_HC_EXTENSION
KSPIN_LOCK StateChangeSpinLock
Definition: usbport.h:225
NTSTATUS NTAPI USBPORT_HandleSubmitURB(IN PDEVICE_OBJECT PdoDevice, IN PIRP Irp, IN PURB Urb)
Definition: urb.c:791
VOID NTAPI USBPORT_DoIdleNotificationCallback(IN PVOID Context)
Definition: power.c:545
PUSB2_TT_EXTENSION TtExtension
Definition: usbport.h:209
PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor
Definition: usbport.h:172
LIST_ENTRY DispatchLink
Definition: usbport.h:235
VOID NTAPI USBPORT_DoneTransfer(IN PUSBPORT_TRANSFER Transfer)
Definition: usbport.c:724
uint32_t ULONG_PTR
Definition: typedefs.h:65
VOID NTAPI USBPORT_DoSetPowerD0(IN PDEVICE_OBJECT FdoDevice)
Definition: power.c:104
KSPIN_LOCK FlushPendingTransferSpinLock
Definition: usbport.h:346
C_ASSERT(sizeof(USBPORT_DEVICE_EXTENSION)==0x500)
USHORT Reserved2
Definition: usbport.h:532
KSEMAPHORE ControllerSemaphore
Definition: usbport.h:298
struct _USB2_TT_ENDPOINT USB2_TT_ENDPOINT
struct _USBPORT_ISO_BLOCK * PUSBPORT_ISO_BLOCK
Definition: usbport.h:243
struct _USBPORT_RHDEVICE_EXTENSION * PUSBPORT_RHDEVICE_EXTENSION
UCHAR KIRQL
Definition: env_spec_w32.h:591
USBD_STATUS * PUSBD_STATUS
Definition: usbport.h:144
LIST_ENTRY EndpointList
Definition: usbport.h:557
USHORT ActualPeriod
Definition: usbport.h:519
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
VOID NTAPI USBPORT_InsertIdleIrp(IN PIO_CSQ Csq, IN PIRP Irp)
Definition: queue.c:20
_Inout_ PUSB_DEVICE_HANDLE OldDeviceHandle
Definition: hubbusif.h:161
UCHAR StartFrame
Definition: usbport.h:523
struct _USBPORT_TRANSFER * ParentTransfer
Definition: usbport.h:264
KSPIN_LOCK MiniportSpinLock
Definition: usbport.h:310
KSPIN_LOCK EpStateChangeSpinLock
Definition: usbport.h:335
VOID NTAPI USBPORT_RemoveDeviceHandle(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_DEVICE_HANDLE DeviceHandle)
Definition: device.c:784
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
LIST_ENTRY BadRequestList
Definition: usbport.h:378
VOID NTAPI USBPORT_SplitTransfer(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint, IN PUSBPORT_TRANSFER Transfer, IN PLIST_ENTRY List)
Definition: trfsplit.c:232
WORK_QUEUE_ITEM WqItem
Definition: usbport.h:444
PUSBPORT_IRP_TABLE PendingIrpTable
Definition: usbport.h:381
USB2_TT_ENDPOINT_PARAMS TtEndpointParams
Definition: usbport.h:513
_In_ PIRP Irp
Definition: csq.h:116
VOID NTAPI USBPORT_BugCheck(IN PVOID MiniPortExtension)
Definition: debug.c:52
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
Definition: hidclass.h:103
PDEVICE_OBJECT FdoDevice
Definition: usbport.h:206
unsigned int BOOL
Definition: ntddk_ex.h:94
LIST_ENTRY PendingTransferList
Definition: usbport.h:227
PUSBPORT_COMMON_BUFFER_HEADER HeaderBuffer
Definition: usbport.h:207
long LONG
Definition: pedump.c:60
VOID NTAPI MiniportCloseEndpoint(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint)
Definition: endpoint.c:549
VOID NTAPI USBPORT_InsertIrpInTable(IN PUSBPORT_IRP_TABLE IrpTable, IN PIRP Irp)
Definition: queue.c:266
USB2_TT_ENDPOINT IsoEndpoint[USB2_FRAMES]
Definition: usbport.h:540
LIST_ENTRY TransferList
Definition: usbport.h:228
KIRQL EndpointOldIrql
Definition: usbport.h:216
USHORT MaxPacketSize
Definition: usbport.h:516
struct _USBPORT_IRP_TABLE * PUSBPORT_IRP_TABLE
struct _USBPORT_DEVICE_EXTENSION USBPORT_DEVICE_EXTENSION
VOID NTAPI USBPORT_ReleaseIdleLock(IN PIO_CSQ Csq, IN KIRQL Irql)
Definition: queue.c:107
VOID NTAPI USBPORT_DumpingTtEndpoint(IN PUSB2_TT_ENDPOINT TtEndpoint)
Definition: debug.c:301
NTSTATUS NTAPI USBPORT_RestoreDevice(IN PDEVICE_OBJECT FdoDevice, IN OUT PUSBPORT_DEVICE_HANDLE OldDeviceHandle, IN OUT PUSBPORT_DEVICE_HANDLE NewDeviceHandle)
Definition: device.c:1701
NTSTATUS NTAPI USBPORT_HandleSelectInterface(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp, IN PURB Urb)
Definition: device.c:1486
LIST_ENTRY InterfaceLink
Definition: usbport.h:178
CHAR * PCH
Definition: ntbasedef.h:391
DEVICE_CAPABILITIES Capabilities
Definition: usbport.h:364
PUSBPORT_IRP_TABLE ActiveIrpTable
Definition: usbport.h:382
ULONG NTAPI USBPORT_AssertFailure(PVOID MiniPortExtension, PVOID FailedAssertion, PVOID FileName, ULONG LineNumber, PCHAR Message)
Definition: debug.c:39
PUSB2_HC_EXTENSION Usb2Extension
Definition: usbport.h:390
unsigned char BOOLEAN
_Out_ _Inout_ POEM_STRING DestinationString
Definition: rtlfuncs.h:1868
PUSBPORT_MINIPORT_INTERFACE MiniPortInterface
Definition: usbport.h:307
_Must_inspect_result_ _In_ WDFUSBDEVICE _Out_writes_bytes_to_opt_ ConfigDescriptorLength PVOID ConfigDescriptor
Definition: wdfusb.h:1036
union _USB2_TT_ENDPOINT_NUMS USB2_TT_ENDPOINT_NUMS
USBD_STATUS NTAPI USBPORT_InitializeIsoTransfer(IN PDEVICE_OBJECT FdoDevice, IN struct _URB_ISOCH_TRANSFER *Urb, IN PUSBPORT_TRANSFER Transfer)
PDEVICE_OBJECT RootHubPdo
Definition: usbport.h:294
struct _USBPORT_COMMON_DEVICE_EXTENSION USBPORT_COMMON_DEVICE_EXTENSION
struct _USB2_TT_ENDPOINT * PUSB2_TT_ENDPOINT
Definition: usbport.h:160
Definition: bufpool.h:45
VOID NTAPI USBPORT_DumpingIDs(IN PVOID Buffer)
Definition: debug.c:258
struct _USBPORT_PIPE_HANDLE USBPORT_PIPE_HANDLE
PUSBPORT_ENDPOINT Endpoint
Definition: usbport.h:424
PUSBPORT_CONFIGURATION_HANDLE ConfigHandle
Definition: usbport.h:194
ULONG NTAPI USBPORT_LogEntry(IN PVOID MiniPortExtension, IN ULONG DriverTag, IN ULONG EnumTag, IN ULONG P1, IN ULONG P2, IN ULONG P3)
Definition: debug.c:61
LIST_ENTRY EndpointList
Definition: usbport.h:332
VOID NTAPI USBPORT_WorkerRequestDpc(IN PRKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: usbport.c:701
SIZE_T PortTransferLength
Definition: usbport.h:251
enum _USB_DEVICE_SPEED USB_DEVICE_SPEED
USB_INTERFACE_DESCRIPTOR InterfaceDescriptor
Definition: usbport.h:181
PUSBPORT_ENDPOINT Endpoint
Definition: usbport.h:253
ULONG Bandwidth[USB2_FRAMES]
Definition: usbport.h:552
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:675
PDEVICE_OBJECT RootHubPdo
Definition: usbport.h:549
LIST_ENTRY TransferLink
Definition: usbport.h:257
PUSB2_TT_ENDPOINT IsoEndpoint
Definition: usbport.h:528
PIRP NTAPI USBPORT_PeekNextIdleIrp(IN PIO_CSQ Csq, IN PIRP Irp, IN PVOID PeekContext)
Definition: queue.c:46
const KSDEVICE_DESCRIPTOR DeviceDescriptor
Definition: splitter.c:257
NTSTATUS NTAPI USBPORT_PdoInternalDeviceControl(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
Definition: ioctl.c:317
PUSBPORT_ENDPOINT Endpoint
Definition: usbport.h:511
struct _USB2_TT_ENDPOINT * NextTtEndpoint
Definition: usbport.h:512
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 NumberOfBytes)
Definition: usbport.c:296
KSPIN_LOCK DoneTransferSpinLock
Definition: usbport.h:343
NTSTATUS NTAPI USBPORT_IdleNotification(IN PDEVICE_OBJECT PdoDevice, IN PIRP Irp)
Definition: power.c:612
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
ULONG MaxHsBusAllocation
Definition: usbport.h:563
struct _USB2_FRAME_BUDGET USB2_FRAME_BUDGET
USBPORT_DEVICE_HANDLE DeviceHandle
Definition: usbport.h:422
LIST_ENTRY InterfaceHandleList
Definition: usbport.h:173
ASYNC_TIMER_CALLBACK * CallbackFunction
Definition: usbport.h:437
ULONG EndpointWorker
Definition: usbport.h:212
VOID NTAPI USBPORT_InvalidateControllerHandler(IN PDEVICE_OBJECT FdoDevice, IN ULONG Type)
Definition: usbport.c:635
BOOLEAN NTAPI USBPORT_StartTimer(IN PDEVICE_OBJECT FdoDevice, IN ULONG Time)
Definition: usbport.c:1675
struct _USBPORT_ENDPOINT USBPORT_ENDPOINT
USBPORT_RESOURCES UsbPortResources
Definition: usbport.h:308
ULONG MaxTime
Definition: usbport.h:538
Definition: xml2sdb.h:79
KSPIN_LOCK FlushTransferSpinLock
Definition: usbport.h:345
PVOID MiniportTransfer
Definition: usbport.h:250
struct _USBPORT_IRP_TABLE USBPORT_IRP_TABLE
KSPIN_LOCK EndpointClosedSpinLock
Definition: usbport.h:337
struct _USBPORT_ENDPOINT * PUSBPORT_ENDPOINT
Definition: usbport.h:155
Type
Definition: Type.h:6
USB2_TT_ENDPOINT IntEndpoint[USB2_FRAMES]
Definition: usbport.h:539
PUSBPORT_DEVICE_HANDLE DeviceHandle
Definition: usbport.h:208
RH_INIT_CALLBACK * PRH_INIT_CALLBACK
Definition: hubbusif.h:270
UCHAR StartMicroframe
Definition: usbport.h:524
BOOLEAN NTAPI USBPORT_QueueActiveUrbToEndpoint(IN PUSBPORT_ENDPOINT Endpoint, IN PURB Urb)
Definition: queue.c:988
struct _USBPORT_DEVICE_EXTENSION * PUSBPORT_DEVICE_EXTENSION
struct _USBPORT_RH_DESCRIPTORS * PUSBPORT_RH_DESCRIPTORS
VOID NTAPI USBPORT_HcWakeDpc(IN PRKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: power.c:52
LIST_ENTRY CloseLink
Definition: usbport.h:234
UCHAR Padded[2]
Definition: usbport.h:218
struct _USBPORT_IRP_TABLE * LinkNextTable
Definition: usbport.h:276
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID ServiceContext
Definition: iofuncs.h:800
ULONG DelayTime
Definition: usbport.h:537
LIST_ENTRY EndpointClosedList
Definition: usbport.h:336
NTSTATUS NTAPI USBPORT_PdoQueryInterface(IN PDEVICE_OBJECT FdoDevice, IN PDEVICE_OBJECT PdoDevice, IN PIRP Irp)
Definition: iface.c:782
CHAR Message[80]
Definition: alive.c:5
VOID NTAPI USBPORT_FlushMapTransfers(IN PDEVICE_OBJECT FdoDevice)
Definition: usbport.c:2483
VOID NTAPI USBPORT_RootHubPowerAndChirpAllCcPorts(IN PDEVICE_OBJECT FdoDevice)
Definition: roothub.c:963
USHORT PreviosPeriod
Definition: usbport.h:517
VOID NTAPI USBPORT_CompleteCanceledBadRequest(IN PIO_CSQ Csq, IN PIRP Irp)
Definition: queue.c:246
USB_DEVICE_DESCRIPTOR DeviceDescriptor
Definition: usbport.h:410
unsigned char UCHAR
Definition: xmlstorage.h:181
VOID NTAPI USBPORT_AcquireBadRequestLock(IN PIO_CSQ Csq, IN PKIRQL Irql)
Definition: queue.c:214
NTSTATUS NTAPI USBPORT_PdoDeviceControl(PDEVICE_OBJECT PdoDevice, PIRP Irp)
struct _USB2_HC_EXTENSION * PUSB2_HC_EXTENSION
Definition: usbport.h:157
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
Definition: rtlfuncs.h:1868
VOID NTAPI USBPORT_MiniportInterrupts(IN PDEVICE_OBJECT FdoDevice, IN BOOLEAN IsEnable)
Definition: usbport.c:555
ULONG BusBandwidth
Definition: usbport.h:551
VOID NTAPI USBPORT_CompleteTransfer(IN PURB Urb, IN USBD_STATUS TransferStatus)
Definition: usbport.c:2198
LIST_ENTRY FlushControllerLink
Definition: usbport.h:237
Definition: ketypes.h:687
LONG USBD_STATUS
Definition: usb.h:165
struct _USBPORT_CONFIGURATION_HANDLE * PUSBPORT_CONFIGURATION_HANDLE
USHORT CalcBusTime
Definition: usbport.h:520
NTSTATUS NTAPI USBPORT_InitializeDevice(IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PDEVICE_OBJECT FdoDevice)
Definition: device.c:1316
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
LIST_ENTRY PipeHandleList
Definition: usbport.h:193
KIRQL * PKIRQL
Definition: env_spec_w32.h:592
ULONG NTAPI USBPORT_CompleteIsoTransfer(IN PVOID MiniPortExtension, IN PVOID MiniPortEndpoint, IN PVOID TransferParameters, IN ULONG TransferLength)
Definition: iso.c:25
USB_DEVICE_SPEED DeviceSpeed
Definition: usbport.h:489
struct _USBPORT_CONFIGURATION_HANDLE USBPORT_CONFIGURATION_HANDLE
PUSB2_TT Tt
Definition: usbport.h:510
USB2_TT_ENDPOINT_NUMS Nums
Definition: usbport.h:514
struct _USB2_FRAME_BUDGET * PUSB2_FRAME_BUDGET
Definition: typedefs.h:119
NTSTATUS NTAPI USBPORT_USBDStatusToNtStatus(IN PURB Urb, IN USBD_STATUS USBDStatus)
Definition: usbport.c:485
LONG FlushPendingLock
Definition: usbport.h:220
VOID NTAPI USBPORT_QueueTransferUrb(IN PURB Urb)
Definition: queue.c:1085
struct _USBPORT_PIPE_HANDLE * PUSBPORT_PIPE_HANDLE
VOID NTAPI USBPORT_UpdateAllocatedBwTt(IN PUSB2_TT_EXTENSION TtExtension)
Definition: usb2.c:1768
USB_HUB_DESCRIPTOR Descriptor
Definition: usbport.h:414
PUSBPORT_COMMON_BUFFER_HEADER MiniPortCommonBuffer
Definition: usbport.h:309
_Outptr_ PUSB_DEVICE_HANDLE _In_ PUSB_DEVICE_HANDLE _In_ USHORT PortStatus
Definition: hubbusif.h:40
USB_ENDPOINT_DESCRIPTOR EndpointDescriptor
Definition: usbport.h:165
VOID NTAPI USBPORT_AddDeviceHandle(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_DEVICE_HANDLE DeviceHandle)
Definition: device.c:769
PIRP NTAPI USBPORT_RemovePendingTransferIrp(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
Definition: queue.c:369
USBPORT_PIPE_HANDLE PipeHandle
Definition: usbport.h:190
PUSB2_TT_ENDPOINT AltEndpoint
Definition: usbport.h:530
* PDEVICE_CAPABILITIES
Definition: iotypes.h:965
VOID NTAPI USBPORT_FlushCancelList(IN PUSBPORT_ENDPOINT Endpoint)
Definition: queue.c:714
VOID NTAPI USBPORT_DumpingConfiguration(IN PUSB_CONFIGURATION_DESCRIPTOR ConfigDescriptor)
Definition: debug.c:106
USBPORT_ENDPOINT_PROPERTIES EndpointProperties
Definition: usbport.h:211
struct _USBPORT_TRANSFER * PUSBPORT_TRANSFER
VOID NTAPI USBPORT_AddPipeHandle(IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PUSBPORT_PIPE_HANDLE PipeHandle)
Definition: endpoint.c:444
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:675
struct _USBPORT_DEVICE_HANDLE * PUSBPORT_DEVICE_HANDLE
VOID NTAPI USBPORT_DumpingEndpointProperties(IN PUSBPORT_ENDPOINT_PROPERTIES EndpointProperties)
Definition: debug.c:281
VOID NTAPI USBPORT_DumpingCapabilities(IN PDEVICE_CAPABILITIES Capabilities)
Definition: debug.c:171
BOOLEAN NTAPI USBPORT_EndpointHasQueuedTransfers(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint, IN PULONG TransferCount)
Definition: endpoint.c:254
Definition: csq.h:222
SIZE_T FullTransferLength
Definition: usbport.h:252
ULONG_PTR SIZE_T
Definition: typedefs.h:80
VOID NTAPI USBPORT_InsertBadRequest(IN PIO_CSQ Csq, IN PIRP Irp)
Definition: queue.c:143
KIRQL EndpointStateOldIrql
Definition: usbport.h:217
KSPIN_LOCK WorkerThreadEventSpinLock
Definition: usbport.h:357
VOID NTAPI USBPORT_DpcHandler(IN PDEVICE_OBJECT FdoDevice)
Definition: usbport.c:864
DEVICE_POWER_STATE DevicePowerState
Definition: usbport.h:287
LIST_ENTRY PipeLink
Definition: usbport.h:168
VOID NTAPI USBPORT_DumpingSetupPacket(IN PUSB_DEFAULT_PIPE_SETUP_PACKET SetupPacket)
Definition: debug.c:213
struct _USBPORT_DEVICE_HANDLE USBPORT_DEVICE_HANDLE
PUSB2_TT_ENDPOINT RebalanceEndpoint[USB2_FRAMES - 2]
Definition: usbport.h:570
VOID NTAPI USBPORT_IsrDpc(IN PRKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: usbport.c:1031
NTSTATUS NTAPI USBPORT_GetSymbolicName(IN PDEVICE_OBJECT RootHubPdo, IN PUNICODE_STRING DestinationString)
Definition: ioctl.c:62
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 LineNumber
Definition: acpixf.h:1216
KSPIN_LOCK TimerFlagsSpinLock
Definition: usbport.h:352
UNICODE_STRING SymbolicLinkName
Definition: usbport.h:285
ULONG NTAPI USBPORT_TestDebugBreak(IN PVOID MiniPortExtension)
Definition: debug.c:31
LIST_ENTRY RebalanceLink
Definition: usbport.h:240
Definition: usb.h:529
struct _USB2_TT USB2_TT
unsigned short USHORT
Definition: pedump.c:61
PIRP NTAPI USBPORT_PeekNextBadRequest(IN PIO_CSQ Csq, IN PIRP Irp, IN PVOID PeekContext)
Definition: queue.c:169
PDEVICE_OBJECT FdoDevice
Definition: usbport.h:420
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
USBPORT_PIPE_HANDLE PipeHandle[1]
Definition: usbport.h:183
LIST_ENTRY StateChangeLink
Definition: usbport.h:224
NTSTATUS NTAPI USBPORT_RootHubCreateDevice(IN PDEVICE_OBJECT FdoDevice, IN PDEVICE_OBJECT PdoDevice)
Definition: roothub.c:747
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1035
unsigned int * PULONG
Definition: retypes.h:1
static HANDLE PipeHandle
Definition: dhcpcsvc.c:22
union _USB2_TT_ENDPOINT_PARAMS USB2_TT_ENDPOINT_PARAMS
VOID NTAPI USBPORT_AddUSB1Fdo(IN PDEVICE_OBJECT FdoDevice)
Definition: usbport.c:66
PDEVICE_OBJECT NTAPI USBPORT_FindUSB2Controller(IN PDEVICE_OBJECT FdoDevice)
Definition: usbport.c:27
struct _USBPORT_ASYNC_CALLBACK_DATA USBPORT_ASYNC_CALLBACK_DATA
ULONG NTAPI USBPORT_InvalidateRootHub(PVOID MiniPortExtension)
Definition: roothub.c:917
VOID NTAPI USBPORT_NukeAllEndpoints(IN PDEVICE_OBJECT FdoDevice)
Definition: endpoint.c:300
PHYSICAL_ADDRESS LogicalAddress
Definition: usbport.h:149
USB_INTERFACE_DESCRIPTOR InterfaceDescriptor
Definition: usbport.h:412
NTSTATUS NTAPI USBPORT_ReopenPipe(IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint)
Definition: endpoint.c:1165
struct _TIMER_WORK_QUEUE_ITEM TIMER_WORK_QUEUE_ITEM
LIST_ENTRY EpStateChangeList
Definition: usbport.h:334
LIST_ENTRY SplitTransfersList
Definition: usbport.h:266
_In_opt_ PIRP _In_opt_ PVOID PeekContext
Definition: csq.h:159
struct _USB2_REBALANCE * PUSB2_REBALANCE
#define USB2_FRAMES
Definition: usbport.h:452
KSEMAPHORE DeviceSemaphore
Definition: usbport.h:362
KSPIN_LOCK IdleIoCsqSpinLock
Definition: usbport.h:372
KSPIN_LOCK EndpointListSpinLock
Definition: usbport.h:333
PUSBPORT_ISO_BLOCK IsoBlockPtr
Definition: usbport.h:269
IO_CSQ Csq
Definition: csqrtns.c:46
PIRP NTAPI USBPORT_RemoveActiveTransferIrp(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
Definition: queue.c:357
VOID NTAPI USBPORT_FlushPendingTransfers(IN PUSBPORT_ENDPOINT Endpoint)
Definition: queue.c:785
NTSTATUS NTAPI USBPORT_FdoPnP(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
Definition: pnp.c:1110
USHORT DeviceAddress
Definition: usbport.h:555
_In_ PUSB_DEVICE_HANDLE _In_ ULONG TtCount
Definition: hubbusif.h:239
PKINTERRUPT InterruptObject
Definition: usbport.h:323
struct _USBPORT_RHDEVICE_EXTENSION USBPORT_RHDEVICE_EXTENSION
BOOLEAN NTAPI USBPORT_ValidatePipeHandle(IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PUSBPORT_PIPE_HANDLE PipeHandle)
Definition: endpoint.c:469
#define OUT
Definition: typedefs.h:40
KSPIN_LOCK RootHubCallbackSpinLock
Definition: usbport.h:295
PIRP irp[0X200]
Definition: usbport.h:277
VOID NTAPI USBPORT_FlushAbortList(IN PUSBPORT_ENDPOINT Endpoint)
Definition: queue.c:605
PDEVICE_RELATIONS NTAPI USBPORT_FindCompanionControllers(IN PDEVICE_OBJECT USB2FdoDevice, IN BOOLEAN IsObRefer, IN BOOLEAN IsFDOsReturned)
Definition: usbport.c:136
unsigned int ULONG
Definition: retypes.h:1
ULONG FrameNumber
Definition: usbport.h:213
LIST_ENTRY TtList
Definition: usbport.h:201
USHORT Reserved2
Definition: usbport.h:522
KSPIN_LOCK PowerWakeSpinLock
Definition: usbport.h:385
PUSBPORT_RH_DESCRIPTORS RootHubDescriptors
Definition: usbport.h:423
KSPIN_LOCK TransferSpinLock
Definition: usbport.h:265
KSPIN_LOCK MapTransferSpinLock
Definition: usbport.h:341
VOID NTAPI USBPORT_RemoveBadRequest(IN PIO_CSQ Csq, IN PIRP Irp)
Definition: queue.c:160
_Outptr_ PUSB_DEVICE_HANDLE * NewDeviceHandle
Definition: hubbusif.h:40
USB_DEVICE_DESCRIPTOR DeviceDescriptor
Definition: usbport.h:196
VOID NTAPI USBPORT_FlushController(IN PDEVICE_OBJECT FdoDevice)
Definition: queue.c:1259
ULONG TimeCS[USB2_FRAMES][USB2_MICROFRAMES]
Definition: usbport.h:543
USB_ENDPOINT_DESCRIPTOR EndPointDescriptor
Definition: usbport.h:413
PUSBPORT_ENDPOINT Endpoint
Definition: usbport.h:167
VOID NTAPI USB2_InitTT(IN PUSB2_HC_EXTENSION HcExtension, IN PUSB2_TT Tt)
Definition: usb2.c:2160
USBD_STATUS USBDStatus
Definition: usbport.h:258
struct _USBPORT_RH_DESCRIPTORS USBPORT_RH_DESCRIPTORS
VOID NTAPI USBPORT_FlushClosedEndpointList(IN PDEVICE_OBJECT FdoDevice)
Definition: endpoint.c:1281
ULONG CompletedTransferLen
Definition: usbport.h:259
PUSB2_TT_EXTENSION TtExtension
Definition: usbport.h:200
PVOID MapRegisterBase
Definition: usbport.h:261
USBPORT_COMMON_DEVICE_EXTENSION CommonExtension
Definition: usbport.h:418
LIST_ENTRY TtLink
Definition: usbport.h:239
LIST_ENTRY CancelList
Definition: usbport.h:229
VOID NTAPI USBPORT_AddUSB2Fdo(IN PDEVICE_OBJECT FdoDevice)
Definition: usbport.c:82
KSPIN_LOCK EndpointSpinLock
Definition: usbport.h:215
VOID NTAPI USBPORT_CancelSplitTransfer(IN PUSBPORT_TRANSFER SplitTransfer)
Definition: trfsplit.c:314
struct _USB2_TT_EXTENSION USB2_TT_EXTENSION
KSPIN_LOCK USBPORT_SpinLock
Definition: usbport.c:22
struct _USBPORT_INTERFACE_HANDLE * PUSBPORT_INTERFACE_HANDLE
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
Definition: ndis.h:4751
BUS_INTERFACE_STANDARD BusInterface
Definition: usbport.h:312
VOID NTAPI USBPORT_RemoveIdleIrp(IN PIO_CSQ Csq, IN PIRP Irp)
Definition: queue.c:37
static PLARGE_INTEGER Time
Definition: time.c:105
LIST_ENTRY USBPORT_MiniPortDrivers
Definition: usbport.c:18
VOID NTAPI USBPORT_ClosePipe(IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_PIPE_HANDLE PipeHandle)
Definition: endpoint.c:590
NTSTATUS NTAPI USBPORT_FdoInternalDeviceControl(IN PDEVICE_OBJECT FdoDevice, IN PIRP Irp)
Definition: ioctl.c:454
VOID NTAPI USBPORT_FindUrbInIrpTable(IN PUSBPORT_IRP_TABLE IrpTable, IN PURB Urb, IN PIRP Irp)
Definition: queue.c:381
KSPIN_LOCK MiniportInterruptsSpinLock
Definition: usbport.h:327
NTSTATUS NTAPI USBPORT_GetUsbDescriptor(IN PUSBPORT_DEVICE_HANDLE DeviceHandle, IN PDEVICE_OBJECT FdoDevice, IN UCHAR Type, IN PUCHAR ConfigDesc, IN PULONG ConfigDescSize)
Definition: device.c:1425
PUSB2_TT_ENDPOINT IntEndpoint
Definition: usbport.h:529
VOID NTAPI USBPORT_RootHubEndpointWorker(PUSBPORT_ENDPOINT Endpoint)
VOID NTAPI USBPORT_CompletePdoWaitWake(IN PDEVICE_OBJECT FdoDevice)
Definition: power.c:15
NTSTATUS NTAPI USBPORT_PdoPower(IN PDEVICE_OBJECT PdoDevice, IN PIRP Irp)
Definition: power.c:322
VOID NTAPI USBPORT_StopWorkerThread(IN PDEVICE_OBJECT FdoDevice)
Definition: usbport.c:1455
_In_opt_ PVOID DeferredContext
Definition: ketypes.h:675
struct _USBPORT_INTERFACE_HANDLE USBPORT_INTERFACE_HANDLE