mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 17:05:45 +00:00
[USBPORT] Use constants in USBPORT_OpenPipe().
This commit is contained in:
parent
d2b088e9d6
commit
0b78ad8eb2
1 changed files with 14 additions and 9 deletions
|
@ -642,7 +642,7 @@ 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)
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -775,10 +775,15 @@ USBPORT_OpenPipe(IN PDEVICE_OBJECT FdoDevice,
|
|||
}
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue