MSI-X vector masking (My interrupts are broken!)

Hi folks,

I’m running into a bit of a problem trying to use a WDF driver with
MSI-X. I can get both legacy and MSI interrupts working fine.
To cut a long story short:

  • In EvtDeviceAdd I set up 4 WDF interrupts, my INF indicates I can use
    a maximum of 8.
  • In EvtPrepareHardware, the MSI-X capabilities, vector table and PBA
    table are appropriately set up. The first 8 entries contain the same
    address, and different data. Subsequent entries (above 8), contain the
    same info as the first valid MSI-X interrupt (I suspect to handle
    spurious interrupts).
  • MSI-X is enabled, and the per entry mask bits are cleared (the bits
    are *mask out* not *mask in* - i.e. bit set = table entry disabled).
  • By the time I get to D0EntryPostInterruptsENabled, all the entries in
    the the MSI-X vector table have their mask out bits set.

Surely I’m not meant to clear the mask bits in the MSI-X vector table
myself? So I figure I must have done something stupid that’s making
windows turn off MSI-X interrupts.

What might that be? Ironically the behaviour I’m seeing with the masking
bits is preciely what I’d expect if the software treated them as “mask
in” instead of “mask out”

MH.

Argh! Disregard my previous mail - it turned out to be an “interesting”
hardware/software interaction. Windows is blameless.

MH.