Canceling irp

Canceling irp

Post by Karim.Guedide » Wed, 20 Nov 2002 04:39:58



Hi all,

I have done a NT driver for a custom adapter and the problem i have is that
i don't know how to cancel an IRP while it waits for an IRQ.

I have a StartIo routine which start a DMA transfer and while I do not
received IRQ (signaling the end of the dma transfer) the IRP is not
completed.

How can i do to force the IRP to complete immediately and correctely in this
situation ?
All the sample code i have seen does not assume this situation.

Thanks for you help (or sample code).

KG.

 
 
 

Canceling irp

Post by Karim.Guedide » Wed, 20 Nov 2002 05:54:52


Is the problem can be solved if i can send a fake IRQ ?



Quote:> > How can i do to force the IRP to complete immediately and correctely
> in this
> > situation ?

> You cannot do this without the hardware support if the IRP's buffer is
> already known to DMA hardware.

>     Max


 
 
 

Canceling irp

Post by Maxim S. Shatski » Wed, 20 Nov 2002 05:49:40


Quote:> How can i do to force the IRP to complete immediately and correctely
in this
> situation ?

You cannot do this without the hardware support if the IRP's buffer is
already known to DMA hardware.

    Max

 
 
 

Canceling irp

Post by Maxim S. Shatski » Wed, 20 Nov 2002 09:01:34


No, you must stall the DMA engine of your card, then rearrange the
scatter-gather lists (in-memory and in-device-registers ones) to
exclude your IRP's MDL, then restart the DMA engine from some sane
address.

IIRC soundcards do this.

    Max


> Is the problem can be solved if i can send a fake IRQ ?


de

> > > How can i do to force the IRP to complete immediately and
correctely
> > in this
> > > situation ?

> > You cannot do this without the hardware support if the IRP's
buffer is
> > already known to DMA hardware.

> >     Max

 
 
 

1. Canceling IRPs within USB communication with VIA Host Controller

Hallo everybody,

I have a problem with an VIA USB 1.1 host controller (with Microsoft driver)
when I want to cancel an outstanding IRP when the USB device is
disconnected.
Normally all outstanding IRPs are comming back automatically when an USB
device is disconnected or the driver calls IoCancelIrp to end the
communication.
But with the VIA host controller the outstanding IRPs are still activ when
the "remove device" function is called.
For this I call the IoCancelIrp function and wait until all IRPs are back.
When all IRP are back I finish the remove device function.

With the VIA host controller the device can not connect to the system again
when plugging it in again.
The system finds an unknown device.
Then I have to reboot or disable and enable the host controller driver to
get it into work again.

Is this an known problem for the VIA host controller or am I doing
something wrong within my device driver?

Best regards,

Markus

2. : How find highest value in a matrix

3. Cancelling IRPs in streaming drivers

4. Web Stat. Question

5. cancel IRP from kernel code?

6. SecuRemote & NAT

7. Why my SubmitURB IRP is always be canceled by USB bus driver ?

8. Help needed with Inventor 2.0 replaceManip()!

9. Cancelling a READFILE IRP

10. IRP cancelled

11. Irp canceled by hardware

12. Can the filter device cancel the Irp?

13. How To cancel an Irp created using IoAllocateIrp()??