METHOD_OUT_DIRECT and ISR



I am updating/writing a driver that collects a large amount of data
(4MB) from an ISA card.

Here is the way I want it to work:

In my Dispatch routine I handle a START_SAMPLING IOCTL, which is
METHOD_OUT_DIRECT.
I read in some settings from the input buffer and store what I need in
my device extension.

It is the output buffer (at Irp->MdlAddress) that I need help with. I
translate this address using
MmGetSystemAddressForMdlSafe(Irp->MdlAddress,NormalPagePriority), as I
should.

But now I need help.
After my dispatch routine finishes, the user mode code will start a
timer on the ISA card, which triggers interrupts to my driver.
I have an ISR that runs once for each interrupt, and reads one data
point each time... which it should append to the buffer.
The interrupts keep occuring until the ISR sees that it has collected
the all the data, and turns off the interrupts.

So what my ISR needs to do is access and write to that output buffer
that was given to the driver back in the dispatch routine? But how?

I gather that in my dispatch routine I need to do something like.. lock
the buffer and/or mark the irp as pending and/or queue the irp, etc.
Then in my ISR I might need to do more of the same.

Can someone tell me what I need to do to use this METHOD_OUT_DIRECT
buffer in my ISR?
Buzz

.



Relevant Pages

  • Developing interrupt driven serial driver
    ... I am writing driver code for the serial communications interface of the TI TMS320F2812. ... I am first trying to understand all of the reasons for using interrupts, and what the range of implementation possiblities might be. ... the simplest case would be to have the FIFO threshold interrupt handler deassert CTS so that the DTE would stop sending when the FIFO is full. ... By having the interrupt handler for the receiver put the data into a larger buffer than the 16 byte FIFO, and base the CTS state on the condition of the larger buffer rather than the FIFO then the user code can process data in larger chunks and less frequently. ...
    (comp.arch.embedded)
  • Re: network driver + replenishment
    ... driver wrt to performance. ... packet from the network hw and give it to upper layer. ... the ISR queues the netjob and leaves. ... The netjob then takes the buffer away from the hardware, ...
    (comp.os.vxworks)
  • Re: network driver + replenishment
    ... driver wrt to performance. ... the ISR queues the netjob and leaves. ... The netjob then takes the buffer away from the hardware, ...
    (comp.os.vxworks)
  • Re: network driver + replenishment
    ... driver wrt to performance. ... the ISR queues the netjob and leaves. ... The netjob then takes the buffer away from the hardware, ...
    (comp.os.vxworks)
  • how to minimize interrupt latency using interrupt affinity in Vist
    ... I have a PCI device for which I wrote a standard PnP WDM driver. ... read/written in the ISR. ... used by other drivers' interrupts and that only core 3 is used by my ISR. ...
    (microsoft.public.development.device.drivers)