All PnP IRPs must be initialized with STATUS_NOT_SUPPORTED

svn path=/trunk/; revision=30229
This commit is contained in:
Hervé Poussineau 2007-11-06 21:37:37 +00:00
parent 643d746aa9
commit 851285b465
2 changed files with 4 additions and 12 deletions

View file

@ -154,7 +154,7 @@ IopStartDevice(
&IoStatusBlock, &IoStatusBlock,
IRP_MN_FILTER_RESOURCE_REQUIREMENTS, IRP_MN_FILTER_RESOURCE_REQUIREMENTS,
&Stack); &Stack);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status) && Status != STATUS_NOT_SUPPORTED)
{ {
DPRINT("IopInitiatePnpIrp(IRP_MN_FILTER_RESOURCE_REQUIREMENTS) failed\n"); DPRINT("IopInitiatePnpIrp(IRP_MN_FILTER_RESOURCE_REQUIREMENTS) failed\n");
return Status; return Status;
@ -205,7 +205,7 @@ IopStartDevice(
} }
else else
{ {
if (IopDeviceNodeHasFlag(DeviceNode, DNF_NEED_ENUMERATION_ONLY)) if (IopDeviceNodeHasFlag(DeviceNode, DNF_NEED_ENUMERATION_ONLY))
{ {
DPRINT("Device needs enumeration, invalidating bus relations\n"); DPRINT("Device needs enumeration, invalidating bus relations\n");
/* Invalidate device relations synchronously /* Invalidate device relations synchronously
@ -969,12 +969,8 @@ IopInitiatePnpIrp(PDEVICE_OBJECT DeviceObject,
&Event, &Event,
IoStatusBlock); IoStatusBlock);
/* Most of PNP IRPs are initialized with a status code of /* PNP IRPs are initialized with a status code of STATUS_NOT_SUPPORTED */
STATUS_NOT_IMPLEMENTED */ Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
if (MinorFunction == IRP_MN_FILTER_RESOURCE_REQUIREMENTS)
Irp->IoStatus.Status = STATUS_SUCCESS;
else
Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED;
Irp->IoStatus.Information = 0; Irp->IoStatus.Information = 0;
IrpSp = IoGetNextIrpStackLocation(Irp); IrpSp = IoGetNextIrpStackLocation(Irp);

View file

@ -63,10 +63,6 @@ IoReportDetectedDevice(
/* we don't need to call AddDevice and send IRP_MN_START_DEVICE */ /* we don't need to call AddDevice and send IRP_MN_START_DEVICE */
/* FIXME: save this device into the root-enumerated list, so this
* device would be detected as a PnP device during next startups.
*/
return Status; return Status;
} }