Wait/Synch in CacelIo

What are the common technics that a driver uses
when it needs to wait for the HW to go into idle state
beforecompleting the IRPs as canceled ?
for example,
a DMA controller that cannot be stopped immediately

Thanks,
Tomer Goldberg

The hardware I’ve worked before sends me an “DMA abort” interrupt. It didn’t
always work as expected though.

Good luck,
Calvin

Calvin Guan Software Engineer
ATI Technologies Inc. www.ati.com

-----Original Message-----
From: Tomer Goldberg [mailto:tomerg22@012.net.il]
Sent: Thursday, July 29, 2004 9:45 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Wait/Synch in CacelIo

What are the common technics that a driver uses
when it needs to wait for the HW to go into idle state
beforecompleting the IRPs as canceled ?
for example,
a DMA controller that cannot be stopped immediately

Thanks,
Tomer Goldberg

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@ati.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Peter Viscarola wrote an NtInsider article a long time ago that covered your
options here. In the best case you can simply allow the requests that are
‘on the hardware’ to complete through your normal completion path. Of course
your cancel processing has to be designed such that ‘on the hardware’ is
built into it. Screw cases involve long (including perpetual) delays for
hardware completion, hardware that doesn’t know how to abort requests and
hardware that can abort requests but has to do so for all requests.

=====================
Mark Roddy


From: Tomer Goldberg [mailto:tomerg22@012.net.il]
Sent: Thursday, July 29, 2004 9:45 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Wait/Synch in CacelIo

What are the common technics that a driver uses
when it needs to wait for the HW to go into idle state
beforecompleting the IRPs as canceled ?
for example,
a DMA controller that cannot be stopped immediately

Thanks,
Tomer Goldberg

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The IRP which is already under DMA usually cannot be cancellable, unless you will stop the hardware DMA in the cancel routine, prevent the hardware of ever running more DMA over this buffer, and then unmap the buffer and fail the IRP.

If you cannot do this - then wait for the IRP to complete its usual way, and complete the power IRP only when the IO IRP is completed and there is no active IO IRPs on the hardware.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: Tomer Goldberg
To: Windows System Software Devs Interest List
Sent: Thursday, July 29, 2004 5:44 PM
Subject: [ntdev] Wait/Synch in CacelIo

What are the common technics that a driver uses
when it needs to wait for the HW to go into idle state
beforecompleting the IRPs as canceled ?
for example,
a DMA controller that cannot be stopped immediately

Thanks,
Tomer Goldberg

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com