From 36ce0cd8af56302a37534e916c9edd2eafd80624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 18 May 2008 11:45:26 +0000 Subject: [PATCH] Forward all IRPs, even unknown ones svn path=/trunk/; revision=33577 --- reactos/drivers/serial/serenum/serenum.c | 47 ++---------------------- 1 file changed, 4 insertions(+), 43 deletions(-) diff --git a/reactos/drivers/serial/serenum/serenum.c b/reactos/drivers/serial/serenum/serenum.c index 2b2fba529bb..8dc0e3df44b 100644 --- a/reactos/drivers/serial/serenum/serenum.c +++ b/reactos/drivers/serial/serenum/serenum.c @@ -37,55 +37,16 @@ IrpStub( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - NTSTATUS Status = STATUS_NOT_SUPPORTED; - if (((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) { - /* Forward some IRPs to lower device */ - switch (IoGetCurrentIrpStackLocation(Irp)->MajorFunction) - { - case IRP_MJ_CREATE: - case IRP_MJ_CLOSE: - case IRP_MJ_CLEANUP: - case IRP_MJ_QUERY_INFORMATION: - case IRP_MJ_READ: - case IRP_MJ_WRITE: - case IRP_MJ_DEVICE_CONTROL: - return ForwardIrpToLowerDeviceAndForget(DeviceObject, Irp); - default: - { - WARN_(SERENUM, "FDO stub for major function 0x%lx\n", - IoGetCurrentIrpStackLocation(Irp)->MajorFunction); - ASSERT(FALSE); - return ForwardIrpToLowerDeviceAndForget(DeviceObject, Irp); - } - } + /* Forward IRPs to lower device */ + return ForwardIrpToLowerDeviceAndForget(DeviceObject, Irp); } else { - /* Forward some IRPs to attached FDO */ - switch (IoGetCurrentIrpStackLocation(Irp)->MajorFunction) - { - case IRP_MJ_CREATE: - case IRP_MJ_CLOSE: - case IRP_MJ_CLEANUP: - case IRP_MJ_READ: - case IRP_MJ_WRITE: - case IRP_MJ_DEVICE_CONTROL: - return ForwardIrpToAttachedFdoAndForget(DeviceObject, Irp); - default: - { - WARN_(SERENUM, "PDO stub for major function 0x%lx\n", - IoGetCurrentIrpStackLocation(Irp)->MajorFunction); - ASSERT(FALSE); - return ForwardIrpToAttachedFdoAndForget(DeviceObject, Irp); - } - } + /* Forward IRPs to attached FDO */ + return ForwardIrpToAttachedFdoAndForget(DeviceObject, Irp); } - - Irp->IoStatus.Status = Status; - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return Status; } /*