https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0d15b2a3cb8375646ccc5…
commit 0d15b2a3cb8375646ccc582f74945f8b9c8bbe83
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Wed Mar 6 14:57:58 2019 +0100
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Fri May 1 12:05:11 2020 +0200
[USBCCGP] Correctly stub PDO power IRP handling.
---
drivers/usb/usbccgp/pdo.c | 29 +++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/usbccgp/pdo.c b/drivers/usb/usbccgp/pdo.c
index bcd0acb075a..40072ace311 100644
--- a/drivers/usb/usbccgp/pdo.c
+++ b/drivers/usb/usbccgp/pdo.c
@@ -1070,6 +1070,30 @@ PDO_HandleInternalDeviceControl(
return STATUS_NOT_IMPLEMENTED;
}
+NTSTATUS
+PDO_HandlePower(
+ PDEVICE_OBJECT DeviceObject,
+ PIRP Irp)
+{
+ NTSTATUS Status;
+ PIO_STACK_LOCATION IoStack;
+
+ 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;
+}
+
NTSTATUS
PDO_Dispatch(
@@ -1089,10 +1113,7 @@ PDO_Dispatch(
case IRP_MJ_INTERNAL_DEVICE_CONTROL:
return PDO_HandleInternalDeviceControl(DeviceObject, Irp);
case IRP_MJ_POWER:
- PoStartNextPowerIrp(Irp);
- Irp->IoStatus.Status = STATUS_SUCCESS;
- IoCompleteRequest(Irp, IO_NO_INCREMENT);
- return STATUS_SUCCESS;
+ return PDO_HandlePower(DeviceObject, Irp);
default:
DPRINT1("PDO_Dispatch Function %x not implemented\n",
IoStack->MajorFunction);
Status = Irp->IoStatus.Status;