https://git.reactos.org/?p=reactos.git;a=commitdiff;h=41f4814c441bb6e6ccfbc…
commit 41f4814c441bb6e6ccfbc3e66546c23cb5517c93
Author:     Vadim Galyant <vgal(a)rambler.ru>
AuthorDate: Mon Nov 27 16:03:20 2017 +0900
Commit:     Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sun Jan 21 19:35:35 2018 +0100
    [USBPORT] Define constants for Transaction Translator.
---
 drivers/usb/usbport/usbport.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
diff --git a/drivers/usb/usbport/usbport.h b/drivers/usb/usbport/usbport.h
index 26e021cb14..0db831b0b9 100644
--- a/drivers/usb/usbport/usbport.h
+++ b/drivers/usb/usbport/usbport.h
@@ -430,6 +430,30 @@ typedef struct _TIMER_WORK_QUEUE_ITEM {
   ULONG Context;
 } TIMER_WORK_QUEUE_ITEM, *PTIMER_WORK_QUEUE_ITEM;
+/* Transaction Translator */
+/* See Chapter 5 - USB Data Flow Model and Chapter 11 - Hub Specification */
+
+#define USB2_FRAMES           32
+#define USB2_MICROFRAMES      8
+#define USB2_MAX_MICROFRAMES  (USB2_FRAMES * USB2_MICROFRAMES)
+
+#define USB2_MAX_MICROFRAME_ALLOCATION         7000 // bytes
+#define USB2_CONTROLLER_DELAY                  100
+#define USB2_FS_MAX_PERIODIC_ALLOCATION        1157 // ((12000 / 8 bits) * 0.9) / (7/6) -
90% max, and bits stuffing
+#define USB2_FS_SOF_TIME                       6
+#define USB2_HUB_DELAY                         30
+#define USB2_MAX_FS_LS_TRANSACTIONS_IN_UFRAME  16
+#define USB2_FS_RAW_BYTES_IN_MICROFRAME        188  // (12000 / 8 bits /
USB2_MICROFRAMES) = 187,5. But we use "best case budget"
+
+/* Overheads */
+#define USB2_LS_INTERRUPT_OVERHEAD             117 // FS-bytes
+#define USB2_FS_INTERRUPT_OVERHEAD             13
+#define USB2_HS_INTERRUPT_OUT_OVERHEAD         45
+#define USB2_HS_INTERRUPT_IN_OVERHEAD          25
+#define USB2_FS_ISOCHRONOUS_OVERHEAD           9
+#define USB2_HS_ISOCHRONOUS_OUT_OVERHEAD       38
+#define USB2_HS_ISOCHRONOUS_IN_OVERHEAD        18
+
 /* usbport.c */
 NTSTATUS
 NTAPI