https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0558635f98c236568a7fe…
commit 0558635f98c236568a7fe36ca297b377962b5348
Author: Vadim Galyant <vgal(a)rambler.ru>
AuthorDate: Sat Dec 16 22:26:50 2017 +0900
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sun Jan 21 19:35:55 2018 +0100
[USBPORT] Add USB2_ChangePeriod().
---
drivers/usb/usbport/usb2.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/usb/usbport/usb2.c b/drivers/usb/usbport/usb2.c
index a9ba071b08..642271903a 100644
--- a/drivers/usb/usbport/usb2.c
+++ b/drivers/usb/usbport/usb2.c
@@ -1660,6 +1660,32 @@ USB2_AllocateTimeForEndpoint(IN PUSB2_TT_ENDPOINT TtEndpoint,
return Result;
}
+BOOLEAN
+NTAPI
+USB2_ChangePeriod(IN PUSB2_TT_ENDPOINT TtEndpoint,
+ IN PUSB2_REBALANCE Rebalance,
+ IN PULONG RebalanceListEntries)
+{
+ BOOLEAN Result;
+
+ DPRINT("USB2_ChangePeriod: RebalanceListEntries - %X\n",
+ *RebalanceListEntries);
+
+ USB2_DeallocateEndpointBudget(TtEndpoint,
+ Rebalance,
+ RebalanceListEntries,
+ USB2_FRAMES);
+
+ TtEndpoint->PreviosPeriod = TtEndpoint->Period;
+ TtEndpoint->Period = ENDPOINT_INTERRUPT_1ms;
+
+ Result = USB2_AllocateTimeForEndpoint(TtEndpoint,
+ Rebalance,
+ RebalanceListEntries);
+
+ return Result;
+}
+
BOOLEAN
NTAPI
USB2_PromotePeriods(IN PUSB2_TT_ENDPOINT TtEndpoint,