Author: janderwald
Date: Fri Feb 24 17:58:55 2012
New Revision: 55843
URL:
http://svn.reactos.org/svn/reactos?rev=55843&view=rev
Log:
[USBUHCI]
- Invert data toggle
Modified:
trunk/reactos/drivers/usb/usbuhci/usb_request.cpp
Modified: trunk/reactos/drivers/usb/usbuhci/usb_request.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbuhci/usb_re…
==============================================================================
--- trunk/reactos/drivers/usb/usbuhci/usb_request.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbuhci/usb_request.cpp [iso-8859-1] Fri Feb 24 17:58:55
2012
@@ -1247,6 +1247,7 @@
{
PUHCI_TRANSFER_DESCRIPTOR Descriptor, NextDescriptor;
ULONG ErrorCount;
+ UCHAR DataToggle = 0;
//
// grab first transfer descriptor
@@ -1254,6 +1255,9 @@
Descriptor = (PUHCI_TRANSFER_DESCRIPTOR)OutDescriptor->NextElementDescriptor;
while(Descriptor)
{
+ // get data toggle
+ DataToggle = (Descriptor->Token >> TD_TOKEN_DATA_TOGGLE_SHIFT) &
0x01;
+
if (Descriptor->Status & TD_ERROR_MASK)
{
//
@@ -1344,6 +1348,12 @@
//
m_DmaManager->Release(OutDescriptor, sizeof(UHCI_QUEUE_HEAD));
+ // is there an endpoint descriptor
+ if (m_EndpointDescriptor)
+ {
+ // invert last data toggle
+ m_EndpointDescriptor->DataToggle = (DataToggle == 0);
+ }
}
VOID