From: Mark Roddy [markr@wattanuck.mv.com]
Sent: Monday, January 31, 2000 7:31 AM
To: Daniel Hickey; ntdev@atria.com
Subject: RE: [ntdev] Driver queuing of IRP's and pending


>
> To be more correct the driver does setup the IRP for an IO completion
> routine and does an IoCallDriver() to the port driver.
> In my testing of the driver in total passthru mode it seems to work
> correctly.  I do not call IoMarkIrpPending() before straight passthru via
> IoCallDriver().  Maybe I should tho.
>

If your 'straight passthru' code path is working then as a rule of thumb
this is not the area you want to change. (Hey if it ain't fixed don't break
it :-)

However, for a straight pass through approach, with no completion handler
code path, you should use IoSkipCurrentIrpStackLocation() as in the W2K ddk
and just return whatever your IoCallDriver call returns. Note that
IoSkipCurrentIrpStackLocation() is just a macro in ntddk.h and can be easily
ported back to NT4.

If you are using a completion handler you really must propagate the 'pending
bit' in the Irp correctly. One way to do this is to always call
IoMarkIrpPending in your dispatch side, always return STATUS_PENDING in your
dispatch side, and have your completion handler test the IRP
(Irp->PendingReturned) and call IoMarkIrpPending appropriately.



=
Mark Roddy

Independent WIndows NT Consultant
markr@hollistech.com
www.hollistech.com

=


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[ To unsubscribe, send email to ntdev-request@atria.com with body
UNSUBSCRIBE (the subject is ignored). ]