How to complete request in SCSI miniport?

Hi!

I wrote SCSI miniport driver which “maps” requests to bus:id:lun 0:0:0 to
some other media (memory from NonPagedPool or just a file/partition on the
existing disk drive). I have a little problem with it. All commands except
SCSIOP_READ and SCSIOP_WRITE i did implement directly in XxxStartIo()
routine, except this two. I use Executive’s WorkItem routines to schedule
execution of this commands in system thread context and at PASSIVE_LEVEL.
Here is the problem. Combination of ScsiPortNotification( RequestComplete
…) and ScsiPortNotification( NextRequest … ) works fine when called
from XxxStartIo(), but seems do nothing when called from
Executive’s work thread. SCSIPORT does not see completion and all time
reset’s SCSI bus and delays delivering of next commands… What’s going
on?

Regards,
Anton