Author: cgutman
Date: Tue May 31 19:29:22 2011
New Revision: 52028
URL:
http://svn.reactos.org/svn/reactos?rev=52028&view=rev
Log:
[PCIIDEX]
- Handle IRP_MN_QUERY_REMOVE_DEVICE
- Handle IRP_MN_QUERY_PNP_DEVICE_STATE to report that we are not disableable to the PnP
manager so we don't get removed during driver installation
Modified:
trunk/reactos/drivers/storage/ide/pciidex/fdo.c
trunk/reactos/drivers/storage/ide/pciidex/pdo.c
Modified: trunk/reactos/drivers/storage/ide/pciidex/fdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/pciide…
==============================================================================
--- trunk/reactos/drivers/storage/ide/pciidex/fdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/ide/pciidex/fdo.c [iso-8859-1] Tue May 31 19:29:22 2011
@@ -402,7 +402,7 @@
{
ULONG MinorFunction;
PIO_STACK_LOCATION Stack;
- ULONG_PTR Information = 0;
+ ULONG_PTR Information = Irp->IoStatus.Information;
NTSTATUS Status;
Stack = IoGetCurrentIrpStackLocation(Irp);
@@ -419,6 +419,12 @@
Status = PciIdeXFdoStartDevice(DeviceObject, Irp);
break;
}
+ case IRP_MN_QUERY_REMOVE_DEVICE: /* 0x01 */
+ {
+ DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_REMOVE_DEVICE\n");
+ Status = STATUS_UNSUCCESSFUL;
+ break;
+ }
case IRP_MN_QUERY_DEVICE_RELATIONS: /* 0x07 */
{
switch (Stack->Parameters.QueryDeviceRelations.Type)
@@ -441,6 +447,13 @@
}
break;
}
+ case IRP_MN_QUERY_PNP_DEVICE_STATE: /* 0x14 */
+ {
+ DPRINT("IRP_MJ_PNP /
IRP_MN_QUERY_PNP_DEVICE_STATE\n");
+ Information |= PNP_DEVICE_NOT_DISABLEABLE;
+ Status = STATUS_SUCCESS;
+ break;
+ }
case IRP_MN_FILTER_RESOURCE_REQUIREMENTS: /* 0x0d */
{
DPRINT("IRP_MJ_PNP / IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n");
Modified: trunk/reactos/drivers/storage/ide/pciidex/pdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/pciide…
==============================================================================
--- trunk/reactos/drivers/storage/ide/pciidex/pdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/ide/pciidex/pdo.c [iso-8859-1] Tue May 31 19:29:22 2011
@@ -360,7 +360,7 @@
{
ULONG MinorFunction;
PIO_STACK_LOCATION Stack;
- ULONG_PTR Information = 0;
+ ULONG_PTR Information = Irp->IoStatus.Information;
NTSTATUS Status;
Stack = IoGetCurrentIrpStackLocation(Irp);
@@ -404,6 +404,12 @@
Status = STATUS_SUCCESS;
break;
}
+ case IRP_MN_QUERY_REMOVE_DEVICE: /* 0x01 */
+ {
+ DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_REMOVE_DEVICE\n");
+ Status = STATUS_UNSUCCESSFUL;
+ break;
+ }
case IRP_MN_QUERY_DEVICE_RELATIONS: /* 0x07 */
{
switch (Stack->Parameters.QueryDeviceRelations.Type)
@@ -485,6 +491,13 @@
Status = PciIdeXPdoQueryId(DeviceObject, Irp, &Information);
break;
}
+ case IRP_MN_QUERY_PNP_DEVICE_STATE: /* 0x14 */
+ {
+ DPRINT("IRP_MJ_PNP /
IRP_MN_QUERY_PNP_DEVICE_STATE\n");
+ Information |= PNP_DEVICE_NOT_DISABLEABLE;
+ Status = STATUS_SUCCESS;
+ break;
+ }
case IRP_MN_QUERY_BUS_INFORMATION: /* 0x15 */
{
PPNP_BUS_INFORMATION BusInfo;