WDF: Multiple MSI-X interrupts

Hello,

Till now I worked with one MSI interrupt only:
``
WDF_INTERRUPT_CONFIG InterruptConfig;
WDF_INTERRUPT_CONFIG_INIT( &InterruptConfig,
PLxEvtInterruptIsr,
PLxEvtInterruptDpc );

InterruptConfig.EvtInterruptEnable = PLxEvtInterruptEnable;
InterruptConfig.EvtInterruptDisable = PLxEvtInterruptDisable;
InterruptConfig.AutomaticSerialization = TRUE;

status = WdfInterruptCreate( DevExt->Device,
&InterruptConfig,
WDF_NO_OBJECT_ATTRIBUTES,
&DevExt->Interrupt );

``
What should I change in WdfInterruptCreate to create another interrupt connected to another MSI interrupt coming from FPGA ?

Thank you,
Zvika

On Sep 29, 2018, at 10:33 PM, zvivered wrote:
>
> Till now I worked with one MSI interrupt only:
> ``
> What should I change in WdfInterruptCreate to create another interrupt connected to another MSI interrupt coming from FPGA ?

Have you changed your hardware to declare multiple interrupts?

Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Hi Tim,

Yes.
According to the resources of this FPGA in device manager, there are 4 interrupts.

Thank you,
Zvika

zvivered wrote:

According to the resources of this FPGA in device manager, there are 4 interrupts.

And did you set MessageNumberLimit in the registry?  This is in the same
location where you enable MSI to begin with:
    HKR,Interrupt
Management\MessageSignaledInterruptProperties,MessageNumberLimit,4

Hi Tim, All,

Attached the inf I installed according to your reply.
Still not getting interrupt.
Should I call “WdfInterruptCreate” only once or 4 times ?

Thank you,
Zvika

Hi Tim, All,

I have 4 resources with type = CmResourceTypeInterrupt
I printed:
desc->u.MessageInterrupt.Raw.MessageCount for all 4.
The value is 0.

Does it mean that I have an FPGA problem ?

Thank you,
Zvika

zvivered wrote:

Attached the inf I installed according to your reply.

There was nothing attached; my guess is the new forum throws away
attachments.  Did you check the registry to make sure the entries got in
there?

Still not getting interrupt.

Should I call “WdfInterruptCreate” only once or 4 times ?

You should read the documentation.  It’s quicker than the list.

Your driver must call*WdfInterruptCreate*once for each interrupt
vector that its device requires. If the device supports
message-signaled interrupts (MSI), the driver must create an
interrupt object for each message that the device can support.

zvivered wrote:

I have 4 resources with type = CmResourceTypeInterrupt
I printed:
desc->u.MessageInterrupt.Raw.MessageCount for all 4.
The value is 0.
Does it mean that I have an FPGA problem ?

If you’re seeing 4 interrupt resources, then it’s probably connected
correctly.