MSI-x interrupt registration with NDIS Miniport driver

Hi,

I am developing NDIS Miniport driver for a PCIE device.I am using NdisMRegisterInterruptEx API to register my interrupt handler to NDIS. Even after Interrupt registration is successful driver is not calling registered interrupt handler for the device interrupts.

I have done the changes in .inf for MSI support as specified in MSDN. And also enabled the device interrupts through pcie BAR registers.From device PCI configuration space, observed the device is supporting MSI-x interrupt.

Can anyone let me know how MSI-x interrupts are registered in NDIS?
How to check whether the interrupt handler(ISR) are successfully registered with NDIS?
I need to know why driver is not getting the interrupt?

Thanks and Regards,
Sachin

If your driver is installed properly you can look in the Device Manager and
in the Properties for the device look at Resources. The IRQ should be
shown there, if it is using an MSI interrupt the value will be negative (for
example -5), if it is not an MSI interrupt the value is positive.

Don Burn
Windows Driver Consulting
Website: http://www.windrvr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Thursday, September 22, 2016 1:53 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] MSI-x interrupt registration with NDIS Miniport driver

Hi,

I am developing NDIS Miniport driver for a PCIE device.I am using
NdisMRegisterInterruptEx API to register my interrupt handler to NDIS. Even
after Interrupt registration is successful driver is not calling registered
interrupt handler for the device interrupts.

I have done the changes in .inf for MSI support as specified in MSDN. And
also enabled the device interrupts through pcie BAR registers.From device
PCI configuration space, observed the device is supporting MSI-x interrupt.

Can anyone let me know how MSI-x interrupts are registered in NDIS?
How to check whether the interrupt handler(ISR) are successfully registered
with NDIS?
I need to know why driver is not getting the interrupt?

Thanks and Regards,
Sachin


NTDEV is sponsored by OSR

Visit the list online at:
http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software
drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at
http:</http:></http:></http:>

Thank for the quick response…

How to check whether my interrupt handler are registered successfully or not…
How can we differentiate MSI and MSI-x interrupts.In most MSDN document they have written driver normally works as MSI-x if device supports both MSI-x and MSI. My thinking is if my PCIE device supports MSI-x and MSI then driver registers interrupts as MSI-x.

There might also be the case where device is interrupting the processor/OS,but OS/NDIS is failing to called registered interrupt handler(ISR).How to check this behavior?If answer for this question is met then i can concentrate on driver part or towards the device part based on the answer

Thanks and Regards,
Sachin

If the OS is getting the interrupt, then NDIS is getting it and handing it
to you. I don’t know of any way to differentiate between MSI-x and MSI
from a driver point of view.

Don Burn
Windows Driver Consulting
Website: http://www.windrvr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Thursday, September 22, 2016 3:31 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] MSI-x interrupt registration with NDIS Miniport driver

Thank for the quick response…

How to check whether my interrupt handler are registered successfully or
not…
How can we differentiate MSI and MSI-x interrupts.In most MSDN document they
have written driver normally works as MSI-x if device supports both MSI-x
and MSI. My thinking is if my PCIE device supports MSI-x and MSI then driver
registers interrupts as MSI-x.

There might also be the case where device is interrupting the
processor/OS,but OS/NDIS is failing to called registered interrupt
handler(ISR).How to check this behavior?If answer for this question is met
then i can concentrate on driver part or towards the device part based on
the answer

Thanks and Regards,
Sachin


NTDEV is sponsored by OSR

Visit the list online at:
http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software
drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at
http:</http:></http:></http:>

You need to enable messages in the message table. See NdisMConfigMSIXTableEntry

On Sep 22, 2016, at 12:30 PM, xxxxx@gmail.com wrote:

How to check whether my interrupt handler are registered successfully or not…

If IoConnectInterrupt returns success, then you are registered properly.

How can we differentiate MSI and MSI-x interrupts.In most MSDN document they have written driver normally works as MSI-x if device supports both MSI-x and MSI. My thinking is if my PCIE device supports MSI-x and MSI then driver registers interrupts as MSI-x.

Why do you need to differentiate? You had better know what your hardware implements. You’re not going to guess.

There might also be the case where device is interrupting the processor/OS,but OS/NDIS is failing to called registered interrupt handler(ISR)

No. Why would there be such a case? If it did happen, it would be a system failure, and an irrecoverable one at that. Either interrupts are reliable, or they aren’t and you need to switch to another operating system.

.How to check this behavior?

You can’t. If you can tell it didn’t happen, then the system could have delivered it. It’s a paradox.

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