Author: mjansen
Date: Sat Jul 15 09:24:30 2017
New Revision: 75351
URL:
http://svn.reactos.org/svn/reactos?rev=75351&view=rev
Log:
[USBPORT] Fix incorrect transfer direction for URBs. Patch by Vadim Galyant. CORE-13546
Modified:
trunk/reactos/drivers/usb/usbport/urb.c
trunk/reactos/sdk/include/reactos/drivers/usbport/usbmport.h
Modified: trunk/reactos/drivers/usb/usbport/urb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbport/urb.c?…
==============================================================================
--- trunk/reactos/drivers/usb/usbport/urb.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbport/urb.c [iso-8859-1] Sat Jul 15 09:24:30 2017
@@ -385,13 +385,13 @@
if (Endpoint->EndpointProperties.TransferType != USBPORT_TRANSFER_TYPE_CONTROL)
{
- if (Endpoint->EndpointProperties.Direction)
+ if (Endpoint->EndpointProperties.Direction == USBPORT_TRANSFER_DIRECTION_OUT)
{
- Urb->UrbBulkOrInterruptTransfer.TransferFlags |=
USBD_TRANSFER_DIRECTION_IN;
+ Urb->UrbBulkOrInterruptTransfer.TransferFlags &=
~USBD_TRANSFER_DIRECTION_IN;
}
else
{
- Urb->UrbBulkOrInterruptTransfer.TransferFlags &=
~USBD_TRANSFER_DIRECTION_IN;
+ Urb->UrbBulkOrInterruptTransfer.TransferFlags |=
USBD_TRANSFER_DIRECTION_IN;
}
}
Modified: trunk/reactos/sdk/include/reactos/drivers/usbport/usbmport.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/driver…
==============================================================================
--- trunk/reactos/sdk/include/reactos/drivers/usbport/usbmport.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/reactos/drivers/usbport/usbmport.h [iso-8859-1] Sat Jul 15
09:24:30 2017
@@ -580,6 +580,7 @@
C_ASSERT(sizeof(USBPORT_MINIPORT_INTERFACE) == 336);
+#define USBPORT_TRANSFER_DIRECTION_OUT 1 // From host to device
typedef struct _USBPORT_ENDPOINT_PROPERTIES {
USHORT DeviceAddress;
USHORT EndpointAddress;