mirror of
https://github.com/reactos/reactos.git
synced 2024-11-04 13:52:30 +00:00
[USBPORT] Check Period instead Factor.
This commit is contained in:
parent
954cc021da
commit
ab88f25048
2 changed files with 6 additions and 5 deletions
|
@ -96,9 +96,10 @@ USBPORT_AllocateBandwidth(IN PDEVICE_OBJECT FdoDevice,
|
|||
|
||||
TotalBusBandwidth = FdoExtension->TotalBusBandwidth;
|
||||
EndpointBandwidth = EndpointProperties->UsbBandwidth;
|
||||
|
||||
Period = EndpointProperties->Period;
|
||||
ASSERT(Period != 0);
|
||||
Factor = USB2_FRAMES / Period;
|
||||
ASSERT(Factor);
|
||||
|
||||
for (Offset = 0; Offset < Period; Offset++)
|
||||
{
|
||||
|
@ -197,9 +198,9 @@ USBPORT_FreeBandwidth(IN PDEVICE_OBJECT FdoDevice,
|
|||
|
||||
Offset = Endpoint->EndpointProperties.ScheduleOffset;
|
||||
EndpointBandwidth = Endpoint->EndpointProperties.UsbBandwidth;
|
||||
Period = Endpoint->EndpointProperties.Period;
|
||||
|
||||
ASSERT(USB2_FRAMES / Period);
|
||||
Period = Endpoint->EndpointProperties.Period;
|
||||
ASSERT(Period != 0);
|
||||
|
||||
for (Factor = USB2_FRAMES / Period; Factor; Factor--)
|
||||
{
|
||||
|
|
|
@ -2107,6 +2107,8 @@ USBPORT_FreeBandwidthUSB2(IN PDEVICE_OBJECT FdoDevice,
|
|||
FdoExtension = FdoDevice->DeviceExtension;
|
||||
|
||||
Period = Endpoint->EndpointProperties.Period;
|
||||
ASSERT(Period != 0);
|
||||
|
||||
ScheduleOffset = Endpoint->EndpointProperties.ScheduleOffset;
|
||||
EndpointBandwidth = Endpoint->EndpointProperties.UsbBandwidth;
|
||||
|
||||
|
@ -2134,8 +2136,6 @@ USBPORT_FreeBandwidthUSB2(IN PDEVICE_OBJECT FdoDevice,
|
|||
RtlZeroMemory(Rebalance, sizeof(USB2_REBALANCE));
|
||||
|
||||
Factor = USB2_FRAMES / Period;
|
||||
ASSERT(Factor);
|
||||
|
||||
n = ScheduleOffset * Factor;
|
||||
|
||||
TtExtension = Endpoint->TtExtension;
|
||||
|
|
Loading…
Reference in a new issue