Author: janderwald
Date: Wed Jan 14 15:47:54 2009
New Revision: 38765
URL:
http://svn.reactos.org/svn/reactos?rev=38765&view=rev
Log:
- sorry folks
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c [iso-8859-1] Wed Jan 14 15:47:54
2009
@@ -119,7 +119,7 @@
if ( ! NT_SUCCESS(status) )
{
DPRINT("StartDevice returned a failure code [0x%8x]\n", status);
- resource_list->lpVtbl->Release(resource_list);
+ //resource_list->lpVtbl->Release(resource_list);
Irp->IoStatus.Status = status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
@@ -261,14 +261,50 @@
return STATUS_UNSUCCESSFUL;
}
-/*
- * @unimplemented
+static
+NTSTATUS
+NTAPI
+IrpCompletionRoutine(
+ IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp,
+ IN PVOID Context)
+{
+ KeSetEvent((PRKEVENT)Context, IO_NO_INCREMENT, FALSE);
+ return STATUS_SUCCESS;
+}
+
+
+/*
+ * @implemented
*/
NTSTATUS NTAPI
PcForwardIrpSynchronous(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
- UNIMPLEMENTED;
- return STATUS_UNSUCCESSFUL;
-}
+ KEVENT Event;
+ PCExtension* DeviceExt;
+ NTSTATUS Status;
+
+ DPRINT1("PcForwardIrpSynchronous\n");
+
+ DeviceExt = (PCExtension*)DeviceObject->DeviceExtension;
+
+ /* initialize the notification event */
+ KeInitializeEvent(&Event, NotificationEvent, FALSE);
+
+ /* setup a completion routine */
+ IoSetCompletionRoutine(Irp, IrpCompletionRoutine, (PVOID)&Event, TRUE, FALSE,
FALSE);
+
+ /* now call the driver */
+ Status = IoCallDriver(DeviceExt->PrevDeviceObject, Irp);
+ /* did the request complete yet */
+ if (Status == STATUS_PENDING)
+ {
+ /* not yet, lets wait a bit */
+ KeWaitForSingleObject(&Event, Executive, FALSE, FALSE, NULL);
+ Status = STATUS_SUCCESS;
+ }
+ DPRINT1("Returning status %x\n", Status);
+ return Status;
+}
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h [iso-8859-1] Wed Jan 14
15:47:54 2009
@@ -9,6 +9,7 @@
#include <ntddk.h>
#include <portcls.h>
+#define YDEBUG
#include <debug.h>
#include <portcls.h>
@@ -102,9 +103,13 @@
typedef struct
{
PDEVICE_OBJECT PhysicalDeviceObject;
+ PDEVICE_OBJECT PrevDeviceObject;
PCPFNSTARTDEVICE StartDevice;
KSDEVICE_HEADER KsDeviceHeader;
IAdapterPowerManagement * AdapterPowerManagement;
+ ULONG MaxSubDevices;
+ KSOBJECT_CREATE_ITEM * CreateItems;
+
IResourceList* resources;
LIST_ENTRY SubDeviceList;