https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9df05ba4b65631942d006…
commit 9df05ba4b65631942d006f36a4ad1d848f0bf61f
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Sun Jul 12 15:37:20 2020 +0200
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Thu Jul 30 13:24:29 2020 +0200
[ISAPNP] Properly stub IRP_MJ_POWER
---
drivers/bus/isapnp/isapnp.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/bus/isapnp/isapnp.c b/drivers/bus/isapnp/isapnp.c
index 913721b3acd..f14894de6c8 100644
--- a/drivers/bus/isapnp/isapnp.c
+++ b/drivers/bus/isapnp/isapnp.c
@@ -807,6 +807,28 @@ IsaAddDevice(
return STATUS_SUCCESS;
}
+DRIVER_DISPATCH IsaPower;
+NTSTATUS
+NTAPI
+IsaPower(
+ IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp)
+{
+ PISAPNP_COMMON_EXTENSION DevExt = DeviceObject->DeviceExtension;
+ NTSTATUS Status;
+
+ if (!DevExt->IsFdo)
+ {
+ Status = Irp->IoStatus.Status;
+ IoCompleteRequest(Irp, IO_NO_INCREMENT);
+ return Status;
+ }
+
+ PoStartNextPowerIrp(Irp);
+ IoSkipCurrentIrpStackLocation(Irp);
+ return PoCallDriver(((PISAPNP_FDO_EXTENSION)DevExt)->Ldo, Irp);
+}
+
static DRIVER_DISPATCH IsaPnp;
static
@@ -849,6 +871,7 @@ DriverEntry(
DriverObject->MajorFunction[IRP_MJ_WRITE] = IsaReadWrite;
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = IsaIoctl;
DriverObject->MajorFunction[IRP_MJ_PNP] = IsaPnp;
+ DriverObject->MajorFunction[IRP_MJ_POWER] = IsaPower;
DriverObject->DriverExtension->AddDevice = IsaAddDevice;
return STATUS_SUCCESS;