Re: PCI Interrupts

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Why not patch the driver source to use IoConnectInterrupt in
MN_START_DEVICE using the "coordinates" from the provided CM_RESOURCE_LIST?

Also do not forget to disable the interrupts on the device using
device-specific register on a) MN_REMOVE_DEVICE and b) powering down. The
power-up path must re-enable them.

After you will do so, you will be able to write your own
IOCTL_WAIT_FOR_INTERRUPT and such.

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

"Tony" <Tony@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:167A70F2-BC6F-492F-9CEB-221410D8CFF0@xxxxxxxxxxxxxxxx
The board comes with a device driver and I have the source for that. But it
didn't provide anything nice to support interrupts. For example, I would love
to have an API that lets me register a callback for that device driver's PCI
interrupt, making all the PCI interrupt handling transparent. I don't care
about the details, just the fact that the interrupt occurred. That's it.

I obviously don't know much about device drivers for windows. This is WDM by
the way. Any pointers for this inverted call model you speak of?

Thanks,
Tony

"Don Burn" wrote:

Are you asking how to write a device driver that supports PCI interrupts?
If so look at almost any of the hardware samples in the DDK, in particular
a
good starting point might be PCIDRV.

Or are you asking how to let the application know the interrupt occurred?
There many approaches but the simplest and safest is the Inverted Call
model, where you send an IOCTL to the driver, and it is pended until the
interrupt occurs.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply



"Tony" <Tony@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5A7AA950-AD18-4400-AD80-9DDFFF923019@xxxxxxxxxxxxxxxx
I have a piece of hardware that generates a PCI interrupt.
On the PC I have a simple Win32 application running.
The application has to know when this PCI interrupt occurs.
The PCI driver I am using does not have any support for PCI interrupts.

How do I write code to detect that this interrupt occurred?

Thanks for any help.
Tony




.



Relevant Pages

  • Re: WDF and 32 bit process
    ... The driver basically uses a manual to queue to hold the ... When the interrupt fires (continuous reader ... Don Burn (MVP, Windows DDK) ... The interrupt status is passed to the user mode application to ...
    (microsoft.public.development.device.drivers)
  • Re: wireless card driver problem about the "done" bit in the descriptor && the bail caused b
    ... the VxWorks, ... or a "rxdp bail", the whileloop break, while no interrupt to make ... it off and do a jobQueuePostto wake up tNet0. ... processing driver interrupt events in a timely manner. ...
    (comp.os.vxworks)
  • Re: 2.6.19 and up to 2.6.20-rc2 Ethernet problems x86_64
    ... If the system fails in ACPI mode, but works in non-ACPI mode, ... Using ACPI for SMP configuration information ... Using IOAPIC for interrupt routing ... Non-volatile memory driver v1.2 ...
    (Linux-Kernel)
  • Re: [PATCH] uio: User IRQ Mode
    ... This patch adds a "User IRQ Mode" to UIO. ... In this mode the user space driver ... is responsible for acknowledging and re-enabling the interrupt. ...
    (Linux-Kernel)
  • [PATCH 13/79] cyclades: overall cleanup
    ... * Prevent users from opening non-existing Z ports. ... * Implemented full support for non-standard baud rates. ... * Driver now reports physical instead of virtual memory addresses. ... * Fixed SMP locking in Cyclom-Y interrupt handler. ...
    (Linux-Kernel)