[KBDCLASS][MOUCLASS]

- Forward power IRPs to lower devices. Failing IRP_MN_SET_POWER is illegal!
CORE-10117

svn path=/trunk/; revision=69054
This commit is contained in:
Thomas Faber 2015-09-06 14:32:22 +00:00
parent 9eaf6957f5
commit 17301d5353
2 changed files with 14 additions and 8 deletions

View file

@ -193,15 +193,18 @@ IrpStub(
IN PIRP Irp)
{
NTSTATUS Status = STATUS_NOT_SUPPORTED;
PPORT_DEVICE_EXTENSION DeviceExtension;
if (!((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsClassDO)
DeviceExtension = DeviceObject->DeviceExtension;
if (!DeviceExtension->Common.IsClassDO)
{
/* Forward some IRPs to lower device */
switch (IoGetCurrentIrpStackLocation(Irp)->MajorFunction)
{
case IRP_MJ_PNP:
case IRP_MJ_INTERNAL_DEVICE_CONTROL:
return ForwardIrpAndForget(DeviceObject, Irp);
case IRP_MJ_POWER:
PoStartNextPowerIrp(Irp);
IoSkipCurrentIrpStackLocation(Irp);
return PoCallDriver(DeviceExtension->LowerDevice, Irp);
default:
{
ERR_(CLASS_NAME, "Port DO stub for major function 0x%lx\n",

View file

@ -170,15 +170,18 @@ IrpStub(
IN PIRP Irp)
{
NTSTATUS Status = STATUS_NOT_SUPPORTED;
PPORT_DEVICE_EXTENSION DeviceExtension;
if (!((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsClassDO)
DeviceExtension = DeviceObject->DeviceExtension;
if (!DeviceExtension->Common.IsClassDO)
{
/* Forward some IRPs to lower device */
switch (IoGetCurrentIrpStackLocation(Irp)->MajorFunction)
{
case IRP_MJ_PNP:
case IRP_MJ_INTERNAL_DEVICE_CONTROL:
return ForwardIrpAndForget(DeviceObject, Irp);
case IRP_MJ_POWER:
PoStartNextPowerIrp(Irp);
IoSkipCurrentIrpStackLocation(Irp);
return PoCallDriver(DeviceExtension->LowerDevice, Irp);
default:
{
ERR_(CLASS_NAME, "Port DO stub for major function 0x%lx\n",