Device driver with multilpe interrupt sources

Hello,

I’m writing a device driver for a PCIe card. The driver is based on
src\general\PLX9x5x supplied in 7600.16385.1

In PLxEvtInterruptIsr I read the status register. This register contains 4
bits each for a different interrupt source.

When the user want to wait for an interrupt he/she sends an IOCTL with a
source code: 1-4.

Upon this IOCTL, the device driver writes a request to internal queue (there
are 4 internal queues).

In PLxEvtInterruptDpc, according to the interrupt source, the relevant
internal queue is read and then the IOCTL from user space is answered by
completing the request.

Is this the right mechanism for a case of more than one interrupt source ?

Best regards,
Z.V

Well, what is “the right mechanism” depends on a lot of things. But the design you describe should work… so, it’s “right” for some meaning of the word “right”…

You might want to clarify your question a bit,

Peter
OSR
@OSRDrivers