I have the following code:
NTSTATUS DispatchPower()
{
...
IoMarkIrpPending(Irp);
status = IoSetCompletionRoutine(Irp, ...);
status = PoCallDriver(pdx->LowerDeviceObject, Irp);
// Return the same status as PoCallDriver() returned
return status;
}
NTSTATUS PowCompletionRoutine(PDEVICE_OBJECT junk, PIRP Irp, ...)
{
...
Irp->IoStatus.Status = ctx->status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_SUCCESS;
}
With DV enabled I see the blue screen with two lines of text:
IO SYSTEM VERIFICATION ERROR (WDM DRIVER ERROR 226)
SMX-I15x.sys+1A50, F125E400
The 1A50 offset is the start of DispatchPower() handler, I suppose,
F125E400 is the IRP DV treated as uncompleted. As soon as I change my
power handler to do the following the problem disapeared.
NTSTATUS DispatchPower()
{
...
IoMarkIrpPending(Irp);
status = IoSetCompletionRoutine(Irp, ...);
status = PoCallDriver(pdx->LowerDeviceObject, Irp);
return STATUS_PENDING;
}
I have a feeling, that this is wrong, since without DV enabled, whole
system works fine with the first edition of code.
With best regards,
Vladimir S. Mirgorodsky
Calvin Guan wrote:
> > but Driver Verifier decided that the power IRP was not
> > completed appropriately and asserted with the system IRP.
>
> What exactly is the bugcheck code and parameters? What status does lower
> return?
>
> --
> Calvin Guan (Windows DDK MVP)
> Staff SW Engineer NetXtreme MINIPORT
> Broadcom Corp. Irvine, CA
> www.broadcom.com