Author: mjmartin
Date: Sun Jan 10 12:08:51 2010
New Revision: 45023
URL:
http://svn.reactos.org/svn/reactos?rev=45023&view=rev
Log:
[usb/usbehci]
- DeviceArrivalWorkItem: Check the device object returned from
IoGetAttachedDeviceReference. if its the PDO, deref and return.
- Pass upper attached device object pointer to the completion routine.
- ArrivalNotificationCompletion: Dereference the upper attached device object before
returning.
Modified:
trunk/reactos/drivers/usb/usbehci/irp.c
Modified: trunk/reactos/drivers/usb/usbehci/irp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbehci/irp.c?…
==============================================================================
--- trunk/reactos/drivers/usb/usbehci/irp.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbehci/irp.c [iso-8859-1] Sun Jan 10 12:08:51 2010
@@ -98,7 +98,9 @@
NTAPI
ArrivalNotificationCompletion(PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID PContext)
{
+ PDEVICE_OBJECT PortDeviceObject = (PDEVICE_OBJECT) PContext;
IoFreeIrp(Irp);
+ ObDereferenceObject(PortDeviceObject);
return STATUS_MORE_PROCESSING_REQUIRED;
}
@@ -120,6 +122,12 @@
return;
}
+ if (PortDeviceObject == DeviceObject)
+ {
+ /* Piontless to send query relations to ourself */
+ ObDereferenceObject(PortDeviceObject);
+ }
+
Irp = IoAllocateIrp(PortDeviceObject->StackSize, FALSE);
if (!Irp)
@@ -129,7 +137,7 @@
IoSetCompletionRoutine(Irp,
(PIO_COMPLETION_ROUTINE)ArrivalNotificationCompletion,
- NULL,
+ (PVOID) PortDeviceObject,
TRUE,
TRUE,
TRUE);