ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2018
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
25 participants
436 discussions
Start a n
N
ew thread
09/77: [USBPORT] Add USB2_InitTtEndpoint().
by Vadim Galyant
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=da1e283837ada49a0d214…
commit da1e283837ada49a0d214f8cb1ba5e84782d40d8 Author: Vadim Galyant <vgal(a)rambler.ru> AuthorDate: Mon Nov 27 18:19:05 2017 +0900 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Jan 21 19:35:37 2018 +0100 [USBPORT] Add USB2_InitTtEndpoint(). --- drivers/usb/usbport/usb2.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/usb/usbport/usb2.c b/drivers/usb/usbport/usb2.c index 6d71769376..1c4cd042de 100644 --- a/drivers/usb/usbport/usb2.c +++ b/drivers/usb/usbport/usb2.c @@ -10,6 +10,27 @@ //#define NDEBUG #include <debug.h> +VOID +NTAPI +USB2_InitTtEndpoint(IN PUSB2_TT_ENDPOINT TtEndpoint, + IN UCHAR TransferType, + IN UCHAR Direction, + IN UCHAR DeviceSpeed, + IN USHORT Period, + IN USHORT MaxPacketSize, + IN PUSB2_TT Tt) +{ + RtlZeroMemory(TtEndpoint, sizeof(USB2_TT_ENDPOINT)); + + TtEndpoint->TtEndpointParams.TransferType = TransferType; + TtEndpoint->TtEndpointParams.Direction = Direction; + TtEndpoint->TtEndpointParams.DeviceSpeed = DeviceSpeed; + + TtEndpoint->Period = Period; + TtEndpoint->MaxPacketSize = MaxPacketSize; + TtEndpoint->Tt = Tt; +} + BOOLEAN NTAPI USBPORT_AllocateBandwidthUSB2(IN PDEVICE_OBJECT FdoDevice,
6 years, 9 months
1
0
0
0
08/77: [USBPORT] Add USB2_InitTT().
by Vadim Galyant
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9cdc1d64b3e2f9f26baeb…
commit 9cdc1d64b3e2f9f26baeb7632de2e4b07696bb62 Author: Vadim Galyant <vgal(a)rambler.ru> AuthorDate: Mon Nov 27 17:50:47 2017 +0900 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Jan 21 19:35:37 2018 +0100 [USBPORT] Add USB2_InitTT(). --- drivers/usb/usbport/usb2.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/drivers/usb/usbport/usb2.c b/drivers/usb/usbport/usb2.c index c274e6959b..6d71769376 100644 --- a/drivers/usb/usbport/usb2.c +++ b/drivers/usb/usbport/usb2.c @@ -27,6 +27,63 @@ USBPORT_FreeBandwidthUSB2(IN PDEVICE_OBJECT FdoDevice, DPRINT1("USBPORT_FreeBandwidthUSB2: UNIMPLEMENTED. FIXME. \n"); } +VOID +NTAPI +USB2_InitTT(IN PUSB2_HC_EXTENSION HcExtension, + IN PUSB2_TT Tt) +{ + ULONG ix; + ULONG jx; + + DPRINT("USB2_InitTT: HcExtension - %p, Tt - %p\n", HcExtension, Tt); + + Tt->HcExtension = HcExtension; + Tt->DelayTime = 1; + Tt->MaxTime = USB2_FS_MAX_PERIODIC_ALLOCATION; + + for (ix = 0; ix < USB2_FRAMES; ix++) + { + Tt->FrameBudget[ix].TimeUsed = USB2_MAX_MICROFRAMES; + Tt->FrameBudget[ix].AltEndpoint = NULL; + + for (jx = 0; jx < USB2_MICROFRAMES; jx++) + { + Tt->TimeCS[ix][jx] = 0; + Tt->NumStartSplits[ix][jx] = 0; + } + + Tt->FrameBudget[ix].IsoEndpoint = &Tt->IsoEndpoint[ix]; + + USB2_InitTtEndpoint(&Tt->IsoEndpoint[ix], + USBPORT_TRANSFER_TYPE_ISOCHRONOUS, + USBPORT_TRANSFER_DIRECTION_OUT, + UsbFullSpeed, + USB2_FRAMES, + 0, + Tt); + + Tt->IsoEndpoint[ix].ActualPeriod = USB2_FRAMES; + Tt->IsoEndpoint[ix].CalcBusTime = USB2_FS_SOF_TIME + USB2_HUB_DELAY; + Tt->IsoEndpoint[ix].StartFrame = ix; + Tt->IsoEndpoint[ix].StartMicroframe = 0xFF; + + Tt->FrameBudget[ix].IntEndpoint = &Tt->IntEndpoint[ix]; + + USB2_InitTtEndpoint(&Tt->IntEndpoint[ix], + USBPORT_TRANSFER_TYPE_INTERRUPT, + USBPORT_TRANSFER_DIRECTION_OUT, + UsbFullSpeed, + USB2_FRAMES, + 0, + Tt); + + Tt->IntEndpoint[ix].ActualPeriod = USB2_FRAMES; + Tt->IntEndpoint[ix].CalcBusTime = USB2_FS_SOF_TIME + USB2_HUB_DELAY; + Tt->IntEndpoint[ix].StartFrame = ix; + Tt->IntEndpoint[ix].StartMicroframe = 0xFF; + } +} + VOID NTAPI USB2_InitController(IN PUSB2_HC_EXTENSION HcExtension)
6 years, 9 months
1
0
0
0
07/77: [USBPORT] Add USB2_InitController().
by Vadim Galyant
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0f2f4c6ca227ff4d1d080…
commit 0f2f4c6ca227ff4d1d080f84c9084cd75d222450 Author: Vadim Galyant <vgal(a)rambler.ru> AuthorDate: Mon Nov 27 17:47:25 2017 +0900 Commit: Amine Khaldi <amine.khaldi(a)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__ */
6 years, 9 months
1
0
0
0
06/77: [USBPORT] Add initial support for transaction translators in USBPORT_AddDevice().
by Vadim Galyant
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=faa792987b0cfab494154…
commit faa792987b0cfab49415498bcc066d3931266c91 Author: Vadim Galyant <vgal(a)rambler.ru> AuthorDate: Mon Nov 27 17:41:08 2017 +0900 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Jan 21 19:35:36 2018 +0100 [USBPORT] Add initial support for transaction translators in USBPORT_AddDevice(). --- drivers/usb/usbport/usbport.c | 19 ++++++++++++++++++- drivers/usb/usbport/usbport.h | 7 ++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/drivers/usb/usbport/usbport.c b/drivers/usb/usbport/usbport.c index 09286465bb..1dbe779daa 100644 --- a/drivers/usb/usbport/usbport.c +++ b/drivers/usb/usbport/usbport.c @@ -1845,7 +1845,8 @@ USBPORT_AddDevice(IN PDRIVER_OBJECT DriverObject, RtlInitUnicodeString(&DeviceName, CharDeviceName); Length = sizeof(USBPORT_DEVICE_EXTENSION) + - MiniPortInterface->Packet.MiniPortExtensionSize; + MiniPortInterface->Packet.MiniPortExtensionSize + + sizeof(USB2_HC_EXTENSION); /* Create device */ Status = IoCreateDevice(DriverObject, @@ -1903,6 +1904,22 @@ USBPORT_AddDevice(IN PDRIVER_OBJECT DriverObject, FdoExtension->MiniPortExt = (PVOID)((ULONG_PTR)FdoExtension + sizeof(USBPORT_DEVICE_EXTENSION)); + if (MiniPortInterface->Packet.MiniPortFlags & USB_MINIPORT_FLAGS_USB2) + { + FdoExtension->Usb2Extension = + (PUSB2_HC_EXTENSION)FdoExtension->MiniPortExt + + MiniPortInterface->Packet.MiniPortExtensionSize; + + DPRINT("USBPORT_AddDevice: Usb2Extension - %p\n", + FdoExtension->Usb2Extension); + + USB2_InitController(FdoExtension->Usb2Extension); + } + else + { + FdoExtension->Usb2Extension = NULL; + } + FdoExtension->MiniPortInterface = MiniPortInterface; FdoExtension->FdoNameNumber = DeviceNumber; diff --git a/drivers/usb/usbport/usbport.h b/drivers/usb/usbport/usbport.h index b838baff0d..5145c26e92 100644 --- a/drivers/usb/usbport/usbport.h +++ b/drivers/usb/usbport/usbport.h @@ -153,6 +153,9 @@ typedef struct _USBPORT_COMMON_BUFFER_HEADER { typedef struct _USBPORT_ENDPOINT *PUSBPORT_ENDPOINT; +typedef struct _USB2_HC_EXTENSION *PUSB2_HC_EXTENSION; +typedef struct _USB2_TT *PUSB2_TT; + typedef struct _USBPORT_PIPE_HANDLE { ULONG Flags; ULONG PipeFlags; @@ -374,10 +377,12 @@ typedef struct _USBPORT_DEVICE_EXTENSION { KSPIN_LOCK SetPowerD0SpinLock; KDPC WorkerRequestDpc; KDPC HcWakeDpc; + /* Usb 2.0 HC Extension */ + PUSB2_HC_EXTENSION Usb2Extension; /* Miniport extension should be aligned on 0x100 */ #if !defined(_M_X64) - ULONG Padded[34]; + ULONG Padded[33]; #else ULONG Padded[0]; #endif
6 years, 9 months
1
0
0
0
05/77: [USBPORT] Use constants in USBPORT_OpenPipe().
by Vadim Galyant
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0b78ad8eb27dc9259f757…
commit 0b78ad8eb27dc9259f757277a9398a113ff603d6 Author: Vadim Galyant <vgal(a)rambler.ru> AuthorDate: Mon Nov 27 16:56:19 2017 +0900 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Jan 21 19:35:36 2018 +0100 [USBPORT] Use constants in USBPORT_OpenPipe(). --- drivers/usb/usbport/endpoint.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/usb/usbport/endpoint.c b/drivers/usb/usbport/endpoint.c index d2005a87d2..be2c7eab6d 100644 --- a/drivers/usb/usbport/endpoint.c +++ b/drivers/usb/usbport/endpoint.c @@ -642,13 +642,13 @@ USBPORT_OpenPipe(IN PDEVICE_OBJECT FdoDevice, if (Packet->MiniPortFlags & USB_MINIPORT_FLAGS_USB2) { - DPRINT1("USBPORT_OpenPipe: FIXME USB2 EndpointSize\n"); + EndpointSize += sizeof(USB2_TT_ENDPOINT); } if (PipeHandle->EndpointDescriptor.wMaxPacketSize == 0) { USBPORT_AddPipeHandle(DeviceHandle, PipeHandle); - + PipeHandle->Flags = (PipeHandle->Flags & ~PIPE_HANDLE_FLAG_CLOSED) | PIPE_HANDLE_FLAG_NULL_PACKET_SIZE; @@ -739,14 +739,14 @@ USBPORT_OpenPipe(IN PDEVICE_OBJECT FdoDevice, Interval = EndpointDescriptor->bInterval; } - EndpointProperties->Period = 32; + EndpointProperties->Period = ENDPOINT_INTERRUPT_32ms; - if (Interval && (Interval < 32)) + if (Interval && (Interval < USB2_FRAMES)) { if ((EndpointProperties->DeviceSpeed != UsbLowSpeed) || - (Interval >= 8)) + (Interval >= ENDPOINT_INTERRUPT_8ms)) { - if (!(Interval & 0x20)) + if (!(Interval & ENDPOINT_INTERRUPT_32ms)) { Period = EndpointProperties->Period; @@ -761,7 +761,7 @@ USBPORT_OpenPipe(IN PDEVICE_OBJECT FdoDevice, } else { - EndpointProperties->Period = 8; + EndpointProperties->Period = ENDPOINT_INTERRUPT_8ms; } } } @@ -770,15 +770,20 @@ USBPORT_OpenPipe(IN PDEVICE_OBJECT FdoDevice, { if (EndpointProperties->DeviceSpeed == UsbHighSpeed) { - EndpointProperties->Period = + EndpointProperties->Period = USBPORT_NormalizeHsInterval(EndpointDescriptor->bInterval); } else { - EndpointProperties->Period = 1; + EndpointProperties->Period = ENDPOINT_INTERRUPT_1ms; } } + if ((DeviceHandle->Flags & DEVICE_HANDLE_FLAG_ROOTHUB) != 0) + { + Endpoint->Flags |= ENDPOINT_FLAG_ROOTHUB_EP0; + } + if (Packet->MiniPortFlags & USB_MINIPORT_FLAGS_USB2) { IsAllocatedBandwidth = USBPORT_AllocateBandwidthUSB2(FdoDevice, Endpoint);
6 years, 9 months
1
0
0
0
04/77: [USBPORT] Define structures for Transaction Translator.
by Vadim Galyant
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d2b088e9d6df771bedc7f…
commit d2b088e9d6df771bedc7fc4ca68b713f8f233bd5 Author: Vadim Galyant <vgal(a)rambler.ru> AuthorDate: Mon Nov 27 16:54:18 2017 +0900 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Jan 21 19:35:36 2018 +0100 [USBPORT] Define structures for Transaction Translator. --- drivers/usb/usbport/usbport.h | 81 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/drivers/usb/usbport/usbport.h b/drivers/usb/usbport/usbport.h index 0db831b0b9..b838baff0d 100644 --- a/drivers/usb/usbport/usbport.h +++ b/drivers/usb/usbport/usbport.h @@ -454,6 +454,87 @@ typedef struct _TIMER_WORK_QUEUE_ITEM { #define USB2_HS_ISOCHRONOUS_OUT_OVERHEAD 38 #define USB2_HS_ISOCHRONOUS_IN_OVERHEAD 18 +typedef union _USB2_TT_ENDPOINT_PARAMS { + struct { + ULONG TransferType : 4; + ULONG Direction : 1; + USB_DEVICE_SPEED DeviceSpeed : 2; + ULONG EndpointMoved : 1; + ULONG Reserved : 24; + }; + ULONG AsULONG; +} USB2_TT_ENDPOINT_PARAMS; + +C_ASSERT(sizeof(USB2_TT_ENDPOINT_PARAMS) == sizeof(ULONG)); + +typedef union _USB2_TT_ENDPOINT_NUMS { + struct { + ULONG NumStarts : 4; + ULONG NumCompletes : 4; + ULONG Reserved : 24; + }; + ULONG AsULONG; +} USB2_TT_ENDPOINT_NUMS; + +C_ASSERT(sizeof(USB2_TT_ENDPOINT_NUMS) == sizeof(ULONG)); + +typedef struct _USB2_TT_ENDPOINT { + PUSB2_TT Tt; + PUSBPORT_ENDPOINT Endpoint; + struct _USB2_TT_ENDPOINT * NextTtEndpoint; + USB2_TT_ENDPOINT_PARAMS TtEndpointParams; + USB2_TT_ENDPOINT_NUMS Nums; + USHORT MaxPacketSize; + USHORT PreviosPeriod; + USHORT Period; + USHORT ActualPeriod; + USHORT CalcBusTime; + USHORT StartTime; + USHORT Reserved2; + UCHAR StartFrame; + UCHAR StartMicroframe; +} USB2_TT_ENDPOINT, *PUSB2_TT_ENDPOINT; + +typedef struct _USB2_FRAME_BUDGET { + PUSB2_TT_ENDPOINT IsoEndpoint; + PUSB2_TT_ENDPOINT IntEndpoint; + PUSB2_TT_ENDPOINT AltEndpoint; + USHORT TimeUsed; + USHORT Reserved2; +} USB2_FRAME_BUDGET, *PUSB2_FRAME_BUDGET; + +typedef struct _USB2_TT { + PUSB2_HC_EXTENSION HcExtension; + ULONG DelayTime; + ULONG MaxTime; + USB2_TT_ENDPOINT IntEndpoint[USB2_FRAMES]; + USB2_TT_ENDPOINT IsoEndpoint[USB2_FRAMES]; + USB2_FRAME_BUDGET FrameBudget[USB2_FRAMES]; + ULONG NumStartSplits[USB2_FRAMES][USB2_MICROFRAMES]; + ULONG TimeCS[USB2_FRAMES][USB2_MICROFRAMES]; +} USB2_TT, *PUSB2_TT; + +typedef struct _USB2_TT_EXTENSION { + PDEVICE_OBJECT RootHubPdo; + ULONG Flags; + ULONG BusBandwidth; + ULONG Bandwidth[USB2_FRAMES]; + ULONG MaxBandwidth; + ULONG MinBandwidth; + USHORT DeviceAddress; + USHORT TtNumber; + LIST_ENTRY TtList; + LIST_ENTRY Link; + USB2_TT Tt; +} USB2_TT_EXTENSION, *PUSB2_TT_EXTENSION; + +typedef struct _USB2_HC_EXTENSION { + ULONG MaxHsBusAllocation; + ULONG HcDelayTime; + ULONG TimeUsed[USB2_FRAMES][USB2_MICROFRAMES]; + USB2_TT HcTt; +} USB2_HC_EXTENSION, *PUSB2_HC_EXTENSION; + /* usbport.c */ NTSTATUS NTAPI
6 years, 9 months
1
0
0
0
03/77: [USBPORT] Use constants in USBPORT_CalculateUsbBandwidth().
by Vadim Galyant
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a3dd5620d3758a45e3afd…
commit a3dd5620d3758a45e3afd29c9b4a45a9633330d6 Author: Vadim Galyant <vgal(a)rambler.ru> AuthorDate: Mon Nov 27 16:27:49 2017 +0900 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Jan 21 19:35:35 2018 +0100 [USBPORT] Use constants in USBPORT_CalculateUsbBandwidth(). --- drivers/usb/usbport/endpoint.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/usbport/endpoint.c b/drivers/usb/usbport/endpoint.c index 7cf250e76c..d2005a87d2 100644 --- a/drivers/usb/usbport/endpoint.c +++ b/drivers/usb/usbport/endpoint.c @@ -20,7 +20,7 @@ USBPORT_CalculateUsbBandwidth(IN PDEVICE_OBJECT FdoDevice, { PUSBPORT_ENDPOINT_PROPERTIES EndpointProperties; ULONG Bandwidth; - ULONG Additional; + ULONG Overhead; DPRINT("USBPORT_CalculateUsbBandwidth ... \n"); @@ -29,25 +29,25 @@ USBPORT_CalculateUsbBandwidth(IN PDEVICE_OBJECT FdoDevice, switch (EndpointProperties->TransferType) { case USBPORT_TRANSFER_TYPE_ISOCHRONOUS: - Additional = 9; + Overhead = USB2_FS_ISOCHRONOUS_OVERHEAD; break; case USBPORT_TRANSFER_TYPE_INTERRUPT: - Additional = 13; + Overhead = USB2_FS_INTERRUPT_OVERHEAD; break; default: //USBPORT_TRANSFER_TYPE_CONTROL or USBPORT_TRANSFER_TYPE_BULK - Additional = 0; + Overhead = 0; break; } - if (Additional == 0) + if (Overhead == 0) { Bandwidth = 0; } else { - Bandwidth = (EndpointProperties->TotalMaxPacketSize + Additional) * 8 * 7 / 6; + Bandwidth = (EndpointProperties->TotalMaxPacketSize + Overhead) * 8 * 7 / 6; } if (EndpointProperties->DeviceSpeed == UsbLowSpeed)
6 years, 9 months
1
0
0
0
02/77: [USBPORT] Define constants for Transaction Translator.
by Vadim Galyant
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
6 years, 9 months
1
0
0
0
01/77: [PSDK] Add USB hub class-specific request type codes.
by Vadim Galyant
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d4ff198c7c620e39f12b6…
commit d4ff198c7c620e39f12b60c04005a48cfe4bad42 Author: Vadim Galyant <vgal(a)rambler.ru> AuthorDate: Mon Nov 27 15:41:44 2017 +0900 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Jan 21 19:35:34 2018 +0100 [PSDK] Add USB hub class-specific request type codes. --- sdk/include/psdk/usb200.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sdk/include/psdk/usb200.h b/sdk/include/psdk/usb200.h index 8babb868e2..c2afc73b81 100644 --- a/sdk/include/psdk/usb200.h +++ b/sdk/include/psdk/usb200.h @@ -279,6 +279,14 @@ C_ASSERT(sizeof(USB_HUB_STATUS_AND_CHANGE) == sizeof(ULONG)); #define USB_20_HUB_DESCRIPTOR_TYPE 0x29 #define USB_30_HUB_DESCRIPTOR_TYPE 0x2A +#define USB_REQUEST_CLEAR_TT_BUFFER 0x08 +#define USB_REQUEST_RESET_TT 0x09 +#define USB_REQUEST_GET_TT_STATE 0x0A +#define USB_REQUEST_STOP_TT 0x0B + +#define USB_REQUEST_SET_HUB_DEPTH 0x0C +#define USB_REQUEST_GET_PORT_ERR_COUNT 0x0D + #define USB_DEVICE_CLASS_RESERVED 0x00 #define USB_DEVICE_CLASS_AUDIO 0x01 #define USB_DEVICE_CLASS_COMMUNICATIONS 0x02
6 years, 9 months
1
0
0
0
01/01: [USBHUB_NEW] Fix USBH_CheckDeviceIDUnique return value.
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=851a554b5922af7ac1a21…
commit 851a554b5922af7ac1a21b12fd788ebb051641b8 Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Tue Mar 27 08:59:36 2018 +0200 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Tue Mar 27 08:59:54 2018 +0200 [USBHUB_NEW] Fix USBH_CheckDeviceIDUnique return value. --- drivers/usb/usbhub_new/usbhub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/usbhub_new/usbhub.c b/drivers/usb/usbhub_new/usbhub.c index 354e286505..aa3029edbe 100644 --- a/drivers/usb/usbhub_new/usbhub.c +++ b/drivers/usb/usbhub_new/usbhub.c @@ -4123,14 +4123,14 @@ USBH_CheckDeviceIDUnique(IN PUSBHUB_FDO_EXTENSION HubExtension, if (NumberBytes == SN_DescriptorLength) { - break; + return FALSE; } } } } } - return FALSE; + return TRUE; } BOOLEAN
6 years, 9 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
44
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Results per page:
10
25
50
100
200