- Do not prematurely complete IRP_MN_FILTER_RESOURCE_REQUIREMENTS or IRP_MN_QUERY_PNP_DEVICE_STATE
- Do not handle IRP_MN_QUERY_DEVICE_RELATIONS.BusRelations. We're not the bus driver!
- Correctly stub the (mandatory!) dispatch functions for IRP_MJ_POWER and IRP_MJ_SYSTEM_CONTROL
CORE-8142 #resolve
svn path=/trunk/; revision=63127
static DRIVER_DISPATCH i8042DeviceControl;
_Dispatch_type_(IRP_MJ_INTERNAL_DEVICE_CONTROL)
static DRIVER_DISPATCH i8042InternalDeviceControl;
static DRIVER_DISPATCH i8042DeviceControl;
_Dispatch_type_(IRP_MJ_INTERNAL_DEVICE_CONTROL)
static DRIVER_DISPATCH i8042InternalDeviceControl;
+_Dispatch_type_(IRP_MJ_SYSTEM_CONTROL)
+static DRIVER_DISPATCH i8042SystemControl;
+_Dispatch_type_(IRP_MJ_POWER)
+static DRIVER_DISPATCH i8042Power;
DRIVER_INITIALIZE DriverEntry;
NTSTATUS NTAPI
DRIVER_INITIALIZE DriverEntry;
NTSTATUS NTAPI
+static NTSTATUS NTAPI
+i8042Power(
+ IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp)
+{
+ PFDO_DEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
+ PDEVICE_OBJECT LowerDevice = DeviceExtension->LowerDevice;
+
+ PoStartNextPowerIrp(Irp);
+ IoSkipCurrentIrpStackLocation(Irp);
+ return PoCallDriver(LowerDevice, Irp);
+}
+
+static NTSTATUS NTAPI
+i8042SystemControl(
+ IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp)
+{
+ return ForwardIrpAndForget(DeviceObject, Irp);
+}
+
NTSTATUS NTAPI
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
NTSTATUS NTAPI
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
DriverObject->MajorFunction[IRP_MJ_CLOSE] = i8042Close;
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = i8042DeviceControl;
DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = i8042InternalDeviceControl;
DriverObject->MajorFunction[IRP_MJ_CLOSE] = i8042Close;
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = i8042DeviceControl;
DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = i8042InternalDeviceControl;
+ DriverObject->MajorFunction[IRP_MJ_POWER] = i8042Power;
+ DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = i8042SystemControl;
DriverObject->MajorFunction[IRP_MJ_PNP] = i8042Pnp;
return STATUS_SUCCESS;
DriverObject->MajorFunction[IRP_MJ_PNP] = i8042Pnp;
return STATUS_SUCCESS;
/* FUNCTIONS *****************************************************************/
static KDEFERRED_ROUTINE i8042MouDpcRoutine;
/* FUNCTIONS *****************************************************************/
static KDEFERRED_ROUTINE i8042MouDpcRoutine;
+static KDEFERRED_ROUTINE i8042DpcRoutineMouseTimeout;
/*
* These functions are callbacks for filter driver custom interrupt
/*
* These functions are callbacks for filter driver custom interrupt
* I'll just send the 'disable mouse port' command to the controller
* and say the mouse doesn't exist.
*/
* I'll just send the 'disable mouse port' command to the controller
* and say the mouse doesn't exist.
*/
-static KDEFERRED_ROUTINE i8042DpcRoutineMouseTimeout;
static VOID NTAPI
i8042DpcRoutineMouseTimeout(
IN PKDPC Dpc,
static VOID NTAPI
i8042DpcRoutineMouseTimeout(
IN PKDPC Dpc,
- PDEVICE_RELATIONS DeviceRelations;
-
TRACE_(I8042PRT, "IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n");
TRACE_(I8042PRT, "IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n");
- DeviceRelations = ExAllocatePoolWithTag(PagedPool,
- sizeof(DEVICE_RELATIONS),
- I8042PRT_TAG);
- if (DeviceRelations)
- {
- DeviceRelations->Count = 0;
- Information = (ULONG_PTR)DeviceRelations;
- Status = STATUS_SUCCESS;
- }
- else
- Status = STATUS_INSUFFICIENT_RESOURCES;
- break;
+ return ForwardIrpAndForget(DeviceObject, Irp);
}
case RemovalRelations:
{
}
case RemovalRelations:
{
default:
ERR_(I8042PRT, "IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n",
Stack->Parameters.QueryDeviceRelations.Type);
default:
ERR_(I8042PRT, "IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n",
Stack->Parameters.QueryDeviceRelations.Type);
return ForwardIrpAndForget(DeviceObject, Irp);
}
break;
return ForwardIrpAndForget(DeviceObject, Irp);
}
break;
case IRP_MN_FILTER_RESOURCE_REQUIREMENTS: /* (optional) 0x0d */
{
TRACE_(I8042PRT, "IRP_MJ_PNP / IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n");
case IRP_MN_FILTER_RESOURCE_REQUIREMENTS: /* (optional) 0x0d */
{
TRACE_(I8042PRT, "IRP_MJ_PNP / IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n");
- /* Nothing to do */
- Status = Irp->IoStatus.Status;
- break;
+ return ForwardIrpAndForget(DeviceObject, Irp);
}
case IRP_MN_QUERY_PNP_DEVICE_STATE: /* 0x14 */
{
TRACE_(I8042PRT, "IRP_MJ_PNP / IRP_MN_QUERY_PNP_DEVICE_STATE\n");
}
case IRP_MN_QUERY_PNP_DEVICE_STATE: /* 0x14 */
{
TRACE_(I8042PRT, "IRP_MJ_PNP / IRP_MN_QUERY_PNP_DEVICE_STATE\n");
- /* Nothing much to tell */
- Information = 0;
- Status = STATUS_SUCCESS;
- break;
+ return ForwardIrpAndForget(DeviceObject, Irp);