mirror of
https://github.com/reactos/reactos.git
synced 2024-10-07 18:04:41 +00:00
[USBEHCI]
- Fix a few bulk transfer bugs - Enable interrupt completion on last interrupt - Increment transferred offset - Mass storage device now gets further (passing SRB_FUNCTION_CLAIM_DEVICE) svn path=/branches/usb-bringup-trunk/; revision=55491
This commit is contained in:
parent
d1da088aa8
commit
0913187636
|
@ -594,6 +594,7 @@ CUSBRequest::InternalGetTransferType()
|
||||||
// initialized with setup packet, must be a control transfer
|
// initialized with setup packet, must be a control transfer
|
||||||
//
|
//
|
||||||
TransferType = USB_ENDPOINT_TYPE_CONTROL;
|
TransferType = USB_ENDPOINT_TYPE_CONTROL;
|
||||||
|
ASSERT(m_EndpointDescriptor == FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1048,7 +1049,7 @@ CUSBRequest::BuildBulkTransferQueueHead(
|
||||||
PQUEUE_HEAD QueueHead;
|
PQUEUE_HEAD QueueHead;
|
||||||
PVOID Base;
|
PVOID Base;
|
||||||
ULONG ChainDescriptorLength;
|
ULONG ChainDescriptorLength;
|
||||||
PQUEUE_TRANSFER_DESCRIPTOR FirstDescriptor;
|
PQUEUE_TRANSFER_DESCRIPTOR FirstDescriptor, LastDescriptor;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Allocate the queue head
|
// Allocate the queue head
|
||||||
|
@ -1096,7 +1097,7 @@ CUSBRequest::BuildBulkTransferQueueHead(
|
||||||
InternalGetPidDirection(),
|
InternalGetPidDirection(),
|
||||||
m_EndpointDescriptor->DataToggle,
|
m_EndpointDescriptor->DataToggle,
|
||||||
&FirstDescriptor,
|
&FirstDescriptor,
|
||||||
NULL,
|
&LastDescriptor,
|
||||||
&m_EndpointDescriptor->DataToggle,
|
&m_EndpointDescriptor->DataToggle,
|
||||||
&ChainDescriptorLength);
|
&ChainDescriptorLength);
|
||||||
|
|
||||||
|
@ -1104,6 +1105,13 @@ CUSBRequest::BuildBulkTransferQueueHead(
|
||||||
// FIXME: handle errors
|
// FIXME: handle errors
|
||||||
//
|
//
|
||||||
ASSERT(ChainDescriptorLength == m_TransferBufferLength);
|
ASSERT(ChainDescriptorLength == m_TransferBufferLength);
|
||||||
|
|
||||||
|
//
|
||||||
|
// move to next offset
|
||||||
|
//
|
||||||
|
m_TransferBufferLengthCompleted += ChainDescriptorLength;
|
||||||
|
|
||||||
|
|
||||||
ASSERT(Status == STATUS_SUCCESS);
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1114,11 +1122,28 @@ CUSBRequest::BuildBulkTransferQueueHead(
|
||||||
QueueHead->EndPointCharacteristics.MaximumPacketLength = m_EndpointDescriptor->EndPointDescriptor.wMaxPacketSize;
|
QueueHead->EndPointCharacteristics.MaximumPacketLength = m_EndpointDescriptor->EndPointDescriptor.wMaxPacketSize;
|
||||||
QueueHead->NextPointer = FirstDescriptor->PhysicalAddr;
|
QueueHead->NextPointer = FirstDescriptor->PhysicalAddr;
|
||||||
|
|
||||||
|
|
||||||
|
ASSERT(QueueHead->EndPointCharacteristics.DeviceAddress);
|
||||||
|
ASSERT(QueueHead->EndPointCharacteristics.EndPointNumber);
|
||||||
|
ASSERT(QueueHead->EndPointCharacteristics.MaximumPacketLength);
|
||||||
|
ASSERT(QueueHead->NextPointer);
|
||||||
|
|
||||||
|
//
|
||||||
|
// interrupt on last descriptor
|
||||||
|
//
|
||||||
|
LastDescriptor->Token.Bits.InterruptOnComplete = TRUE;
|
||||||
|
|
||||||
//
|
//
|
||||||
// store result
|
// store result
|
||||||
//
|
//
|
||||||
*OutHead = QueueHead;
|
*OutHead = QueueHead;
|
||||||
|
|
||||||
|
//
|
||||||
|
// dump status
|
||||||
|
//
|
||||||
|
//DPRINT1("bEndpoint %x\n", m_EndpointDescriptor->EndPointDescriptor.bEndpointAddress);
|
||||||
|
//DumpQueueHead(QueueHead);
|
||||||
|
|
||||||
//
|
//
|
||||||
// done
|
// done
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue