From fc557e4320651e0e6728383a0b7f8044333a6700 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Fri, 27 Jan 2012 14:08:40 +0000 Subject: [PATCH] [HIDCLASS] - IOCTL are only supported for PDOs svn path=/branches/usb-bringup-trunk/; revision=55244 --- drivers/hid/hidclass/hidclass.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/hid/hidclass/hidclass.c b/drivers/hid/hidclass/hidclass.c index 870ec2c50eb..3b6a662bedf 100644 --- a/drivers/hid/hidclass/hidclass.c +++ b/drivers/hid/hidclass/hidclass.c @@ -723,6 +723,21 @@ HidClass_DeviceControl( // get device extension // CommonDeviceExtension = (PHIDCLASS_COMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + + // + // only PDO are supported + // + if (CommonDeviceExtension->IsFDO) + { + // + // invalid request + // + DPRINT1("[HIDCLASS] DeviceControl Irp for FDO arrived\n"); + Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_INVALID_PARAMETER_1; + } + ASSERT(CommonDeviceExtension->IsFDO == FALSE); //