[PARPORT]
authorThomas Faber <thomas.faber@reactos.org>
Wed, 20 Jul 2016 12:21:11 +0000 (12:21 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Wed, 20 Jul 2016 12:21:11 +0000 (12:21 +0000)
- Properly stub FdoPower and PdoPower
CORE-11648

svn path=/trunk/; revision=71973

reactos/drivers/parallel/parport/fdo.c
reactos/drivers/parallel/parport/pdo.c

index 8e757c0..2d84763 100644 (file)
@@ -600,13 +600,14 @@ NTAPI
 FdoPower(IN PDEVICE_OBJECT DeviceObject,
          IN PIRP Irp)
 {
-    DPRINT("FdoPower()\n");
+    PDEVICE_OBJECT LowerDevice;
 
-    Irp->IoStatus.Information = 0;
-    Irp->IoStatus.Status = STATUS_SUCCESS;
-    IoCompleteRequest(Irp, IO_NO_INCREMENT);
+    DPRINT("FdoPower()\n");
 
-    return STATUS_SUCCESS;
+    LowerDevice = ((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->LowerDevice;
+    PoStartNextPowerIrp(Irp);
+    IoSkipCurrentIrpStackLocation(Irp);
+    return PoCallDriver(LowerDevice, Irp);;
 }
 
 /* EOF */
index 5af148c..ccd00a8 100644 (file)
@@ -175,12 +175,25 @@ NTAPI
 PdoPower(IN PDEVICE_OBJECT DeviceObject,
          IN PIRP Irp)
 {
+    NTSTATUS Status;
+    PIO_STACK_LOCATION IoStack;
+
     DPRINT("PdoPower()\n");
 
-    Irp->IoStatus.Information = 0;
-    Irp->IoStatus.Status = STATUS_SUCCESS;
+    IoStack = IoGetCurrentIrpStackLocation(Irp);
+
+    switch (IoStack->MinorFunction)
+    {
+        case IRP_MN_SET_POWER:
+        case IRP_MN_QUERY_POWER:
+            Irp->IoStatus.Status = STATUS_SUCCESS;
+            break;
+    }
+
+    Status = Irp->IoStatus.Status;
+    PoStartNextPowerIrp(Irp);
     IoCompleteRequest(Irp, IO_NO_INCREMENT);
-    return STATUS_SUCCESS;
+    return Status;
 }
 
 /* EOF */