Calling IoStartNextPacket() from IOCompletion routine.

Dear Experts,

I am using asynchronous data transfer in my USB functional driver. I am
queuing my IRPs in system supplied Queue. I don’t have any DPC in my driver.

In my Dispatch read/write function I am calling IoStartPacket() to queue my
IRP.
I am calling IoStartNextPacket() function from my ReadWrite Completion
routine.

My driver was successfully executing first IRP it has received. But it is
not accepting next IRP.
What may be the problem? Can I call IoStartNextPacket() function from
IOCompletion callback routine?

Regards,

Ramya

Are you sure that there is another irp in the start io queue? !devobj
will dump out the current irp (if any) and all
pending irps (if any) in the start io queue.

What you describe works just fine, but remember that a completion
routine can be running at IRQL <= dispatch_level (the IRQL is not
guaranteed to be DISPATCH_LEVEL!). When calling IoStartNextPacket, you
must be at IRQL == DISPATCH_LEVEL, so you need to wrap the call to
IoStartNextPacket with KeRaiseIrql/KeLowerIrql to guarantee the right
IRQL level.

d

________________________________________
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ramya Desai
Sent: Thursday, December 15, 2005 1:50 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Calling IoStartNextPacket() from IOCompletion routine.

Dear Experts,

I am using asynchronous data transfer in my USB functional driver. I am
queuing my IRPs in system supplied Queue. I don’t have any DPC in my
driver.

In my Dispatch read/write function I am calling IoStartPacket() to queue
my IRP.
I am calling IoStartNextPacket() function from my ReadWrite Completion
routine.

My driver was successfully executing first IRP it has received. But it
is not accepting next IRP.
What may be the problem? Can I call IoStartNextPacket() function from
IOCompletion callback routine?

Regards,
Ramya

— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 You are currently subscribed
to ntdev as: unknown lmsubst tag argument: ‘’ To unsubscribe send a
blank email to xxxxx@lists.osr.com