Author: mjmartin
Date: Mon Jan 11 09:36:12 2010
New Revision: 45043
URL:
http://svn.reactos.org/svn/reactos?rev=45043&view=rev
Log:
[usb/usbehci]
- EhciDefferedRoutine: Fix late night brain fart by filling the members of the
WorkItemData before queuing the work item.
Modified:
trunk/reactos/drivers/usb/usbehci/fdo.c
Modified: trunk/reactos/drivers/usb/usbehci/fdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbehci/fdo.c?…
==============================================================================
--- trunk/reactos/drivers/usb/usbehci/fdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbehci/fdo.c [iso-8859-1] Mon Jan 11 09:36:12 2010
@@ -39,7 +39,6 @@
/* Check for port change on this port */
if (tmp & 0x02)
{
- PIO_WORKITEM WorkItem = NULL;
PWORKITEM_DATA WorkItemData = NULL;
/* Connect or Disconnect? */
@@ -86,13 +85,6 @@
FdoDeviceExtension->ChildDeviceCount++;
CompletePendingRequest(FdoDeviceExtension);
- WorkItem = IoAllocateWorkItem(FdoDeviceExtension->Pdo);
- if (!WorkItem)
- {
- DPRINT1("WorkItem allocation failed!\n");
- break;
- }
-
WorkItemData = ExAllocatePool(NonPagedPool, sizeof(WORKITEM_DATA));
if (!WorkItemData)
{
@@ -100,7 +92,17 @@
break;
}
- IoQueueWorkItem(WorkItem,
+ WorkItemData->IoWorkItem =
IoAllocateWorkItem(FdoDeviceExtension->Pdo);
+ if (!WorkItemData->IoWorkItem)
+ {
+ DPRINT1("WorkItem allocation failed!\n");
+ break;
+ }
+
+
+ WorkItemData->FdoDeviceExtension = FdoDeviceExtension;
+
+ IoQueueWorkItem(WorkItemData->IoWorkItem,
(PIO_WORKITEM_ROUTINE)DeviceArrivalWorkItem,
DelayedWorkQueue,
WorkItemData);