mirror of
https://github.com/reactos/reactos.git
synced 2025-06-23 09:20:18 +00:00
Don't try to send the IRP to lower device when we are a PDO
svn path=/trunk/; revision=21189
This commit is contained in:
parent
2c5b094ca5
commit
31ecea004c
1 changed files with 32 additions and 1 deletions
|
@ -12,6 +12,37 @@
|
||||||
#define INITGUID
|
#define INITGUID
|
||||||
#include "pciidex.h"
|
#include "pciidex.h"
|
||||||
|
|
||||||
|
static NTSTATUS NTAPI
|
||||||
|
PciIdeXForwardOrIgnore(
|
||||||
|
IN PDEVICE_OBJECT DeviceObject,
|
||||||
|
IN PIRP Irp)
|
||||||
|
{
|
||||||
|
if (((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO)
|
||||||
|
return ForwardIrpAndForget(DeviceObject, Irp);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ULONG MajorFunction = IoGetCurrentIrpStackLocation(Irp)->MajorFunction;
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
if (MajorFunction == IRP_MJ_CREATE ||
|
||||||
|
MajorFunction == IRP_MJ_CLEANUP ||
|
||||||
|
MajorFunction == IRP_MJ_CLOSE)
|
||||||
|
{
|
||||||
|
Status = STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DPRINT1("PDO stub for major function 0x%lx\n", MajorFunction);
|
||||||
|
ASSERT(FALSE);
|
||||||
|
Status = STATUS_NOT_SUPPORTED;
|
||||||
|
}
|
||||||
|
Irp->IoStatus.Information = 0;
|
||||||
|
Irp->IoStatus.Status = Status;
|
||||||
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static NTSTATUS NTAPI
|
static NTSTATUS NTAPI
|
||||||
PciIdeXPnpDispatch(
|
PciIdeXPnpDispatch(
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
IN PDEVICE_OBJECT DeviceObject,
|
||||||
|
@ -51,7 +82,7 @@ PciIdeXInitialize(
|
||||||
DriverObject->DriverExtension->AddDevice = PciIdeXAddDevice;
|
DriverObject->DriverExtension->AddDevice = PciIdeXAddDevice;
|
||||||
|
|
||||||
for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
|
for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++)
|
||||||
DriverObject->MajorFunction[i] = ForwardIrpAndForget;
|
DriverObject->MajorFunction[i] = PciIdeXForwardOrIgnore;
|
||||||
DriverObject->MajorFunction[IRP_MJ_PNP] = PciIdeXPnpDispatch;
|
DriverObject->MajorFunction[IRP_MJ_PNP] = PciIdeXPnpDispatch;
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue