https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0f2f4c6ca227ff4d1d080f84c9084cd75d222450
commit 0f2f4c6ca227ff4d1d080f84c9084cd75d222450 Author: Vadim Galyant <v...@rambler.ru> AuthorDate: Mon Nov 27 17:47:25 2017 +0900 Commit: Amine Khaldi <amine.kha...@reactos.org> CommitDate: Sun Jan 21 19:35:37 2018 +0100 [USBPORT] Add USB2_InitController(). --- drivers/usb/usbport/usb2.c | 24 ++++++++++++++++++++++++ drivers/usb/usbport/usbport.h | 5 +++++ 2 files changed, 29 insertions(+) diff --git a/drivers/usb/usbport/usb2.c b/drivers/usb/usbport/usb2.c index 920d01a219..c274e6959b 100644 --- a/drivers/usb/usbport/usb2.c +++ b/drivers/usb/usbport/usb2.c @@ -26,3 +26,27 @@ USBPORT_FreeBandwidthUSB2(IN PDEVICE_OBJECT FdoDevice, { DPRINT1("USBPORT_FreeBandwidthUSB2: UNIMPLEMENTED. FIXME. \n"); } + +VOID +NTAPI +USB2_InitController(IN PUSB2_HC_EXTENSION HcExtension) +{ + ULONG ix; + ULONG jx; + + DPRINT("USB2_InitController: HcExtension - %p\n", HcExtension); + + HcExtension->MaxHsBusAllocation = USB2_MAX_MICROFRAME_ALLOCATION; + + for (ix = 0; ix < USB2_FRAMES; ix++) + { + for (jx = 0; jx < USB2_MICROFRAMES; jx++) + { + HcExtension->TimeUsed[ix][jx] = 0; + } + } + + HcExtension->HcDelayTime = USB2_CONTROLLER_DELAY; + + USB2_InitTT(HcExtension, &HcExtension->HcTt); +} diff --git a/drivers/usb/usbport/usbport.h b/drivers/usb/usbport/usbport.h index 5145c26e92..93c71a9516 100644 --- a/drivers/usb/usbport/usbport.h +++ b/drivers/usb/usbport/usbport.h @@ -1294,4 +1294,9 @@ USBPORT_FreeBandwidthUSB2( IN PDEVICE_OBJECT FdoDevice, IN PUSBPORT_ENDPOINT Endpoint); +VOID +NTAPI +USB2_InitController( + IN PUSB2_HC_EXTENSION HcExtension); + #endif /* USBPORT_H__ */