The problem is that quite a lot of hardware has the mechanism for canceling
an in-progress IRP that is the same mechanism used to initialize the device:
soft reset. Now if your hardware is single threaded that is perhaps fine and
dandy. On the other hand, if your hardware has 30,000 requests in
progress…
For the single threaded case you should of course support in-progress
cancellation on ‘slow’ devices.
-----Original Message-----
From: Gary Little [mailto:xxxxx@Broadstor.com]
Sent: Thursday, September 20, 2001 6:41 PM
To: NT Developers Interest List
Subject: [ntdev] RE: IRP cancel/stubborn customer question
Peter,
Any buffers the device may access should be locked down, but why wait for
the IRP to normally complete? Walter, Tony, and Peter follow the paradigm I
mentioned earlier, that once an IRP is given to the device it has no cancel
routine. Obviously they never had the joys of using an acoustically coupled
modem, or watching a paper tape being read by a TTY. ![:slight_smile: :slight_smile:](/images/emoji/twitter/slight_smile.png?v=12)
Gary G. Little
Staff Engineer
Broadband Storage, Inc.
xxxxx@broadstor.com
-----Original Message-----
From: Pete Scott [mailto:xxxxx@home.com]
Sent: Thursday, September 20, 2001 3:22 PM
To: NT Developers Interest List
Subject: [ntdev] RE: IRP cancel/stubborn customer question
If you lock the pages before passing it on, then they won’t be freed until
your reference on them goes away.
Pete
Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Evan Hillman
Sent: Thursday, September 20, 2001 2:21 PM
To: NT Developers Interest List
Subject: [ntdev] IRP cancel/stubborn customer question
Devs,
One of my customer is using a driver I wrote using the sample code provided
by Walter Oney in his “Programming the Windows Driver Model” book. I like
Walter’s libraries and I’m glad I went that route.
Walter’s code handles IRP cancels, so I did not implement my own. The
problem is that the hardware takes a long time to fill a IRPs input buffer,
and a buffer can be “active” for a long time. I think the cancel code does
kill off pending IRPs properly, but does not cause the IRP in progress to
complete, which I think is reasonable.
The problem is that the customer’s application is freeing the buffer he
passed to the driver while the driver is still filling it. This is by
definition a driver problem, since he did not write the driver, and his
application code is infallible.
Is there any way to handle this besides 1) shoot the customer to keep him
from reproducing, or 2) rewriting his application for him?
Thanks for any help…
-Evan
Evan Hillman
General Standards
You are currently subscribed to ntdev as: xxxxx@home.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@broadstor.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com