Forward all IRPs, even unknown ones

svn path=/trunk/; revision=33577
This commit is contained in:
Hervé Poussineau 2008-05-18 11:45:26 +00:00
parent 5dd0513c53
commit 36ce0cd8af

View file

@ -37,56 +37,17 @@ 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:
/* Forward IRPs to lower device */
return ForwardIrpToLowerDeviceAndForget(DeviceObject, Irp);
default:
{
WARN_(SERENUM, "FDO stub for major function 0x%lx\n",
IoGetCurrentIrpStackLocation(Irp)->MajorFunction);
ASSERT(FALSE);
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);
/* Forward IRPs to attached FDO */
return ForwardIrpToAttachedFdoAndForget(DeviceObject, Irp);
}
}
}
Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return Status;
}
/*
* Standard DriverEntry method.