Author: janderwald
Date: Wed Feb 22 18:57:49 2012
New Revision: 55811
URL:
http://svn.reactos.org/svn/reactos?rev=55811&view=rev
Log:
[USBOHCI] [USBEHCI] [USBUHCI]
- Don't assume iConfiguration value of configuration descriptor is zero based aligned
- Fixes bugcheck in VmWare
Modified:
trunk/reactos/drivers/usb/CMakeLists.txt
trunk/reactos/drivers/usb/usbehci/usb_device.cpp
trunk/reactos/drivers/usb/usbohci/usb_device.cpp
trunk/reactos/drivers/usb/usbuhci/usb_device.cpp
Modified: trunk/reactos/drivers/usb/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/CMakeLists.txt…
==============================================================================
--- trunk/reactos/drivers/usb/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/CMakeLists.txt [iso-8859-1] Wed Feb 22 18:57:49 2012
@@ -3,4 +3,5 @@
add_subdirectory(usbehci)
add_subdirectory(usbhub)
add_subdirectory(usbohci)
-add_subdirectory(usbstor)
+add_subdirectory(usbstor)
+add_subdirectory(usbuhci)
Modified: trunk/reactos/drivers/usb/usbehci/usb_device.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbehci/usb_de…
==============================================================================
--- trunk/reactos/drivers/usb/usbehci/usb_device.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbehci/usb_device.cpp [iso-8859-1] Wed Feb 22 18:57:49
2012
@@ -1044,29 +1044,66 @@
ULONG InterfaceIndex, PipeIndex;
USB_DEFAULT_PIPE_SETUP_PACKET CtrlSetup;
NTSTATUS Status;
-
- //
- // sanity checks
- //
- ASSERT(ConfigurationDescriptor->iConfiguration <
m_DeviceDescriptor.bNumConfigurations);
- ASSERT(ConfigurationDescriptor->iConfiguration ==
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].ConfigurationDescriptor->iConfiguration);
-
- //
- // sanity check
- //
- ASSERT(ConfigurationDescriptor->bNumInterfaces <=
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].ConfigurationDescriptor->bNumInterfaces);
+ UCHAR bConfigurationValue = 0;
+ ULONG ConfigurationIndex = 0, Index;
+ UCHAR Found = FALSE;
+
+
+ if (ConfigurationDescriptor)
+ {
+ //
+ // find configuration index
+ //
+ for(Index = 0; Index < m_DeviceDescriptor.bNumConfigurations; Index++)
+ {
+ if
(m_ConfigurationDescriptors[Index].ConfigurationDescriptor->iConfiguration ==
ConfigurationDescriptor->iConfiguration)
+ {
+ //
+ // found configuration index
+ //
+ ConfigurationIndex = Index;
+ Found = TRUE;
+ }
+ }
+
+ if (!Found)
+ {
+ DPRINT1("[USBUHCI] invalid configuration index %lu\n",
ConfigurationDescriptor->iConfiguration);
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ //
+ // sanity check
+ //
+ ASSERT(ConfigurationDescriptor->bNumInterfaces <=
m_ConfigurationDescriptors[ConfigurationIndex].ConfigurationDescriptor->bNumInterfaces);
+
+ //
+ // get configuration value
+ //
+ bConfigurationValue = ConfigurationDescriptor->bConfigurationValue;
+ }
//
// now build setup packet
//
RtlZeroMemory(&CtrlSetup, sizeof(USB_DEFAULT_PIPE_SETUP_PACKET));
CtrlSetup.bRequest = USB_REQUEST_SET_CONFIGURATION;
- CtrlSetup.wValue.W = ConfigurationDescriptor->bConfigurationValue;
+ CtrlSetup.wValue.W = bConfigurationValue;
//
// select configuration
//
Status = CommitSetupPacket(&CtrlSetup, 0, 0, 0);
+
+ if (!ConfigurationDescriptor)
+ {
+ //
+ // unconfigure request
+ //
+ DPRINT1("CUsbDevice::SelectConfiguration Unconfigure Request Status
%x\n", Status);
+ m_ConfigurationIndex = 0;
+ return Status;
+ }
//
// informal debug print
@@ -1081,14 +1118,14 @@
}
//
- // store configuration device index
- //
- m_ConfigurationIndex = ConfigurationDescriptor->iConfiguration;
+ // store new configuration device index
+ //
+ m_ConfigurationIndex = ConfigurationIndex;
//
// store configuration handle
//
- *ConfigurationHandle =
&m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration];
+ *ConfigurationHandle = &m_ConfigurationDescriptors[ConfigurationIndex];
//
// copy interface info and pipe info
@@ -1098,7 +1135,7 @@
//
// sanity check: is the info pre-layed out
//
- PC_ASSERT(InterfaceInfo->NumberOfPipes ==
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].InterfaceDescriptor.bNumEndpoints);
+ PC_ASSERT(InterfaceInfo->NumberOfPipes ==
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].InterfaceDescriptor.bNumEndpoints);
PC_ASSERT(InterfaceInfo->Length != 0);
#ifdef _MSC_VER
PC_ASSERT(InterfaceInfo->Length == FIELD_OFFSET(USBD_INTERFACE_INFORMATION,
Pipes[InterfaceInfo->NumberOfPipes]));
@@ -1107,10 +1144,10 @@
//
// copy interface info
//
- InterfaceInfo->InterfaceHandle =
(USBD_INTERFACE_HANDLE)&m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex];
- InterfaceInfo->Class =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceClass;
- InterfaceInfo->SubClass =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceSubClass;
- InterfaceInfo->Protocol =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceProtocol;
+ InterfaceInfo->InterfaceHandle =
(USBD_INTERFACE_HANDLE)&m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex];
+ InterfaceInfo->Class =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceClass;
+ InterfaceInfo->SubClass =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceSubClass;
+ InterfaceInfo->Protocol =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceProtocol;
InterfaceInfo->Reserved = 0;
//
@@ -1121,16 +1158,16 @@
//
// copy pipe info
//
- InterfaceInfo->Pipes[PipeIndex].MaximumPacketSize =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.wMaxPacketSize;
- InterfaceInfo->Pipes[PipeIndex].EndpointAddress =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bEndpointAddress;
- InterfaceInfo->Pipes[PipeIndex].Interval =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bInterval;
- InterfaceInfo->Pipes[PipeIndex].PipeType =
(USBD_PIPE_TYPE)m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bmAttributes;
- InterfaceInfo->Pipes[PipeIndex].PipeHandle =
(PVOID)&m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor;
+ InterfaceInfo->Pipes[PipeIndex].MaximumPacketSize =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.wMaxPacketSize;
+ InterfaceInfo->Pipes[PipeIndex].EndpointAddress =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bEndpointAddress;
+ InterfaceInfo->Pipes[PipeIndex].Interval =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bInterval;
+ InterfaceInfo->Pipes[PipeIndex].PipeType =
(USBD_PIPE_TYPE)m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bmAttributes;
+ InterfaceInfo->Pipes[PipeIndex].PipeHandle =
(PVOID)&m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor;
//
// data toggle is reset on configuration requests
//
-
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].DataToggle
= FALSE;
+
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].DataToggle
= FALSE;
}
//
Modified: trunk/reactos/drivers/usb/usbohci/usb_device.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbohci/usb_de…
==============================================================================
--- trunk/reactos/drivers/usb/usbohci/usb_device.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbohci/usb_device.cpp [iso-8859-1] Wed Feb 22 18:57:49
2012
@@ -1104,19 +1104,37 @@
USB_DEFAULT_PIPE_SETUP_PACKET CtrlSetup;
NTSTATUS Status;
UCHAR bConfigurationValue = 0;
+ ULONG ConfigurationIndex = 0, Index;
+ UCHAR Found = FALSE;
+
if (ConfigurationDescriptor)
{
//
- // sanity checks
- //
- ASSERT(ConfigurationDescriptor->iConfiguration <
m_DeviceDescriptor.bNumConfigurations);
- ASSERT(ConfigurationDescriptor->iConfiguration ==
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].ConfigurationDescriptor->iConfiguration);
+ // find configuration index
+ //
+ for(Index = 0; Index < m_DeviceDescriptor.bNumConfigurations; Index++)
+ {
+ if
(m_ConfigurationDescriptors[Index].ConfigurationDescriptor->iConfiguration ==
ConfigurationDescriptor->iConfiguration)
+ {
+ //
+ // found configuration index
+ //
+ ConfigurationIndex = Index;
+ Found = TRUE;
+ }
+ }
+
+ if (!Found)
+ {
+ DPRINT1("[USBUHCI] invalid configuration index %lu\n",
ConfigurationDescriptor->iConfiguration);
+ return STATUS_INVALID_PARAMETER;
+ }
//
// sanity check
//
- ASSERT(ConfigurationDescriptor->bNumInterfaces <=
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].ConfigurationDescriptor->bNumInterfaces);
+ ASSERT(ConfigurationDescriptor->bNumInterfaces <=
m_ConfigurationDescriptors[ConfigurationIndex].ConfigurationDescriptor->bNumInterfaces);
//
// get configuration value
@@ -1159,14 +1177,14 @@
}
//
- // store configuration device index
- //
- m_ConfigurationIndex = ConfigurationDescriptor->iConfiguration;
+ // store new configuration device index
+ //
+ m_ConfigurationIndex = ConfigurationIndex;
//
// store configuration handle
//
- *ConfigurationHandle =
&m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration];
+ *ConfigurationHandle = &m_ConfigurationDescriptors[ConfigurationIndex];
//
// copy interface info and pipe info
@@ -1176,7 +1194,7 @@
//
// sanity check: is the info pre-layed out
//
- PC_ASSERT(InterfaceInfo->NumberOfPipes ==
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].InterfaceDescriptor.bNumEndpoints);
+ PC_ASSERT(InterfaceInfo->NumberOfPipes ==
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].InterfaceDescriptor.bNumEndpoints);
PC_ASSERT(InterfaceInfo->Length != 0);
#ifdef _MSC_VER
PC_ASSERT(InterfaceInfo->Length == FIELD_OFFSET(USBD_INTERFACE_INFORMATION,
Pipes[InterfaceInfo->NumberOfPipes]));
@@ -1185,10 +1203,10 @@
//
// copy interface info
//
- InterfaceInfo->InterfaceHandle =
(USBD_INTERFACE_HANDLE)&m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex];
- InterfaceInfo->Class =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceClass;
- InterfaceInfo->SubClass =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceSubClass;
- InterfaceInfo->Protocol =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceProtocol;
+ InterfaceInfo->InterfaceHandle =
(USBD_INTERFACE_HANDLE)&m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex];
+ InterfaceInfo->Class =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceClass;
+ InterfaceInfo->SubClass =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceSubClass;
+ InterfaceInfo->Protocol =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceProtocol;
InterfaceInfo->Reserved = 0;
//
@@ -1199,16 +1217,16 @@
//
// copy pipe info
//
- InterfaceInfo->Pipes[PipeIndex].MaximumPacketSize =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.wMaxPacketSize;
- InterfaceInfo->Pipes[PipeIndex].EndpointAddress =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bEndpointAddress;
- InterfaceInfo->Pipes[PipeIndex].Interval =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bInterval;
- InterfaceInfo->Pipes[PipeIndex].PipeType =
(USBD_PIPE_TYPE)m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bmAttributes;
- InterfaceInfo->Pipes[PipeIndex].PipeHandle =
(PVOID)&m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor;
+ InterfaceInfo->Pipes[PipeIndex].MaximumPacketSize =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.wMaxPacketSize;
+ InterfaceInfo->Pipes[PipeIndex].EndpointAddress =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bEndpointAddress;
+ InterfaceInfo->Pipes[PipeIndex].Interval =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bInterval;
+ InterfaceInfo->Pipes[PipeIndex].PipeType =
(USBD_PIPE_TYPE)m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bmAttributes;
+ InterfaceInfo->Pipes[PipeIndex].PipeHandle =
(PVOID)&m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor;
//
// data toggle is reset on configuration requests
//
-
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].DataToggle
= FALSE;
+
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].DataToggle
= FALSE;
}
//
Modified: trunk/reactos/drivers/usb/usbuhci/usb_device.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbuhci/usb_de…
==============================================================================
--- trunk/reactos/drivers/usb/usbuhci/usb_device.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbuhci/usb_device.cpp [iso-8859-1] Wed Feb 22 18:57:49
2012
@@ -1144,19 +1144,37 @@
USB_DEFAULT_PIPE_SETUP_PACKET CtrlSetup;
NTSTATUS Status;
UCHAR bConfigurationValue = 0;
+ ULONG ConfigurationIndex = 0, Index;
+ UCHAR Found = FALSE;
+
if (ConfigurationDescriptor)
{
//
- // sanity checks
- //
- ASSERT(ConfigurationDescriptor->iConfiguration <
m_DeviceDescriptor.bNumConfigurations);
- ASSERT(ConfigurationDescriptor->iConfiguration ==
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].ConfigurationDescriptor->iConfiguration);
+ // find configuration index
+ //
+ for(Index = 0; Index < m_DeviceDescriptor.bNumConfigurations; Index++)
+ {
+ if
(m_ConfigurationDescriptors[Index].ConfigurationDescriptor->iConfiguration ==
ConfigurationDescriptor->iConfiguration)
+ {
+ //
+ // found configuration index
+ //
+ ConfigurationIndex = Index;
+ Found = TRUE;
+ }
+ }
+
+ if (!Found)
+ {
+ DPRINT1("[USBUHCI] invalid configuration index %lu\n",
ConfigurationDescriptor->iConfiguration);
+ return STATUS_INVALID_PARAMETER;
+ }
//
// sanity check
//
- ASSERT(ConfigurationDescriptor->bNumInterfaces <=
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].ConfigurationDescriptor->bNumInterfaces);
+ ASSERT(ConfigurationDescriptor->bNumInterfaces <=
m_ConfigurationDescriptors[ConfigurationIndex].ConfigurationDescriptor->bNumInterfaces);
//
// get configuration value
@@ -1199,14 +1217,14 @@
}
//
- // store configuration device index
- //
- m_ConfigurationIndex = ConfigurationDescriptor->iConfiguration;
+ // store new configuration device index
+ //
+ m_ConfigurationIndex = ConfigurationIndex;
//
// store configuration handle
//
- *ConfigurationHandle =
&m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration];
+ *ConfigurationHandle = &m_ConfigurationDescriptors[ConfigurationIndex];
//
// copy interface info and pipe info
@@ -1216,7 +1234,7 @@
//
// sanity check: is the info pre-layed out
//
- PC_ASSERT(InterfaceInfo->NumberOfPipes ==
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].InterfaceDescriptor.bNumEndpoints);
+ PC_ASSERT(InterfaceInfo->NumberOfPipes ==
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].InterfaceDescriptor.bNumEndpoints);
PC_ASSERT(InterfaceInfo->Length != 0);
#ifdef _MSC_VER
PC_ASSERT(InterfaceInfo->Length == FIELD_OFFSET(USBD_INTERFACE_INFORMATION,
Pipes[InterfaceInfo->NumberOfPipes]));
@@ -1225,10 +1243,10 @@
//
// copy interface info
//
- InterfaceInfo->InterfaceHandle =
(USBD_INTERFACE_HANDLE)&m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex];
- InterfaceInfo->Class =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceClass;
- InterfaceInfo->SubClass =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceSubClass;
- InterfaceInfo->Protocol =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceProtocol;
+ InterfaceInfo->InterfaceHandle =
(USBD_INTERFACE_HANDLE)&m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex];
+ InterfaceInfo->Class =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceClass;
+ InterfaceInfo->SubClass =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceSubClass;
+ InterfaceInfo->Protocol =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].InterfaceDescriptor.bInterfaceProtocol;
InterfaceInfo->Reserved = 0;
//
@@ -1239,16 +1257,16 @@
//
// copy pipe info
//
- InterfaceInfo->Pipes[PipeIndex].MaximumPacketSize =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.wMaxPacketSize;
- InterfaceInfo->Pipes[PipeIndex].EndpointAddress =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bEndpointAddress;
- InterfaceInfo->Pipes[PipeIndex].Interval =
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bInterval;
- InterfaceInfo->Pipes[PipeIndex].PipeType =
(USBD_PIPE_TYPE)m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bmAttributes;
- InterfaceInfo->Pipes[PipeIndex].PipeHandle =
(PVOID)&m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor;
+ InterfaceInfo->Pipes[PipeIndex].MaximumPacketSize =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.wMaxPacketSize;
+ InterfaceInfo->Pipes[PipeIndex].EndpointAddress =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bEndpointAddress;
+ InterfaceInfo->Pipes[PipeIndex].Interval =
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bInterval;
+ InterfaceInfo->Pipes[PipeIndex].PipeType =
(USBD_PIPE_TYPE)m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor.bmAttributes;
+ InterfaceInfo->Pipes[PipeIndex].PipeHandle =
(PVOID)&m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].EndPointDescriptor;
//
// data toggle is reset on configuration requests
//
-
m_ConfigurationDescriptors[ConfigurationDescriptor->iConfiguration].Interfaces[InterfaceIndex].EndPoints[PipeIndex].DataToggle
= FALSE;
+
m_ConfigurationDescriptors[ConfigurationIndex].Interfaces[InterfaceIndex].EndPoints[PipeIndex].DataToggle
= FALSE;
}
//