I’m working on a storport driver. But the MSI doesn’t work in Windows. The same device works fine in Linux. I’ve done following things.
- Set HwMSInterruptRoutine in HwFindAdapter routine.
- Add register as following:
HKR, Interrupt Management, 0x00000010
HKR, Interrupt Management\MessageSignaledInterruptProperties, 0x00000010
HKR, Interrupt Management\MessageSignaledInterruptProperties, MSISupported, %REG_DWORD%, 1
HKR, Interrupt Management\MessageSignaledInterruptProperties, MessageNumberLimit, %REG_DWORD%, 32
REG_DWORD = 0x00010001
After driver installed, the resources in the device property shows the right IRQ resources. It’s also right to read from StorPortGetMSIInfo and gets this:
MSI msgId 0, IntVec 144, IntMode 1 .
MSI msgId 1, IntVec 144, IntMode 1 .
MSI msgId 2, IntVec 144, IntMode 1 .
MSI msgId 3, IntVec 128, IntMode 1 .
MSI msgId 4, IntVec 128, IntMode 1 .
MSI msgId 5, IntVec 128, IntMode 1 .
MSI msgId 6, IntVec 128, IntMode 1 .
MSI msgId 7, IntVec 128, IntMode 1 .
MSI msgId 8, IntVec 128, IntMode 1 .
But the IRQ number in the device property is:
0xFFFFFFA0 (-96)
0xFFFFFF9F (-97)
…
So I have 2 questions:
- What else should I do to make MSI work correctly.
- Is there any relationship between the numbers returned by StorPortGetMSIInfo and the IRQ value in the resource tab in the device property?
Thanks.